/*-
* --BEGIN_LICENSE--
* Competency and Skills System
* -----
* Copyright (C) 2015 - 2018 Eduworks Corporation and other contributing parties.
* -----
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* --END_LICENSE--
*/
(function(e,t){typeof define=="function"&&define.amd?define([],t):e.forge=t()})(this,function(){var e,t,n;return function(r){function v(e,t){return h.call(e,t)}function m(e,t){var n,r,i,s,o,u,a,f,c,h,p,v=t&&t.split("/"),m=l.map,g=m&&m["*"]||{};if(e&&e.charAt(0)===".")if(t){v=v.slice(0,v.length-1),e=e.split("/"),o=e.length-1,l.nodeIdCompat&&d.test(e[o])&&(e[o]=e[o].replace(d,"")),e=v.concat(e);for(c=0;c<e.length;c+=1){p=e[c];if(p===".")e.splice(c,1),c-=1;else if(p===".."){if(c===1&&(e[2]===".."||e[0]===".."))break;c>0&&(e.splice(c-1,2),c-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((v||g)&&m){n=e.split("/");for(c=n.length;c>0;c-=1){r=n.slice(0,c).join("/");if(v)for(h=v.length;h>0;h-=1){i=m[v.slice(0,h).join("/")];if(i){i=i[r];if(i){s=i,u=c;break}}}if(s)break;!a&&g&&g[r]&&(a=g[r],f=c)}!s&&a&&(s=a,u=f),s&&(n.splice(0,u,s),e=n.join("/"))}return e}function g(e,t){return function(){return s.apply(r,p.call(arguments,0).concat([e,t]))}}function y(e){return function(t){return m(t,e)}}function b(e){return function(t){a[e]=t}}function w(e){if(v(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!v(a,e)&&!v(c,e))throw new Error("No "+e);return a[e]}function E(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function S(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice,d=/\.js$/;o=function(e,t){var n,r=E(e),i=r[0];return e=r[1],i&&(i=m(i,t),n=w(i)),i?n&&n.normalize?e=n.normalize(e,y(t)):e=m(e,t):(e=m(e,t),r=E(e),i=r[0],e=r[1],i&&(n=w(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return g(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:S(e)}}},i=function(e,t,n,i){var s,l,h,p,d,m=[],y=typeof n,E;i=i||e;if(y==="undefined"||y==="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(d=0;d<t.length;d+=1){p=o(t[d],i),l=p.f;if(l==="require")m[d]=u.require(e);else if(l==="exports")m[d]=u.exports(e),E=!0;else if(l==="module")s=m[d]=u.module(e);else if(v(a,l)||v(f,l)||v(c,l))m[d]=w(l);else{if(!p.p)throw new Error(e+" missing "+l);p.p.load(p.n,g(i,!0),b(l),{}),m[d]=a[l]}}h=n?n.apply(a[e],m):undefined;if(e)if(s&&s.exports!==r&&s.exports!==a[e])a[e]=s.exports;else if(h!==r||!E)a[e]=h}else e&&(a[e]=n)},e=t=s=function(e,t,n,a,f){if(typeof e=="string")return u[e]?u[e](t):w(o(e,t).f);if(!e.splice){l=e,l.deps&&s(l.deps,l.callback);if(!t)return;t.splice?(e=t,t=n,n=null):e=r}return t=t||function(){},typeof n=="function"&&(n=a,a=f),a?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),s},s.config=function(e){return s(e)},e._defined=a,n=function(e,t,n){t.splice||(n=t,t=[]),!v(a,e)&&!v(f,e)&&(f[e]=[e,t,n])},n.amd={jQuery:!0}}(),n("node_modules/almond/almond",function(){}),function(){function e(e){function n(e){this.data="",this.read=0;if(typeof e=="string")this.data=e;else if(t.isArrayBuffer(e)||t.isArrayBufferView(e)){var r=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,r)}catch(i){for(var s=0;s<r.length;++s)this.putByte(r[s])}}else if(e instanceof n||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")this.data=e.data,this.read=e.read;this._constructedStringLength=0}function i(e,n){n=n||{},this.read=n.readOffset||0,this.growSize=n.growSize||1024;var r=t.isArrayBuffer(e),i=t.isArrayBufferView(e);if(r||i){r?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in n?n.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!==null&&e!==undefined&&this.putBytes(e),"writeOffset"in n&&(this.write=n.writeOffset)}var t=e.util=e.util||{};(function(){if(typeof process!="undefined"&&process.nextTick){t.nextTick=process.nextTick,typeof setImmediate=="function"?t.setImmediate=setImmediate:t.setImmediate=t.nextTick;return}if(typeof setImmediate=="function"){t.setImmediate=setImmediate,t.nextTick=function(e){return setImmediate(e)};return}t.setImmediate=function(e){setTimeout(e,0)};if(typeof window!="undefined"&&typeof window.postMessage=="function"){var e="forge.setImmediate",n=[];t.setImmediate=function(t){n.push(t),n.length===1&&window.postMessage(e,"*")};function r(t){if(t.source===window&&t.data===e){t.stopPropagation();var r=n.slice();n.length=0,r.forEach(function(e){e()})}}window.addEventListener("message",r,!0)}if(typeof MutationObserver!="undefined"){var i=Date.now(),s=!0,o=document.createElement("div"),n=[];(new MutationObserver(function(){var e=n.slice();n.length=0,e.forEach(function(e){e()})})).observe(o,{attributes:!0});var u=t.setImmediate;t.setImmediate=function(e){Date.now()-i>15?(i=Date.now(),u(e)):(n.push(e),n.length===1&&o.setAttribute("a",s=!s))}}t.nextTick=t.setImmediate})(),t.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},t.isArrayBuffer=function(e){return typeof ArrayBuffer!="undefined"&&e instanceof ArrayBuffer},t.isArrayBufferView=function(e){return e&&t.isArrayBuffer(e.buffer)&&e.byteLength!==undefined},t.ByteBuffer=n,t.ByteStringBuffer=n;var r=4096;t.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>r&&(this.data.substr(0,1),this._constructedStringLength=0)},t.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},t.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},t.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},t.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);var n=this.data;while(t>0)t&1&&(n+=e),t>>>=1,t>0&&(e+=e);return this.data=n,this._optimizeConstructedString(t),this},t.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},t.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(t.encodeUtf8(e))},t.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},t.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},t.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))},t.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))},t.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},t.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},t.ByteStringBuffer.prototype.putInt=function(e,t){var n="";do t-=8,n+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(n)},t.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)},t.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())},t.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)},t.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e},t.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e},t.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e},t.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e},t.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e},t.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e},t.ByteStringBuffer.prototype.getInt=function(e){var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t},t.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<<e-2;return t>=n&&(t-=n<<1),t},t.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t},t.ByteStringBuffer.prototype.bytes=function(e){return typeof e=="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},t.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},t.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},t.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},t.ByteStringBuffer.prototype.copy=function(){var e=t.createBuffer(this.data);return e.read=this.read,e},t.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},t.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},t.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this},t.ByteStringBuffer.prototype.toHex=function(){var e="";for(var t=this.read;t<this.data.length;++t){var n=this.data.charCodeAt(t);n<16&&(e+="0"),e+=n.toString(16)}return e},t.ByteStringBuffer.prototype.toString=function(){return t.decodeUtf8(this.bytes())},t.DataBuffer=i,t.DataBuffer.prototype.length=function(){return this.write-this.read},t.DataBuffer.prototype.isEmpty=function(){return this.length()<=0},t.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var n=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),r=new Uint8Array(this.length()+t);return r.set(n),this.data=new DataView(r.buffer),this},t.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},t.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var n=0;n<t;++n)this.data.setUint8(e);return this},t.DataBuffer.prototype.putBytes=function(e,n){if(t.isArrayBufferView(e)){var r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=r.byteLength-r.byteOffset;this.accommodate(i);var s=new Uint8Array(this.data.buffer,this.write);return s.set(r),this.write+=i,this}if(t.isArrayBuffer(e)){var r=new Uint8Array(e);this.accommodate(r.byteLength);var s=new Uint8Array(this.data.buffer);return s.set(r,this.write),this.write+=r.byteLength,this}if(e instanceof t.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&t.isArrayBufferView(e.data)){var r=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(r.byteLength);var s=new Uint8Array(e.data.byteLength,this.write);return s.set(r),this.write+=r.byteLength,this}e instanceof t.ByteStringBuffer&&(e=e.data,n="binary"),n=n||"binary";if(typeof e=="string"){var o;if(n==="hex")return this.accommodate(Math.ceil(e.length/2)),o=new Uint8Array(this.data.buffer,this.write),this.write+=t.binary.hex.decode(e,o,this.write),this;if(n==="base64")return this.accommodate(Math.ceil(e.length/4)*3),o=new Uint8Array(this.data.buffer,this.write),this.write+=t.binary.base64.decode(e,o,this.write),this;n==="utf8"&&(e=t.encodeUtf8(e),n="binary");if(n==="binary"||n==="raw")return this.accommodate(e.length),o=new Uint8Array(this.data.buffer,this.write),this.write+=t.binary.raw.decode(o),this;if(n==="utf16")return this.accommodate(e.length*2),o=new Uint16Array(this.data.buffer,this.write),this.write+=t.text.utf16.encode(o),this;throw new Error("Invalid encoding: "+n)}throw Error("Invalid parameter: "+e)},t.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this},t.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")},t.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this},t.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},t.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},t.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},t.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},t.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},t.DataBuffer.prototype.putInt=function(e,t){this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this},t.DataBuffer.prototype.putSignedInt=function(e,t){return this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)},t.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)},t.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e},t.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e},t.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e},t.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e},t.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e},t.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e},t.DataBuffer.prototype.getInt=function(e){var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t},t.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),n=2<<e-2;return t>=n&&(t-=n<<1),t},t.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t},t.DataBuffer.prototype.bytes=function(e){return typeof e=="undefined"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},t.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},t.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},t.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},t.DataBuffer.prototype.copy=function(){return new t.DataBuffer(this)},t.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},t.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},t.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},t.DataBuffer.prototype.toHex=function(){var e="";for(var t=this.read;t<this.data.byteLength;++t){var n=this.data.getUint8(t);n<16&&(e+="0"),e+=n.toString(16)}return e},t.DataBuffer.prototype.toString=function(e){var n=new Uint8Array(this.data,this.read,this.length());e=e||"utf8";if(e==="binary"||e==="raw")return t.binary.raw.encode(n);if(e==="hex")return t.binary.hex.encode(n);if(e==="base64")return t.binary.base64.encode(n);if(e==="utf8")return t.text.utf8.decode(n);if(e==="utf16")return t.text.utf16.decode(n);throw new Error("Invalid encoding: "+e)},t.createBuffer=function(e,n){return n=n||"raw",e!==undefined&&n==="utf8"&&(e=t.encodeUtf8(e)),new t.ByteBuffer(e)},t.fillString=function(e,t){var n="";while(t>0)t&1&&(n+=e),t>>>=1,t>0&&(e+=e);return n},t.xorBytes=function(e,t,n){var r="",i="",s="",o=0,u=0;for(;n>0;--n,++o)i=e.charCodeAt(o)^t.charCodeAt(o),u>=10&&(r+=s,s="",u=0),s+=String.fromCharCode(i),++u;return r+=s,r},t.hexToBytes=function(e){var t="",n=0;e.length&!0&&(n=1,t+=String.fromCharCode(parseInt(e[0],16)));for(;n<e.length;n+=2)t+=String.fromCharCode(parseInt(e.substr(n,2),16));return t},t.bytesToHex=function(e){return t.createBuffer(e).toHex()},t.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51];t.encode64=function(e,t){var n="",r="",i,o,u,a=0;while(a<e.length)i=e.charCodeAt(a++),o=e.charCodeAt(a++),u=e.charCodeAt(a++),n+=s.charAt(i>>2),n+=s.charAt((i&3)<<4|o>>4),isNaN(o)?n+="==":(n+=s.charAt((o&15)<<2|u>>6),n+=isNaN(u)?"=":s.charAt(u&63)),t&&n.length>t&&(r+=n.substr(0,t)+"\r\n",n=n.substr(t));return r+=n,r},t.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");var t="",n,r,i,s,u=0;while(u<e.length)n=o[e.charCodeAt(u++)-43],r=o[e.charCodeAt(u++)-43],i=o[e.charCodeAt(u++)-43],s=o[e.charCodeAt(u++)-43],t+=String.fromCharCode(n<<2|r>>4),i!==64&&(t+=String.fromCharCode((r&15)<<4|i>>2),s!==64&&(t+=String.fromCharCode((i&3)<<6|s)));return t},t.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},t.decodeUtf8=function(e){return decodeURIComponent(escape(e))},t.binary={raw:{},hex:{},base64:{}},t.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},t.binary.raw.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(e.length)),n=n||0;var i=n;for(var s=0;s<e.length;++s)r[i++]=e.charCodeAt(s);return t?i-n:r},t.binary.hex.encode=t.bytesToHex,t.binary.hex.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/2))),n=n||0;var i=0,s=n;e.length&1&&(i=1,r[s++]=parseInt(e[0],16));for(;i<e.length;i+=2)r[s++]=parseInt(e.substr(i,2),16);return t?s-n:r},t.binary.base64.encode=function(e,t){var n="",r="",i,o,u,a=0;while(a<e.byteLength)i=e[a++],o=e[a++],u=e[a++],n+=s.charAt(i>>2),n+=s.charAt((i&3)<<4|o>>4),isNaN(o)?n+="==":(n+=s.charAt((o&15)<<2|u>>6),n+=isNaN(u)?"=":s.charAt(u&63)),t&&n.length>t&&(r+=n.substr(0,t)+"\r\n",n=n.substr(t));return r+=n,r},t.binary.base64.decode=function(e,t,n){var r=t;r||(r=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),n=n||0;var i,s,u,a,f=0,l=n;while(f<e.length)i=o[e.charCodeAt(f++)-43],s=o[e.charCodeAt(f++)-43],u=o[e.charCodeAt(f++)-43],a=o[e.charCodeAt(f++)-43],r[l++]=i<<2|s>>4,u!==64&&(r[l++]=(s&15)<<4|u>>2,a!==64&&(r[l++]=(u&3)<<6|a));return t?l-n:r.subarray(0,l)},t.text={utf8:{},utf16:{}},t.text.utf8.encode=function(e,n,r){e=t.encodeUtf8(e);var i=n;i||(i=new Uint8Array(e.length)),r=r||0;var s=r;for(var o=0;o<e.length;++o)i[s++]=e.charCodeAt(o);return n?s-r:i},t.text.utf8.decode=function(e){return t.decodeUtf8(String.fromCharCode.apply(null,e))},t.text.utf16.encode=function(e,t,n){var r=t;r||(r=new Uint8Array(e.length));var i=new Uint16Array(r);n=n||0;var s=n,o=n;for(var u=0;u<e.length;++u)i[o++]=e.charCodeAt(u),s+=2;return t?s-n:r},t.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e))},t.deflate=function(e,n,r){n=t.decode64(e.deflate(t.encode64(n)).rval);if(r){var i=2,s=n.charCodeAt(1);s&32&&(i=6),n=n.substring(i,n.length-4)}return n},t.inflate=function(e,n,r){var i=e.inflate(t.encode64(n)).rval;return i===null?null:t.decode64(i)};var u=function(e,n,r){if(!e)throw new Error("WebStorage not available.");var i;r===null?i=e.removeItem(n):(r=t.encode64(JSON.stringify(r)),i=e.setItem(n,r));if(typeof i!="undefined"&&i.rval!==!0){var s=new Error(i.error.message);throw s.id=i.error.id,s.name=i.error.name,s}},a=function(e,n){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(n);if(e.init)if(r.rval===null){if(r.error){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}r=null}else r=r.rval;return r!==null&&(r=JSON.parse(t.decode64(r))),r},f=function(e,t,n,r){var i=a(e,t);i===null&&(i={}),i[n]=r,u(e,t,i)},l=function(e,t,n){var r=a(e,t);return r!==null&&(r=n in r?r[n]:null),r},c=function(e,t,n){var r=a(e,t);if(r!==null&&n in r){delete r[n];var i=!0;for(var s in r){i=!1;break}i&&(r=null),u(e,t,r)}},h=function(e,t){u(e,t,null)},p=function(e,t,n){var r=null;typeof n=="undefined"&&(n=["web","flash"]);var i,s=!1,o=null;for(var u in n){i=n[u];try{if(i==="flash"||i==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");r=e.apply(this,t),s=i==="flash"}if(i==="web"||i==="both")t[0]=localStorage,r=e.apply(this,t),s=!0}catch(a){o=a}if(s)break}if(!s)throw o;return r};t.setItem=function(e,t,n,r,i){p(f,arguments,i)},t.getItem=function(e,t,n,r){return p(l,arguments,r)},t.removeItem=function(e,t,n,r){p(c,arguments,r)},t.clearItems=function(e,t,n){p(h,arguments,n)},t.parseUrl=function(e){var t=/^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;t.lastIndex=0;var n=t.exec(e),r=n===null?null:{full:e,scheme:n[1],host:n[2],port:n[3],path:n[4]};return r&&(r.fullHost=r.host,r.port?r.port!==80&&r.scheme==="http"?r.fullHost+=":"+r.port:r.port!==443&&r.scheme==="https"&&(r.fullHost+=":"+r.port):r.scheme==="http"?r.port=80:r.scheme==="https"&&(r.port=443),r.full=r.scheme+"://"+r.fullHost),r};var d=null;t.getQueryVariables=function(e){var t=function(e){var t={},n=e.split("&");for(var r=0;r<n.length;r++){var i=n[r].indexOf("="),s,o;i>0?(s=n[r].substring(0,i),o=n[r].substring(i+1)):(s=n[r],o=null),s in t||(t[s]=[]),!(s in Object.prototype)&&o!==null&&t[s].push(unescape(o))}return t},n;return typeof e=="undefined"?(d===null&&(typeof window!="undefined"&&window.location&&window.location.search?d=t(window.location.search.substring(1)):d={}),n=d):n=t(e),n},t.parseFragment=function(e){var n=e,r="",i=e.indexOf("?");i>0&&(n=e.substring(0,i),r=e.substring(i+1));var s=n.split("/");s.length>0&&s[0]===""&&s.shift();var o=r===""?{}:t.getQueryVariables(r);return{pathString:n,queryString:r,path:s,query:o}},t.makeRequest=function(e){var n=t.parseFragment(e),r={path:n.pathString,query:n.queryString,getPath:function(e){return typeof e=="undefined"?n.path:n.path[e]},getQuery:function(e,t){var r;return typeof e=="undefined"?r=n.query:(r=n.query[e],r&&typeof t!="undefined"&&(r=r[t])),r},getQueryLast:function(e,t){var n,i=r.getQuery(e);return i?n=i[i.length-1]:n=t,n}};return r},t.makeLink=function(e,t,n){e=jQuery.isArray(e)?e.join("/"):e;var r=jQuery.param(t||{});return n=n||"",e+(r.length>0?"?"+r:"")+(n.length>0?"#"+n:"")},t.setPath=function(e,t,n){if(typeof e=="object"&&e!==null){var r=0,i=t.length;while(r<i){var s=t[r++];if(r==i)e[s]=n;else{var o=s in e;if(!o||o&&typeof e[s]!="object"||o&&e[s]===null)e[s]={};e=e[s]}}}},t.getPath=function(e,t,n){var r=0,i=t.length,s=!0;while(s&&r<i&&typeof e=="object"&&e!==null){var o=t[r++];s=o in e,s&&(e=e[o])}return s?e:n},t.deletePath=function(e,t){if(typeof e=="object"&&e!==null){var n=0,r=t.length;while(n<r){var i=t[n++];if(n==r)delete e[i];else{if(!(i in e&&typeof e[i]=="object"&&e[i]!==null))break;e=e[i]}}}},t.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},t.format=function(e){var t=/%./g,n,r,i=0,s=[],o=0;while(n=t.exec(e)){r=e.substring(o,t.lastIndex-2),r.length>0&&s.push(r),o=t.lastIndex;var u=n[0][1];switch(u){case"s":case"o":i<arguments.length?s.push(arguments[i++ +1]):s.push("<?>");break;case"%":s.push("%");break;default:s.push("<%"+u+"?>")}}return s.push(e.substring(o)),s.join("")},t.formatNumber=function(e,t,n,r){var i=e,s=isNaN(t=Math.abs(t))?2:t,o=n===undefined?",":n,u=r===undefined?".":r,a=i<0?"-":"",f=parseInt(i=Math.abs(+i||0).toFixed(s),10)+"",l=f.length>3?f.length%3:0;return a+(l?f.substr(0,l)+u:"")+f.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+u)+(s?o+Math.abs(i-f).toFixed(s).slice(2):"")},t.formatSize=function(e){return e>=1073741824?e=t.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=t.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=t.formatNumber(e/1024,0)+" KiB":e=t.formatNumber(e,0)+" bytes",e},t.bytesFromIP=function(e){return e.indexOf(".")!==-1?t.bytesFromIPv4(e):e.indexOf(":")!==-1?t.bytesFromIPv6(e):null},t.bytesFromIPv4=function(e){e=e.split(".");if(e.length!==4)return null;var n=t.createBuffer();for(var r=0;r<e.length;++r){var i=parseInt(e[r],10);if(isNaN(i))return null;n.putByte(i)}return n.getBytes()},t.bytesFromIPv6=function(e){var n=0;e=e.split(":").filter(function(e){return e.length===0&&++n,!0});var r=(8-e.length+n)*2,i=t.createBuffer();for(var s=0;s<8;++s){if(!e[s]||e[s].length===0){i.fillWithByte(0,r),r=0;continue}var o=t.hexToBytes(e[s]);o.length<2&&i.putByte(0),i.putBytes(o)}return i.getBytes()},t.bytesToIP=function(e){return e.length===4?t.bytesToIPv4(e):e.length===16?t.bytesToIPv6(e):null},t.bytesToIPv4=function(e){if(e.length!==4)return null;var t=[];for(var n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t.join(".")},t.bytesToIPv6=function(e){if(e.length!==16)return null;var n=[],r=[],i=0;for(var s=0;s<e.length;s+=2){var o=t.bytesToHex(e[s]+e[s+1]);while(o[0]==="0"&&o!=="0")o=o.substr(1);if(o==="0"){var u=r[r.length-1],a=n.length;!u||a!==u.end+1?r.push({start:a,end:a}):(u.end=a,u.end-u.start>r[i].end-r[i].start&&(i=r.length-1))}n.push(o)}if(r.length>0){var f=r[i];f.end-f.start>0&&(n.splice(f.start,f.end-f.start+1,""),f.start===0&&n.unshift(""),f.end===7&&n.push(""))}return n.join(":")},t.estimateCores=function(e,n){function i(e,u,a){if(u===0){var f=Math.floor(e.reduce(function(e,t){return e+t},0)/e.length);return t.cores=Math.max(1,f),URL.revokeObjectURL(r),n(null,t.cores)}s(a,function(t,n){e.push(o(a,n)),i(e,u-1,a)})}function s(e,t){var n=[],i=[];for(var s=0;s<e;++s){var o=new Worker(r);o.addEventListener("message",function(r){i.push(r.data);if(i.length===e){for(var s=0;s<e;++s)n[s].terminate();t(null,i)}}),n.push(o)}for(var s=0;s<e;++s)n[s].postMessage(s)}function o(e,t){var n=[];for(var r=0;r<e;++r){var i=t[r],s=n[r]=[];for(var o=0;o<e;++o){if(r===o)continue;var u=t[o];(i.st>u.st&&i.st<u.et||u.st>i.st&&u.st<i.et)&&s.push(o)}}return n.reduce(function(e,t){return Math.max(e,t.length)},0)}typeof e=="function"&&(n=e,e={}),e=e||{};if("cores"in t&&!e.update)return n(null,t.cores);if(typeof navigator!="undefined"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return t.cores=navigator.hardwareConcurrency,n(null,t.cores);if(typeof Worker=="undefined")return t.cores=1,n(null,t.cores);if(typeof Blob=="undefined")return t.cores=2,n(null,t.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(e){var t=Date.now(),n=t+4;while(Date.now()<n);self.postMessage({st:t,et:n})})}.toString(),")()"],{type:"application/javascript"}));i([],5,16)}}var r="util";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/util",["require","module"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){e.cipher=e.cipher||{},e.cipher.algorithms=e.cipher.algorithms||{},e.cipher.createCipher=function(t,n){var r=t;typeof r=="string"&&(r=e.cipher.getAlgorithm(r),r&&(r=r()));if(!r)throw new Error("Unsupported algorithm: "+t);return new e.cipher.BlockCipher({algorithm:r,key:n,decrypt:!1})},e.cipher.createDecipher=function(t,n){var r=t;typeof r=="string"&&(r=e.cipher.getAlgorithm(r),r&&(r=r()));if(!r)throw new Error("Unsupported algorithm: "+t);return new e.cipher.BlockCipher({algorithm:r,key:n,decrypt:!0})},e.cipher.registerAlgorithm=function(t,n){t=t.toUpperCase(),e.cipher.algorithms[t]=n},e.cipher.getAlgorithm=function(t){return t=t.toUpperCase(),t in e.cipher.algorithms?e.cipher.algorithms[t]:null};var t=e.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};t.prototype.start=function(t){t=t||{};var n={};for(var r in t)n[r]=t[r];n.decrypt=this._decrypt,this._finish=!1,this._input=e.util.createBuffer(),this.output=t.output||e.util.createBuffer(),this.mode.start(n)},t.prototype.update=function(e){e&&this._input.putBuffer(e);while(!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish);this._input.compact()},t.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)?!1:(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t)?!1:this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)?!1:!0)}}var r="cipher";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/cipher",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function n(t){typeof t=="string"&&(t=e.util.createBuffer(t));if(e.util.isArray(t)&&t.length>4){var n=t;t=e.util.createBuffer();for(var r=0;r<n.length;++r)t.putByte(n[r])}return e.util.isArray(t)||(t=[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]),t}function r(e){e[e.length-1]=e[e.length-1]+1&4294967295}function i(e){return[e/4294967296|0,e&4294967295]}e.cipher=e.cipher||{};var t=e.cipher.modes=e.cipher.modes||{};t.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.ecb.prototype.start=function(e){},t.ecb.prototype.encrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},t.ecb.prototype.decrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r])},t.ecb.prototype.pad=function(e,t){var n=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(n,n),!0},t.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var n=e.length(),r=e.at(n-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)},t.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},t.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=n(e.iv),this._prev=this._iv.slice(0)}},t.cbc.prototype.encrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=this._prev[r]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._outBlock[r]);this._prev=this._outBlock},t.cbc.prototype.decrypt=function(e,t,n){if(e.length()<this.blockSize&&!(n&&e.length()>0))return!0;for(var r=0;r<this._ints;++r)this._inBlock[r]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var r=0;r<this._ints;++r)t.putInt32(this._prev[r]^this._outBlock[r]);this._prev=this._inBlock.slice(0)},t.cbc.prototype.pad=function(e,t){var n=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(n,n),!0},t.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var n=e.length(),r=e.at(n-1);return r>this.blockSize<<2?!1:(e.truncate(r),!0)},t.cfb=function(t){t=t||{},this.name="CFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0},t.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=n(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.cfb.prototype.encrypt=function(e,t,n){var r=e.length();if(r===0)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(this._partialBytes===0&&r>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32()^this._outBlock[i],t.putInt32(this._inBlock[i]);return}var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32()^this._outBlock[i],this._partialOutput.putInt32(this._partialBlock[i]);if(s>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes);if(s>0&&!n)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},t.cfb.prototype.decrypt=function(e,t,n){var r=e.length();if(r===0)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(this._partialBytes===0&&r>=this.blockSize){for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32(),t.putInt32(this._inBlock[i]^this._outBlock[i]);return}var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialBlock[i]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[i]^this._outBlock[i]);if(s>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._partialBlock[i];this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes);if(s>0&&!n)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},t.ofb=function(t){t=t||{},this.name="OFB",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0},t.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=n(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ofb.prototype.encrypt=function(e,t,n){var r=e.length();if(e.length()===0)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(this._partialBytes===0&&r>=this.blockSize){for(var i=0;i<this._ints;++i)t.putInt32(e.getInt32()^this._outBlock[i]),this._inBlock[i]=this._outBlock[i];return}var s=(this.blockSize-r)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var i=0;i<this._ints;++i)this._partialOutput.putInt32(e.getInt32()^this._outBlock[i]);if(s>0)e.read-=this.blockSize;else for(var i=0;i<this._ints;++i)this._inBlock[i]=this._outBlock[i];this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes);if(s>0&&!n)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(r-this._partialBytes)),this._partialBytes=0},t.ofb.prototype.decrypt=t.ofb.prototype.encrypt,t.ctr=function(t){t=t||{},this.name="CTR",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0},t.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=n(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},t.ctr.prototype.encrypt=function(e,t,n){var i=e.length();if(i===0)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(this._partialBytes===0&&i>=this.blockSize)for(var s=0;s<this._ints;++s)t.putInt32(e.getInt32()^this._outBlock[s]);else{var o=(this.blockSize-i)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(e.getInt32()^this._outBlock[s]);o>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes);if(o>0&&!n)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}r(this._inBlock)},t.ctr.prototype.decrypt=t.ctr.prototype.encrypt,t.gcm=function(t){t=t||{},this.name="GCM",this.cipher=t.cipher,this.blockSize=t.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=e.util.createBuffer(),this._partialBytes=0,this._R=3774873600},t.gcm.prototype.start=function(t){if(!("iv"in t))throw new Error("Invalid IV parameter.");var n=e.util.createBuffer(t.iv);this._cipherLength=0;var s;"additionalData"in t?s=e.util.createBuffer(t.additionalData):s=e.util.createBuffer(),"tagLength"in t?this._tagLength=t.tagLength:this._tagLength=128,this._tag=null;if(t.decrypt){this._tag=e.util.createBuffer(t.tag).getBytes();if(this._tag.length!==this._tagLength/8)throw new Error("Authentication tag does not match tag length.")}this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var o=n.length();if(o===12)this._j0=[n.getInt32(),n.getInt32(),n.getInt32(),1];else{this._j0=[0,0,0,0];while(n.length()>0)this._j0=this.ghash(this._hashSubkey,this._j0,[n.getInt32(),n.getInt32(),n.getInt32(),n.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(i(o*8)))}this._inBlock=this._j0.slice(0),r(this._inBlock),this._partialBytes=0,s=e.util.createBuffer(s),this._aDataLength=i(s.length()*8);var u=s.length()%this.blockSize;u&&s.fillWithByte(0,this.blockSize-u),this._s=[0,0,0,0];while(s.length()>0)this._s=this.ghash(this._hashSubkey,this._s,[s.getInt32(),s.getInt32(),s.getInt32(),s.getInt32()])},t.gcm.prototype.encrypt=function(e,t,n){var i=e.length();if(i===0)return!0;this.cipher.encrypt(this._inBlock,this._outBlock);if(this._partialBytes===0&&i>=this.blockSize){for(var s=0;s<this._ints;++s)t.putInt32(this._outBlock[s]^=e.getInt32());this._cipherLength+=this.blockSize}else{var o=(this.blockSize-i)%this.blockSize;o>0&&(o=this.blockSize-o),this._partialOutput.clear();for(var s=0;s<this._ints;++s)this._partialOutput.putInt32(e.getInt32()^this._outBlock[s]);if(o===0||n){if(n){var u=i%this.blockSize;this._cipherLength+=u,this._partialOutput.truncate(this.blockSize-u)}else this._cipherLength+=this.blockSize;for(var s=0;s<this._ints;++s)this._outBlock[s]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes);if(o>0&&!n)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0;t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),r(this._inBlock)},t.gcm.prototype.decrypt=function(e,t,n){var i=e.length();if(i<this.blockSize&&!(n&&i>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),r(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var s=0;s<this._ints;++s)t.putInt32(this._outBlock[s]^this._hashBlock[s]);i<this.blockSize?this._cipherLength+=i%this.blockSize:this._cipherLength+=this.blockSize},t.gcm.prototype.afterFinish=function(t,n){var r=!0;n.decrypt&&n.overflow&&t.truncate(this.blockSize-n.overflow),this.tag=e.util.createBuffer();var s=this._aDataLength.concat(i(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,s);var o=[];this.cipher.encrypt(this._j0,o);for(var u=0;u<this._ints;++u)this.tag.putInt32(this._s[u]^o[u]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),n.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r},t.gcm.prototype.multiply=function(e,t){var n=[0,0,0,0],r=t.slice(0);for(var i=0;i<128;++i){var s=e[i/32|0]&1<<31-i%32;s&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),this.pow(r,r)}return n},t.gcm.prototype.pow=function(e,t){var n=e[3]&1;for(var r=3;r>0;--r)t[r]=e[r]>>>1|(e[r-1]&1)<<31;t[0]=e[0]>>>1,n&&(t[0]^=this._R)},t.gcm.prototype.tableMultiply=function(e){var t=[0,0,0,0];for(var n=0;n<32;++n){var r=n/8|0,i=e[r]>>>(7-n%8)*4&15,s=this._m[n][i];t[0]^=s[0],t[1]^=s[1],t[2]^=s[2],t[3]^=s[3]}return t},t.gcm.prototype.ghash=function(e,t,n){return t[0]^=n[0],t[1]^=n[1],t[2]^=n[2],t[3]^=n[3],this.tableMultiply(t)},t.gcm.prototype.generateHashTable=function(e,t){var n=8/t,r=4*n,i=16*n,s=new Array(i);for(var o=0;o<i;++o){var u=[0,0,0,0],a=o/r|0,f=(r-1-o%r)*t;u[a]=1<<t-1<<f,s[o]=this.generateSubHashTable(this.multiply(u,e),t)}return s},t.gcm.prototype.generateSubHashTable=function(e,t){var n=1<<t,r=n>>>1,i=new Array(n);i[r]=e.slice(0);var s=r>>>1;while(s>0)this.pow(i[2*s],i[s]=[]),s>>=1;s=2;while(s<r){for(var o=1;o<s;++o){var u=i[s],a=i[o];i[s+o]=[u[0]^a[0],u[1]^a[1],u[2]^a[2],u[3]^a[3]]}s*=2}i[0]=[0,0,0,0];for(s=r+1;s<n;++s){var f=i[s^r];i[s]=[e[0]^f[0],e[1]^f[1],e[2]^f[2],e[3]^f[3]]}return i}}var r="cipherModes";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/cipherModes",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function t(t,n){var r=function(){return new e.aes.Algorithm(t,n)};e.cipher.registerAlgorithm(t,r)}function f(){n=!0,o=[0,1,2,4,8,16,32,64,128,27,54];var e=new Array(256);for(var t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;i=new Array(256),s=new Array(256),u=new Array(4),a=new Array(4);for(var t=0;t<4;++t)u[t]=new Array(256),a[t]=new Array(256);var r=0,f=0,l,c,h,p,d,v,m;for(var t=0;t<256;++t){p=f^f<<1^f<<2^f<<3^f<<4,p=p>>8^p&255^99,i[r]=p,s[p]=r,d=e[p],l=e[r],c=e[l],h=e[c],v=d<<24^p<<16^p<<8^(p^d),m=(l^c^h)<<24^(r^h)<<16^(r^c^h)<<8^(r^l^h);for(var g=0;g<4;++g)u[g][r]=v,a[g][p]=m,v=v<<24|v>>>8,m=m<<24|m>>>8;r===0?r=f=1:(r=l^e[e[e[l^h]]],f^=e[e[f]])}}function l(e,t){var n=e.slice(0),s,u=1,f=n.length,l=f+6+1,c=r*l;for(var h=f;h<c;++h)s=n[h-1],h%f===0?(s=i[s>>>16&255]<<24^i[s>>>8&255]<<16^i[s&255]<<8^i[s>>>24]^o[u]<<24,u++):f>6&&h%f===4&&(s=i[s>>>24]<<24^i[s>>>16&255]<<16^i[s>>>8&255]<<8^i[s&255]),n[h]=n[h-f]^s;if(t){var p,d=a[0],v=a[1],m=a[2],g=a[3],y=n.slice(0);c=n.length;for(var h=0,b=c-r;h<c;h+=r,b-=r)if(h===0||h===c-r)y[h]=n[b],y[h+1]=n[b+3],y[h+2]=n[b+2],y[h+3]=n[b+1];else for(var w=0;w<r;++w)p=n[b+w],y[h+(3&-w)]=d[i[p>>>24]]^v[i[p>>>16&255]]^m[i[p>>>8&255]]^g[i[p&255]];n=y}return n}function c(e,t,n,r){var o=e.length/4-1,f,l,c,h,p;r?(f=a[0],l=a[1],c=a[2],h=a[3],p=s):(f=u[0],l=u[1],c=u[2],h=u[3],p=i);var d,v,m,g,y,b,w;d=t[0]^e[0],v=t[r?3:1]^e[1],m=t[2]^e[2],g=t[r?1:3]^e[3];var E=3;for(var S=1;S<o;++S)y=f[d>>>24]^l[v>>>16&255]^c[m>>>8&255]^h[g&255]^e[++E],b=f[v>>>24]^l[m>>>16&255]^c[g>>>8&255]^h[d&255]^e[++E],w=f[m>>>24]^l[g>>>16&255]^c[d>>>8&255]^h[v&255]^e[++E],g=f[g>>>24]^l[d>>>16&255]^c[v>>>8&255]^h[m&255]^e[++E],d=y,v=b,m=w;n[0]=p[d>>>24]<<24^p[v>>>16&255]<<16^p[m>>>8&255]<<8^p[g&255]^e[++E],n[r?3:1]=p[v>>>24]<<24^p[m>>>16&255]<<16^p[g>>>8&255]<<8^p[d&255]^e[++E],n[2]=p[m>>>24]<<24^p[g>>>16&255]<<16^p[d>>>8&255]<<8^p[v&255]^e[++E],n[r?1:3]=p[g>>>24]<<24^p[d>>>16&255]<<16^p[v>>>8&255]<<8^p[m&255]^e[++E]}function h(t){t=t||{};var n=(t.mode||"CBC").toUpperCase(),r="AES-"+n,i;t.decrypt?i=e.cipher.createDecipher(r,t.key):i=e.cipher.createCipher(r,t.key);var s=i.start;return i.start=function(t,n){var r=null;n instanceof e.util.ByteBuffer&&(r=n,n={}),n=n||{},n.output=r,n.iv=t,s.call(i,n)},i}e.aes=e.aes||{},e.aes.startEncrypting=function(e,t,n,r){var i=h({key:e,output:n,decrypt:!1,mode:r});return i.start(t),i},e.aes.createEncryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!1,mode:t})},e.aes.startDecrypting=function(e,t,n,r){var i=h({key:e,output:n,decrypt:!0,mode:r});return i.start(t),i},e.aes.createDecryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!0,mode:t})},e.aes.Algorithm=function(e,t){n||f();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(e,t){return c(r._w,e,t,!1)},decrypt:function(e,t){return c(r._w,e,t,!0)}}}),r._init=!1},e.aes.Algorithm.prototype.initialize=function(t){if(this._init)return;var n=t.key,r;if(typeof n!="string"||n.length!==16&&n.length!==24&&n.length!==32){if(e.util.isArray(n)&&(n.length===16||n.length===24||n.length===32)){r=n,n=e.util.createBuffer();for(var i=0;i<r.length;++i)n.putByte(r[i])}}else n=e.util.createBuffer(n);if(!e.util.isArray(n)){r=n,n=[];var s=r.length();if(s===16||s===24||s===32){s>>>=2;for(var i=0;i<s;++i)n.push(r.getInt32())}}if(!e.util.isArray(n)||n.length!==4&&n.length!==6&&n.length!==8)throw new Error("Invalid key parameter.");var o=this.mode.name,u=["CFB","OFB","CTR","GCM"].indexOf(o)!==-1;this._w=l(n,t.decrypt&&!u),this._init=!0},e.aes._expandKey=function(e,t){return n||f(),l(e,t)},e.aes._updateBlock=c,t("AES-ECB",e.cipher.modes.ecb),t("AES-CBC",e.cipher.modes.cbc),t("AES-CFB",e.cipher.modes.cfb),t("AES-OFB",e.cipher.modes.ofb),t("AES-CTR",e.cipher.modes.ctr),t("AES-GCM",e.cipher.modes.gcm);var n=!1,r=4,i,s,o,u,a}var r="aes";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/aes",["require","module","./cipher","./cipherModes","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){e.pki=e.pki||{};var t=e.pki.oids=e.oids=e.oids||{};t["1.2.840.113549.1.1.1"]="rsaEncryption",t.rsaEncryption="1.2.840.113549.1.1.1",t["1.2.840.113549.1.1.4"]="md5WithRSAEncryption",t.md5WithRSAEncryption="1.2.840.113549.1.1.4",t["1.2.840.113549.1.1.5"]="sha1WithRSAEncryption",t.sha1WithRSAEncryption="1.2.840.113549.1.1.5",t["1.2.840.113549.1.1.7"]="RSAES-OAEP",t["RSAES-OAEP"]="1.2.840.113549.1.1.7",t["1.2.840.113549.1.1.8"]="mgf1",t.mgf1="1.2.840.113549.1.1.8",t["1.2.840.113549.1.1.9"]="pSpecified",t.pSpecified="1.2.840.113549.1.1.9",t["1.2.840.113549.1.1.10"]="RSASSA-PSS",t["RSASSA-PSS"]="1.2.840.113549.1.1.10",t["1.2.840.113549.1.1.11"]="sha256WithRSAEncryption",t.sha256WithRSAEncryption="1.2.840.113549.1.1.11",t["1.2.840.113549.1.1.12"]="sha384WithRSAEncryption",t.sha384WithRSAEncryption="1.2.840.113549.1.1.12",t["1.2.840.113549.1.1.13"]="sha512WithRSAEncryption",t.sha512WithRSAEncryption="1.2.840.113549.1.1.13",t["1.3.14.3.2.7"]="desCBC",t.desCBC="1.3.14.3.2.7",t["1.3.14.3.2.26"]="sha1",t.sha1="1.3.14.3.2.26",t["2.16.840.1.101.3.4.2.1"]="sha256",t.sha256="2.16.840.1.101.3.4.2.1",t["2.16.840.1.101.3.4.2.2"]="sha384",t.sha384="2.16.840.1.101.3.4.2.2",t["2.16.840.1.101.3.4.2.3"]="sha512",t.sha512="2.16.840.1.101.3.4.2.3",t["1.2.840.113549.2.5"]="md5",t.md5="1.2.840.113549.2.5",t["1.2.840.113549.1.7.1"]="data",t.data="1.2.840.113549.1.7.1",t["1.2.840.113549.1.7.2"]="signedData",t.signedData="1.2.840.113549.1.7.2",t["1.2.840.113549.1.7.3"]="envelopedData",t.envelopedData="1.2.840.113549.1.7.3",t["1.2.840.113549.1.7.4"]="signedAndEnvelopedData",t.signedAndEnvelopedData="1.2.840.113549.1.7.4",t["1.2.840.113549.1.7.5"]="digestedData",t.digestedData="1.2.840.113549.1.7.5",t["1.2.840.113549.1.7.6"]="encryptedData",t.encryptedData="1.2.840.113549.1.7.6",t["1.2.840.113549.1.9.1"]="emailAddress",t.emailAddress="1.2.840.113549.1.9.1",t["1.2.840.113549.1.9.2"]="unstructuredName",t.unstructuredName="1.2.840.113549.1.9.2",t["1.2.840.113549.1.9.3"]="contentType",t.contentType="1.2.840.113549.1.9.3",t["1.2.840.113549.1.9.4"]="messageDigest",t.messageDigest="1.2.840.113549.1.9.4",t["1.2.840.113549.1.9.5"]="signingTime",t.signingTime="1.2.840.113549.1.9.5",t["1.2.840.113549.1.9.6"]="counterSignature",t.counterSignature="1.2.840.113549.1.9.6",t["1.2.840.113549.1.9.7"]="challengePassword",t.challengePassword="1.2.840.113549.1.9.7",t["1.2.840.113549.1.9.8"]="unstructuredAddress",t.unstructuredAddress="1.2.840.113549.1.9.8",t["1.2.840.113549.1.9.14"]="extensionRequest",t.extensionRequest="1.2.840.113549.1.9.14",t["1.2.840.113549.1.9.20"]="friendlyName",t.friendlyName="1.2.840.113549.1.9.20",t["1.2.840.113549.1.9.21"]="localKeyId",t.localKeyId="1.2.840.113549.1.9.21",t["1.2.840.113549.1.9.22.1"]="x509Certificate",t.x509Certificate="1.2.840.113549.1.9.22.1",t["1.2.840.113549.1.12.10.1.1"]="keyBag",t.keyBag="1.2.840.113549.1.12.10.1.1",t["1.2.840.113549.1.12.10.1.2"]="pkcs8ShroudedKeyBag",t.pkcs8ShroudedKeyBag="1.2.840.113549.1.12.10.1.2",t["1.2.840.113549.1.12.10.1.3"]="certBag",t.certBag="1.2.840.113549.1.12.10.1.3",t["1.2.840.113549.1.12.10.1.4"]="crlBag",t.crlBag="1.2.840.113549.1.12.10.1.4",t["1.2.840.113549.1.12.10.1.5"]="secretBag",t.secretBag="1.2.840.113549.1.12.10.1.5",t["1.2.840.113549.1.12.10.1.6"]="safeContentsBag",t.safeContentsBag="1.2.840.113549.1.12.10.1.6",t["1.2.840.113549.1.5.13"]="pkcs5PBES2",t.pkcs5PBES2="1.2.840.113549.1.5.13",t["1.2.840.113549.1.5.12"]="pkcs5PBKDF2",t.pkcs5PBKDF2="1.2.840.113549.1.5.12",t["1.2.840.113549.1.12.1.1"]="pbeWithSHAAnd128BitRC4",t.pbeWithSHAAnd128BitRC4="1.2.840.113549.1.12.1.1",t["1.2.840.113549.1.12.1.2"]="pbeWithSHAAnd40BitRC4",t.pbeWithSHAAnd40BitRC4="1.2.840.113549.1.12.1.2",t["1.2.840.113549.1.12.1.3"]="pbeWithSHAAnd3-KeyTripleDES-CBC",t["pbeWithSHAAnd3-KeyTripleDES-CBC"]="1.2.840.113549.1.12.1.3",t["1.2.840.113549.1.12.1.4"]="pbeWithSHAAnd2-KeyTripleDES-CBC",t["pbeWithSHAAnd2-KeyTripleDES-CBC"]="1.2.840.113549.1.12.1.4",t["1.2.840.113549.1.12.1.5"]="pbeWithSHAAnd128BitRC2-CBC",t["pbeWithSHAAnd128BitRC2-CBC"]="1.2.840.113549.1.12.1.5",t["1.2.840.113549.1.12.1.6"]="pbewithSHAAnd40BitRC2-CBC",t["pbewithSHAAnd40BitRC2-CBC"]="1.2.840.113549.1.12.1.6",t["1.2.840.113549.3.7"]="des-EDE3-CBC",t["des-EDE3-CBC"]="1.2.840.113549.3.7",t["2.16.840.1.101.3.4.1.2"]="aes128-CBC",t["aes128-CBC"]="2.16.840.1.101.3.4.1.2",t["2.16.840.1.101.3.4.1.22"]="aes192-CBC",t["aes192-CBC"]="2.16.840.1.101.3.4.1.22",t["2.16.840.1.101.3.4.1.42"]="aes256-CBC",t["aes256-CBC"]="2.16.840.1.101.3.4.1.42",t["2.5.4.3"]="commonName",t.commonName="2.5.4.3",t["2.5.4.5"]="serialName",t.serialName="2.5.4.5",t["2.5.4.6"]="countryName",t.countryName="2.5.4.6",t["2.5.4.7"]="localityName",t.localityName="2.5.4.7",t["2.5.4.8"]="stateOrProvinceName",t.stateOrProvinceName="2.5.4.8",t["2.5.4.10"]="organizationName",t.organizationName="2.5.4.10",t["2.5.4.11"]="organizationalUnitName",t.organizationalUnitName="2.5.4.11",t["2.16.840.1.113730.1.1"]="nsCertType",t.nsCertType="2.16.840.1.113730.1.1",t["2.5.29.1"]="authorityKeyIdentifier",t["2.5.29.2"]="keyAttributes",t["2.5.29.3"]="certificatePolicies",t["2.5.29.4"]="keyUsageRestriction",t["2.5.29.5"]="policyMapping",t["2.5.29.6"]="subtreesConstraint",t["2.5.29.7"]="subjectAltName",t["2.5.29.8"]="issuerAltName",t["2.5.29.9"]="subjectDirectoryAttributes",t["2.5.29.10"]="basicConstraints",t["2.5.29.11"]="nameConstraints",t["2.5.29.12"]="policyConstraints",t["2.5.29.13"]="basicConstraints",t["2.5.29.14"]="subjectKeyIdentifier",t.subjectKeyIdentifier="2.5.29.14",t["2.5.29.15"]="keyUsage",t.keyUsage="2.5.29.15",t["2.5.29.16"]="privateKeyUsagePeriod",t["2.5.29.17"]="subjectAltName",t.subjectAltName="2.5.29.17",t["2.5.29.18"]="issuerAltName",t.issuerAltName="2.5.29.18",t["2.5.29.19"]="basicConstraints",t.basicConstraints="2.5.29.19",t["2.5.29.20"]="cRLNumber",t["2.5.29.21"]="cRLReason",t["2.5.29.22"]="expirationDate",t["2.5.29.23"]="instructionCode",t["2.5.29.24"]="invalidityDate",t["2.5.29.25"]="cRLDistributionPoints",t["2.5.29.26"]="issuingDistributionPoint",t["2.5.29.27"]="deltaCRLIndicator",t["2.5.29.28"]="issuingDistributionPoint",t["2.5.29.29"]="certificateIssuer",t["2.5.29.30"]="nameConstraints",t["2.5.29.31"]="cRLDistributionPoints",t["2.5.29.32"]="certificatePolicies",t["2.5.29.33"]="policyMappings",t["2.5.29.34"]="policyConstraints",t["2.5.29.35"]="authorityKeyIdentifier",t["2.5.29.36"]="policyConstraints",t["2.5.29.37"]="extKeyUsage",t.extKeyUsage="2.5.29.37",t["2.5.29.46"]="freshestCRL",t["2.5.29.54"]="inhibitAnyPolicy",t["1.3.6.1.5.5.7.3.1"]="serverAuth",t.serverAuth="1.3.6.1.5.5.7.3.1",t["1.3.6.1.5.5.7.3.2"]="clientAuth",t.clientAuth="1.3.6.1.5.5.7.3.2",t["1.3.6.1.5.5.7.3.3"]="codeSigning",t.codeSigning="1.3.6.1.5.5.7.3.3",t["1.3.6.1.5.5.7.3.4"]="emailProtection",t.emailProtection="1.3.6.1.5.5.7.3.4",t["1.3.6.1.5.5.7.3.8"]="timeStamping",t.timeStamping="1.3.6.1.5.5.7.3.8"}var r="oids";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/oids",["require","module"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t=e.asn1=e.asn1||{};t.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},t.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},t.create=function(t,n,r,i){if(e.util.isArray(i)){var s=[];for(var o=0;o<i.length;++o)i[o]!==undefined&&s.push(i[o]);i=s}return{tagClass:t,type:n,constructed:r,composed:r||e.util.isArray(i),value:i}};var n=t.getBerValueLength=function(e){var t=e.getByte();if(t===128)return undefined;var n,r=t&128;return r?n=e.getInt((t&127)<<3):n=t,n};t.fromDer=function(r,i){i===undefined&&(i=!0),typeof r=="string"&&(r=e.util.createBuffer(r));if(r.length()<2){var s=new Error("Too few bytes to parse DER.");throw s.bytes=r.length(),s}var o=r.getByte(),u=o&192,a=o&31,f=n(r);if(r.length()<f){if(i){var s=new Error("Too few bytes to read ASN.1 value.");throw s.detail=r.length()+" < "+f,s}f=r.length()}var l,c=(o&32)===32,h=c;if(!h&&u===t.Class.UNIVERSAL&&a===t.Type.BITSTRING&&f>1){var p=r.read,d=r.getByte();if(d===0){o=r.getByte();var v=o&192;if(v===t.Class.UNIVERSAL||v===t.Class.CONTEXT_SPECIFIC)try{var m=n(r);h=m===f-(r.read-p),h&&(++p,--f)}catch(g){}}r.read=p}if(h){l=[];if(f===undefined)for(;;){if(r.bytes(2)===String.fromCharCode(0,0)){r.getBytes(2);break}l.push(t.fromDer(r,i))}else{var y=r.length();while(f>0)l.push(t.fromDer(r,i)),f-=y-r.length(),y=r.length()}}else{if(f===undefined){if(i)throw new Error("Non-constructed ASN.1 object of indefinite length.");f=r.length()}if(a===t.Type.BMPSTRING){l="";for(var b=0;b<f;b+=2)l+=String.fromCharCode(r.getInt16())}else l=r.getBytes(f)}return t.create(u,a,c,l)},t.toDer=function(n){var r=e.util.createBuffer(),i=n.tagClass|n.type,s=e.util.createBuffer();if(n.composed){n.constructed?i|=32:s.putByte(0);for(var o=0;o<n.value.length;++o)n.value[o]!==undefined&&s.putBuffer(t.toDer(n.value[o]))}else if(n.type===t.Type.BMPSTRING)for(var o=0;o<n.value.length;++o)s.putInt16(n.value.charCodeAt(o));else s.putBytes(n.value);r.putByte(i);if(s.length()<=127)r.putByte(s.length()&127);else{var u=s.length(),a="";do a+=String.fromCharCode(u&255),u>>>=8;while(u>0);r.putByte(a.length|128);for(var o=a.length-1;o>=0;--o)r.putByte(a.charCodeAt(o))}return r.putBuffer(s),r},t.oidToDer=function(t){var n=t.split("."),r=e.util.createBuffer();r.putByte(40*parseInt(n[0],10)+parseInt(n[1],10));var i,s,o,u;for(var a=2;a<n.length;++a){i=!0,s=[],o=parseInt(n[a],10);do u=o&127,o>>>=7,i||(u|=128),s.push(u),i=!1;while(o>0);for(var f=s.length-1;f>=0;--f)r.putByte(s[f])}return r},t.derToOid=function(t){var n;typeof t=="string"&&(t=e.util.createBuffer(t));var r=t.getByte();n=Math.floor(r/40)+"."+r%40;var i=0;while(t.length()>0)r=t.getByte(),i<<=7,r&128?i+=r&127:(n+="."+(i+r),i=0);return n},t.utcTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,2),10);n=n>=50?1900+n:2e3+n;var r=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),s=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),u=0;if(e.length>11){var a=e.charAt(10),f=10;a!=="+"&&a!=="-"&&(u=parseInt(e.substr(10,2),10),f+=2)}t.setUTCFullYear(n,r,i),t.setUTCHours(s,o,u,0);if(f){a=e.charAt(f);if(a==="+"||a==="-"){var l=parseInt(e.substr(f+1,2),10),c=parseInt(e.substr(f+4,2),10),h=l*60+c;h*=6e4,a==="+"?t.setTime(+t-h):t.setTime(+t+h)}}return t},t.generalizedTimeToDate=function(e){var t=new Date,n=parseInt(e.substr(0,4),10),r=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),o=parseInt(e.substr(10,2),10),u=parseInt(e.substr(12,2),10),a=0,f=0,l=!1;e.charAt(e.length-1)==="Z"&&(l=!0);var c=e.length-5,h=e.charAt(c);if(h==="+"||h==="-"){var p=parseInt(e.substr(c+1,2),10),d=parseInt(e.substr(c+4,2),10);f=p*60+d,f*=6e4,h==="+"&&(f*=-1),l=!0}return e.charAt(14)==="."&&(a=parseFloat(e.substr(14),10)*1e3),l?(t.setUTCFullYear(n,r,i),t.setUTCHours(s,o,u,a),t.setTime(+t+f)):(t.setFullYear(n,r,i),t.setHours(s,o,u,a)),t},t.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",n=[];n.push((""+e.getUTCFullYear()).substr(2)),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(t+="0"),t+=n[r];return t+="Z",t},t.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",n=[];n.push(""+e.getUTCFullYear()),n.push(""+(e.getUTCMonth()+1)),n.push(""+e.getUTCDate()),n.push(""+e.getUTCHours()),n.push(""+e.getUTCMinutes()),n.push(""+e.getUTCSeconds());for(var r=0;r<n.length;++r)n[r].length<2&&(t+="0"),t+=n[r];return t+="Z",t},t.integerToDer=function(t){var n=e.util.createBuffer();if(t>=-128&&t<128)return n.putSignedInt(t,8);if(t>=-32768&&t<32768)return n.putSignedInt(t,16);if(t>=-8388608&&t<8388608)return n.putSignedInt(t,24);if(t>=-2147483648&&t<2147483648)return n.putSignedInt(t,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=t,r},t.derToInteger=function(t){typeof t=="string"&&(t=e.util.createBuffer(t));var n=t.length()*8;if(n>32)throw new Error("Integer too large; max is 32-bits.");return t.getSignedInt(n)},t.validate=function(n,r,i,s){var o=!1;if(n.tagClass!==r.tagClass&&typeof r.tagClass!="undefined"||n.type!==r.type&&typeof r.type!="undefined")s&&(n.tagClass!==r.tagClass&&s.push("["+r.name+"] "+'Expected tag class "'+r.tagClass+'", got "'+n.tagClass+'"'),n.type!==r.type&&s.push("["+r.name+"] "+'Expected type "'+r.type+'", got "'+n.type+'"'));else if(n.constructed===r.constructed||typeof r.constructed=="undefined"){o=!0;if(r.value&&e.util.isArray(r.value)){var u=0;for(var a=0;o&&a<r.value.length;++a)o=r.value[a].optional||!1,n.value[u]&&(o=t.validate(n.value[u],r.value[a],i,s),o?++u:r.value[a].optional&&(o=!0)),!o&&s&&s.push("["+r.name+"] "+'Tag class "'+r.tagClass+'", type "'+r.type+'" expected value length "'+r.value.length+'", got "'+n.value.length+'"')}o&&i&&(r.capture&&(i[r.capture]=n.value),r.captureAsn1&&(i[r.captureAsn1]=n))}else s&&s.push("["+r.name+"] "+'Expected constructed "'+r.constructed+'", got "'+n.constructed+'"');return o};var r=/[^\\u0000-\\u00ff]/;t.prettyPrint=function(n,i,s){var o="";i=i||0,s=s||2,i>0&&(o+="\n");var u="";for(var a=0;a<i*s;++a)u+=" ";o+=u+"Tag: ";switch(n.tagClass){case t.Class.UNIVERSAL:o+="Universal:";break;case t.Class.APPLICATION:o+="Application:";break;case t.Class.CONTEXT_SPECIFIC:o+="Context-Specific:";break;case t.Class.PRIVATE:o+="Private:"}if(n.tagClass===t.Class.UNIVERSAL){o+=n.type;switch(n.type){case t.Type.NONE:o+=" (None)";break;case t.Type.BOOLEAN:o+=" (Boolean)";break;case t.Type.BITSTRING:o+=" (Bit string)";break;case t.Type.INTEGER:o+=" (Integer)";break;case t.Type.OCTETSTRING:o+=" (Octet string)";break;case t.Type.NULL:o+=" (Null)";break;case t.Type.OID:o+=" (Object Identifier)";break;case t.Type.ODESC:o+=" (Object Descriptor)";break;case t.Type.EXTERNAL:o+=" (External or Instance of)";break;case t.Type.REAL:o+=" (Real)";break;case t.Type.ENUMERATED:o+=" (Enumerated)";break;case t.Type.EMBEDDED:o+=" (Embedded PDV)";break;case t.Type.UTF8:o+=" (UTF8)";break;case t.Type.ROID:o+=" (Relative Object Identifier)";break;case t.Type.SEQUENCE:o+=" (Sequence)";break;case t.Type.SET:o+=" (Set)";break;case t.Type.PRINTABLESTRING:o+=" (Printable String)";break;case t.Type.IA5String:o+=" (IA5String (ASCII))";break;case t.Type.UTCTIME:o+=" (UTC time)";break;case t.Type.GENERALIZEDTIME:o+=" (Generalized time)";break;case t.Type.BMPSTRING:o+=" (BMP String)"}}else o+=n.type;o+="\n",o+=u+"Constructed: "+n.constructed+"\n";if(n.composed){var f=0,l="";for(var a=0;a<n.value.length;++a)n.value[a]!==undefined&&(f+=1,l+=t.prettyPrint(n.value[a],i+1,s),a+1<n.value.length&&(l+=","));o+=u+"Sub values: "+f+l}else{o+=u+"Value: ";if(n.type===t.Type.OID){var c=t.derToOid(n.value);o+=c,e.pki&&e.pki.oids&&c in e.pki.oids&&(o+=" ("+e.pki.oids[c]+") ")}if(n.type===t.Type.INTEGER)try{o+=t.derToInteger(n.value)}catch(h){o+="0x"+e.util.bytesToHex(n.value)}else n.type===t.Type.OCTETSTRING?(r.test(n.value)||(o+="("+n.value+") "),o+="0x"+e.util.bytesToHex(n.value)):n.type===t.Type.UTF8?o+=e.util.decodeUtf8(n.value):n.type===t.Type.PRINTABLESTRING||n.type===t.Type.IA5String?o+=n.value:r.test(n.value)?o+="0x"+e.util.bytesToHex(n.value):n.value.length===0?o+="[null]":o+=n.value}return o}}var r="asn1";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/asn1",["require","module","./util","./oids"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function u(){n=String.fromCharCode(128),n+=e.util.fillString(String.fromCharCode(0),64),r=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],i=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],s=new Array(64);for(var t=0;t<64;++t)s[t]=Math.floor(Math.abs(Math.sin(t+1))*4294967296);o=!0}function a(e,t,n){var o,u,a,f,l,c,h,p,d=n.length();while(d>=64){u=e.h0,a=e.h1,f=e.h2,l=e.h3;for(p=0;p<16;++p)t[p]=n.getInt32Le(),c=l^a&(f^l),o=u+c+s[p]+t[p],h=i[p],u=l,l=f,f=a,a+=o<<h|o>>>32-h;for(;p<32;++p)c=f^l&(a^f),o=u+c+s[p]+t[r[p]],h=i[p],u=l,l=f,f=a,a+=o<<h|o>>>32-h;for(;p<48;++p)c=a^f^l,o=u+c+s[p]+t[r[p]],h=i[p],u=l,l=f,f=a,a+=o<<h|o>>>32-h;for(;p<64;++p)c=f^(a|~l),o=u+c+s[p]+t[r[p]],h=i[p],u=l,l=f,f=a,a+=o<<h|o>>>32-h;e.h0=e.h0+u|0,e.h1=e.h1+a|0,e.h2=e.h2+f|0,e.h3=e.h3+l|0,d-=64}}var t=e.md5=e.md5||{};e.md=e.md||{},e.md.algorithms=e.md.algorithms||{},e.md.md5=e.md.algorithms.md5=t,t.create=function(){o||u();var t=null,r=e.util.createBuffer(),i=new Array(16),s={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,messageLength64:[0,0]};return s.start=function(){return s.messageLength=0,s.messageLength64=[0,0],r=e.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},s},s.start(),s.update=function(n,o){return o==="utf8"&&(n=e.util.encodeUtf8(n)),s.messageLength+=n.length,s.messageLength64[0]+=n.length/4294967296>>>0,s.messageLength64[1]+=n.length>>>0,r.putBytes(n),a(t,i,r),(r.read>2048||r.length()===0)&&r.compact(),s},s.digest=function(){var o=e.util.createBuffer();o.putBytes(r.bytes()),o.putBytes(n.substr(0,64-(s.messageLength64[1]+8&63))),o.putInt32Le(s.messageLength64[1]<<3),o.putInt32Le(s.messageLength64[0]<<3|s.messageLength64[0]>>>28);var u={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3};a(u,i,o);var f=e.util.createBuffer();return f.putInt32Le(u.h0),f.putInt32Le(u.h1),f.putInt32Le(u.h2),f.putInt32Le(u.h3),f},s};var n=null,r=null,i=null,s=null,o=!1}var r="md5";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/md5",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function i(){n=String.fromCharCode(128),n+=e.util.fillString(String.fromCharCode(0),64),r=!0}function s(e,t,n){var r,i,s,o,u,a,f,l,c=n.length();while(c>=64){i=e.h0,s=e.h1,o=e.h2,u=e.h3,a=e.h4;for(l=0;l<16;++l)r=n.getInt32(),t[l]=r,f=u^s&(o^u),r=(i<<5|i>>>27)+f+a+1518500249+r,a=u,u=o,o=s<<30|s>>>2,s=i,i=r;for(;l<20;++l)r=t[l-3]^t[l-8]^t[l-14]^t[l-16],r=r<<1|r>>>31,t[l]=r,f=u^s&(o^u),r=(i<<5|i>>>27)+f+a+1518500249+r,a=u,u=o,o=s<<30|s>>>2,s=i,i=r;for(;l<32;++l)r=t[l-3]^t[l-8]^t[l-14]^t[l-16],r=r<<1|r>>>31,t[l]=r,f=s^o^u,r=(i<<5|i>>>27)+f+a+1859775393+r,a=u,u=o,o=s<<30|s>>>2,s=i,i=r;for(;l<40;++l)r=t[l-6]^t[l-16]^t[l-28]^t[l-32],r=r<<2|r>>>30,t[l]=r,f=s^o^u,r=(i<<5|i>>>27)+f+a+1859775393+r,a=u,u=o,o=s<<30|s>>>2,s=i,i=r;for(;l<60;++l)r=t[l-6]^t[l-16]^t[l-28]^t[l-32],r=r<<2|r>>>30,t[l]=r,f=s&o|u&(s^o),r=(i<<5|i>>>27)+f+a+2400959708+r,a=u,u=o,o=s<<30|s>>>2,s=i,i=r;for(;l<80;++l)r=t[l-6]^t[l-16]^t[l-28]^t[l-32],r=r<<2|r>>>30,t[l]=r,f=s^o^u,r=(i<<5|i>>>27)+f+a+3395469782+r,a=u,u=o,o=s<<30|s>>>2,s=i,i=r;e.h0=e.h0+i|0,e.h1=e.h1+s|0,e.h2=e.h2+o|0,e.h3=e.h3+u|0,e.h4=e.h4+a|0,c-=64}}var t=e.sha1=e.sha1||{};e.md=e.md||{},e.md.algorithms=e.md.algorithms||{},e.md.sha1=e.md.algorithms.sha1=t,t.create=function(){r||i();var t=null,o=e.util.createBuffer(),u=new Array(80),a={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,messageLength64:[0,0]};return a.start=function(){return a.messageLength=0,a.messageLength64=[0,0],o=e.util.createBuffer(),t={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},a},a.start(),a.update=function(n,r){return r==="utf8"&&(n=e.util.encodeUtf8(n)),a.messageLength+=n.length,a.messageLength64[0]+=n.length/4294967296>>>0,a.messageLength64[1]+=n.length>>>0,o.putBytes(n),s(t,u,o),(o.read>2048||o.length()===0)&&o.compact(),a},a.digest=function(){var r=e.util.createBuffer();r.putBytes(o.bytes()),r.putBytes(n.substr(0,64-(a.messageLength64[1]+8&63))),r.putInt32(a.messageLength64[0]<<3|a.messageLength64[0]>>>28),r.putInt32(a.messageLength64[1]<<3);var i={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4};s(i,u,r);var f=e.util.createBuffer();return f.putInt32(i.h0),f.putInt32(i.h1),f.putInt32(i.h2),f.putInt32(i.h3),f.putInt32(i.h4),f},a};var n=null,r=!1}var r="sha1";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/sha1",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function s(){n=String.fromCharCode(128),n+=e.util.fillString(String.fromCharCode(0),64),i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=!0}function o(e,t,n){var r,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b=n.length();while(b>=64){for(l=0;l<16;++l)t[l]=n.getInt32();for(;l<64;++l)r=t[l-2],r=(r>>>17|r<<15)^(r>>>19|r<<13)^r>>>10,s=t[l-15],s=(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3,t[l]=r+t[l-7]+s+t[l-16]|0;c=e.h0,h=e.h1,p=e.h2,d=e.h3,v=e.h4,m=e.h5,g=e.h6,y=e.h7;for(l=0;l<64;++l)u=(v>>>6|v<<26)^(v>>>11|v<<21)^(v>>>25|v<<7),a=g^v&(m^g),o=(c>>>2|c<<30)^(c>>>13|c<<19)^(c>>>22|c<<10),f=c&h|p&(c^h),r=y+u+a+i[l]+t[l],s=o+f,y=g,g=m,m=v,v=d+r|0,d=p,p=h,h=c,c=r+s|0;e.h0=e.h0+c|0,e.h1=e.h1+h|0,e.h2=e.h2+p|0,e.h3=e.h3+d|0,e.h4=e.h4+v|0,e.h5=e.h5+m|0,e.h6=e.h6+g|0,e.h7=e.h7+y|0,b-=64}}var t=e.sha256=e.sha256||{};e.md=e.md||{},e.md.algorithms=e.md.algorithms||{},e.md.sha256=e.md.algorithms.sha256=t,t.create=function(){r||s();var t=null,i=e.util.createBuffer(),u=new Array(64),a={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,messageLength64:[0,0]};return a.start=function(){return a.messageLength=0,a.messageLength64=[0,0],i=e.util.createBuffer(),t={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},a},a.start(),a.update=function(n,r){return r==="utf8"&&(n=e.util.encodeUtf8(n)),a.messageLength+=n.length,a.messageLength64[0]+=n.length/4294967296>>>0,a.messageLength64[1]+=n.length>>>0,i.putBytes(n),o(t,u,i),(i.read>2048||i.length()===0)&&i.compact(),a},a.digest=function(){var r=e.util.createBuffer();r.putBytes(i.bytes()),r.putBytes(n.substr(0,64-(a.messageLength64[1]+8&63))),r.putInt32(a.messageLength64[0]<<3|a.messageLength64[0]>>>28),r.putInt32(a.messageLength64[1]<<3);var s={h0:t.h0,h1:t.h1,h2:t.h2,h3:t.h3,h4:t.h4,h5:t.h5,h6:t.h6,h7:t.h7};o(s,u,r);var f=e.util.createBuffer();return f.putInt32(s.h0),f.putInt32(s.h1),f.putInt32(s.h2),f.putInt32(s.h3),f.putInt32(s.h4),f.putInt32(s.h5),f.putInt32(s.h6),f.putInt32(s.h7),f},a};var n=null,r=!1,i=null}var r="sha256";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/sha256",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function u(){r=String.fromCharCode(128),r+=e.util.fillString(String.fromCharCode(0),128),s=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],o={},o["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],o["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],o["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],o["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],i=!0}function a(e,t,n){var r,i,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I=n.length();while(I>=128){for(_=0;_<16;++_)t[_][0]=n.getInt32()>>>0,t[_][1]=n.getInt32()>>>0;for(;_<80;++_)H=t[_-2],D=H[0],P=H[1],r=((D>>>19|P<<13)^(P>>>29|D<<3)^D>>>6)>>>0,i=((D<<13|P>>>19)^(P<<3|D>>>29)^(D<<26|P>>>6))>>>0,j=t[_-15],D=j[0],P=j[1],o=((D>>>1|P<<31)^(D>>>8|P<<24)^D>>>7)>>>0,u=((D<<31|P>>>1)^(D<<24|P>>>8)^(D<<25|P>>>7))>>>0,B=t[_-7],F=t[_-16],P=i+B[1]+u+F[1],t[_][0]=r+B[0]+o+F[0]+(P/4294967296>>>0)>>>0,t[_][1]=P>>>0;m=e[0][0],g=e[0][1],y=e[1][0],b=e[1][1],w=e[2][0],E=e[2][1],S=e[3][0],x=e[3][1],T=e[4][0],N=e[4][1],C=e[5][0],k=e[5][1],L=e[6][0],A=e[6][1],O=e[7][0],M=e[7][1];for(_=0;_<80;++_)l=((T>>>14|N<<18)^(T>>>18|N<<14)^(N>>>9|T<<23))>>>0,c=((T<<18|N>>>14)^(T<<14|N>>>18)^(N<<23|T>>>9))>>>0,h=(L^T&(C^L))>>>0,p=(A^N&(k^A))>>>0,a=((m>>>28|g<<4)^(g>>>2|m<<30)^(g>>>7|m<<25))>>>0,f=((m<<4|g>>>28)^(g<<30|m>>>2)^(g<<25|m>>>7))>>>0,d=(m&y|w&(m^y))>>>0,v=(g&b|E&(g^b))>>>0,P=M+c+p+s[_][1]+t[_][1],r=O+l+h+s[_][0]+t[_][0]+(P/4294967296>>>0)>>>0,i=P>>>0,P=f+v,o=a+d+(P/4294967296>>>0)>>>0,u=P>>>0,O=L,M=A,L=C,A=k,C=T,k=N,P=x+i,T=S+r+(P/4294967296>>>0)>>>0,N=P>>>0,S=w,x=E,w=y,E=b,y=m,b=g,P=i+u,m=r+o+(P/4294967296>>>0)>>>0,g=P>>>0;P=e[0][1]+g,e[0][0]=e[0][0]+m+(P/4294967296>>>0)>>>0,e[0][1]=P>>>0,P=e[1][1]+b,e[1][0]=e[1][0]+y+(P/4294967296>>>0)>>>0,e[1][1]=P>>>0,P=e[2][1]+E,e[2][0]=e[2][0]+w+(P/4294967296>>>0)>>>0,e[2][1]=P>>>0,P=e[3][1]+x,e[3][0]=e[3][0]+S+(P/4294967296>>>0)>>>0,e[3][1]=P>>>0,P=e[4][1]+N,e[4][0]=e[4][0]+T+(P/4294967296>>>0)>>>0,e[4][1]=P>>>0,P=e[5][1]+k,e[5][0]=e[5][0]+C+(P/4294967296>>>0)>>>0,e[5][1]=P>>>0,P=e[6][1]+A,e[6][0]=e[6][0]+L+(P/4294967296>>>0)>>>0,e[6][1]=P>>>0,P=e[7][1]+M,e[7][0]=e[7][0]+O+(P/4294967296>>>0)>>>0,e[7][1]=P>>>0,I-=128}}var t=e.sha512=e.sha512||{};e.md=e.md||{},e.md.algorithms=e.md.algorithms||{},e.md.sha512=e.md.algorithms.sha512=t;var n=e.sha384=e.sha512.sha384=e.sha512.sha384||{};n.create=function(){return t.create("SHA-384")},e.md.sha384=e.md.algorithms.sha384=n,e.sha512.sha256=e.sha512.sha256||{create:function(){return t.create("SHA-512/256")}},e.md["sha512/256"]=e.md.algorithms["sha512/256"]=e.sha512.sha256,e.sha512.sha224=e.sha512.sha224||{create:function(){return t.create("SHA-512/224")}},e.md["sha512/224"]=e.md.algorithms["sha512/224"]=e.sha512.sha224,t.create=function(t){i||u(),typeof t=="undefined"&&(t="SHA-512");if(t in o){var n=o[t],s=null,f=e.util.createBuffer(),l=new Array(80);for(var c=0;c<80;++c)l[c]=new Array(2);var h={algorithm:t.replace("-","").toLowerCase(),blockLength:128,digestLength:64,messageLength:0,messageLength128:[0,0,0,0]};return h.start=function(){h.messageLength=0,h.messageLength128=[0,0,0,0],f=e.util.createBuffer(),s=new Array(n.length);for(var t=0;t<n.length;++t)s[t]=n[t].slice(0);return h},h.start(),h.update=function(t,n){n==="utf8"&&(t=e.util.encodeUtf8(t)),h.messageLength+=t.length;var r=t.length;r=[r/4294967296>>>0,r>>>0];for(var i=3;i>=0;--i)h.messageLength128[i]+=r[1],r[1]=r[0]+(h.messageLength128[i]/4294967296>>>0),h.messageLength128[i]=h.messageLength128[i]>>>0,r[0]=r[1]/4294967296>>>0;return f.putBytes(t),a(s,l,f),(f.read>2048||f.length()===0)&&f.compact(),h},h.digest=function(){var n=e.util.createBuffer();n.putBytes(f.bytes()),n.putBytes(r.substr(0,128-(h.messageLength128[3]+16&127)));var i=[];for(var o=0;o<3;++o)i[o]=h.messageLength128[o]<<3|h.messageLength128[o-1]>>>28;i[3]=h.messageLength128[3]<<3,n.putInt32(i[0]),n.putInt32(i[1]),n.putInt32(i[2]),n.putInt32(i[3]);var u=new Array(s.length);for(var o=0;o<s.length;++o)u[o]=s[o].slice(0);a(u,l,n);var c=e.util.createBuffer(),p;t==="SHA-512"?p=u.length:t==="SHA-384"?p=u.length-2:p=u.length-4;for(var o=0;o<p;++o)c.putInt32(u[o][0]),(o!==p-1||t!=="SHA-512/224")&&c.putInt32(u[o][1]);return c},h}throw new Error("Invalid SHA-512 algorithm: "+t)};var r=null,i=!1,s=null,o=null}var r="sha512";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/sha512",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){e.md=e.md||{},e.md.algorithms={md5:e.md5,sha1:e.sha1,sha256:e.sha256},e.md.md5=e.md5,e.md.sha1=e.sha1,e.md.sha256=e.sha256}var r="md";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/md",["require","module","./md5","./sha1","./sha256","./sha512"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t=e.hmac=e.hmac||{};t.create=function(){var t=null,n=null,r=null,i=null,s={};return s.start=function(s,o){if(s!==null)if(typeof s=="string"){s=s.toLowerCase();if(!(s in e.md.algorithms))throw new Error('Unknown hash algorithm "'+s+'"');n=e.md.algorithms[s].create()}else n=s;if(o===null)o=t;else{if(typeof o=="string")o=e.util.createBuffer(o);else if(e.util.isArray(o)){var u=o;o=e.util.createBuffer();for(var a=0;a<u.length;++a)o.putByte(u[a])}var f=o.length();f>n.blockLength&&(n.start(),n.update(o.bytes()),o=n.digest()),r=e.util.createBuffer(),i=e.util.createBuffer(),f=o.length();for(var a=0;a<f;++a){var u=o.at(a);r.putByte(54^u),i.putByte(92^u)}if(f<n.blockLength){var u=n.blockLength-f;for(var a=0;a<u;++a)r.putByte(54),i.putByte(92)}t=o,r=r.bytes(),i=i.bytes()}n.start(),n.update(r)},s.update=function(e){n.update(e)},s.getMac=function(){var e=n.digest().bytes();return n.start(),n.update(i),n.update(e),n.digest()},s.digest=s.getMac,s}}var r="hmac";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/hmac",["require","module","./md","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function n(e){var t=e.name+": ",n=[],r=function(e,t){return" "+t};for(var i=0;i<e.values.length;++i)n.push(e.values[i].replace(/^(\S+\r\n)/,r));t+=n.join(",")+"\r\n";var s=0,o=-1;for(var i=0;i<t.length;++i,++s)if(s>65&&o!==-1){var u=t[o];u===","?(++o,t=t.substr(0,o)+"\r\n "+t.substr(o)):t=t.substr(0,o)+"\r\n"+u+t.substr(o+1),s=i-o-1,o=-1,++i}else if(t[i]===" "||t[i]===" "||t[i]===",")o=i;return t}function r(e){return e.replace(/^\s+/,"")}var t=e.pem=e.pem||{};t.encode=function(t,r){r=r||{};var i="-----BEGIN "+t.type+"-----\r\n",s;t.procType&&(s={name:"Proc-Type",values:[String(t.procType.version),t.procType.type]},i+=n(s)),t.contentDomain&&(s={name:"Content-Domain",values:[t.contentDomain]},i+=n(s)),t.dekInfo&&(s={name:"DEK-Info",values:[t.dekInfo.algorithm]},t.dekInfo.parameters&&s.values.push(t.dekInfo.parameters),i+=n(s));if(t.headers)for(var o=0;o<t.headers.length;++o)i+=n(t.headers[o]);return t.procType&&(i+="\r\n"),i+=e.util.encode64(t.body,r.maxline||64)+"\r\n",i+="-----END "+t.type+"-----\r\n",i},t.decode=function(t){var n=[],i=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,s=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,o=/\r?\n/,u;for(;;){u=i.exec(t);if(!u)break;var a={type:u[1],procType:null,contentDomain:null,dekInfo:null,headers:[],body:e.util.decode64(u[3])};n.push(a);if(!u[2])continue;var f=u[2].split(o),l=0;while(u&&l<f.length){var c=f[l].replace(/\s+$/,"");for(var h=l+1;h<f.length;++h){var p=f[h];if(!/\s/.test(p[0]))break;c+=p,l=h}u=c.match(s);if(u){var d={name:u[1],values:[]},v=u[2].split(",");for(var m=0;m<v.length;++m)d.values.push(r(v[m]));if(!a.procType){if(d.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(d.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');a.procType={version:v[0],type:v[1]}}else if(!a.contentDomain&&d.name==="Content-Domain")a.contentDomain=v[0]||"";else if(!a.dekInfo&&d.name==="DEK-Info"){if(d.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');a.dekInfo={algorithm:v[0],parameters:v[1]||null}}else a.headers.push(d)}++l}if(a.procType==="ENCRYPTED"&&!a.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}if(n.length===0)throw new Error("Invalid PEM formatted message.");return n}}var r="pem";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pem",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function t(t,n){var r=function(){return new e.des.Algorithm(t,n)};e.cipher.registerAlgorithm(t,r)}function l(e){var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],n=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],r=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],i=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],o=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],u=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],a=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],f=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],l=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],c=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],h=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],p=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],d=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],v=e.length()>8?3:1,m=[],g=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],y=0,b;for(var w=0;w<v;w++){var E=e.getInt32(),S=e.getInt32();b=(E>>>4^S)&252645135,S^=b,E^=b<<4,b=(S>>>-16^E)&65535,E^=b,S^=b<<-16,b=(E>>>2^S)&858993459,S^=b,E^=b<<2,b=(S>>>-16^E)&65535,E^=b,S^=b<<-16,b=(E>>>1^S)&1431655765,S^=b,E^=b<<1,b=(S>>>8^E)&16711935,E^=b,S^=b<<8,b=(E>>>1^S)&1431655765,S^=b,E^=b<<1,b=E<<8|S>>>20&240,E=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=b;for(var x=0;x<g.length;++x){g[x]?(E=E<<2|E>>>26,S=S<<2|S>>>26):(E=E<<1|E>>>27,S=S<<1|S>>>27),E&=-15,S&=-15;var T=t[E>>>28]|n[E>>>24&15]|r[E>>>20&15]|i[E>>>16&15]|s[E>>>12&15]|o[E>>>8&15]|u[E>>>4&15],N=a[S>>>28]|f[S>>>24&15]|l[S>>>20&15]|c[S>>>16&15]|h[S>>>12&15]|p[S>>>8&15]|d[S>>>4&15];b=(N>>>16^T)&65535,m[y++]=T^b,m[y++]=N^b<<16}}return m}function c(e,t,l,c){var h=e.length===32?3:9,p;h===3?p=c?[30,-2,-2]:[0,32,2]:p=c?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var d,v=t[0],m=t[1];d=(v>>>4^m)&252645135,m^=d,v^=d<<4,d=(v>>>16^m)&65535,m^=d,v^=d<<16,d=(m>>>2^v)&858993459,v^=d,m^=d<<2,d=(m>>>8^v)&16711935,v^=d,m^=d<<8,d=(v>>>1^m)&1431655765,m^=d,v^=d<<1,v=v<<1|v>>>31,m=m<<1|m>>>31;for(var g=0;g<h;g+=3){var y=p[g+1],b=p[g+2];for(var w=p[g];w!=y;w+=b){var E=m^e[w],S=(m>>>4|m<<28)^e[w+1];d=v,v=m,m=d^(r[E>>>24&63]|s[E>>>16&63]|u[E>>>8&63]|f[E&63]|n[S>>>24&63]|i[S>>>16&63]|o[S>>>8&63]|a[S&63])}d=v,v=m,m=d}v=v>>>1|v<<31,m=m>>>1|m<<31,d=(v>>>1^m)&1431655765,m^=d,v^=d<<1,d=(m>>>8^v)&16711935,v^=d,m^=d<<8,d=(m>>>2^v)&858993459,v^=d,m^=d<<2,d=(v>>>16^m)&65535,m^=d,v^=d<<16,d=(v>>>4^m)&252645135,m^=d,v^=d<<4,l[0]=v,l[1]=m}function h(t){t=t||{};var n=(t.mode||"CBC").toUpperCase(),r="DES-"+n,i;t.decrypt?i=e.cipher.createDecipher(r,t.key):i=e.cipher.createCipher(r,t.key);var s=i.start;return i.start=function(t,n){var r=null;n instanceof e.util.ByteBuffer&&(r=n,n={}),n=n||{},n.output=r,n.iv=t,s.call(i,n)},i}e.des=e.des||{},e.des.startEncrypting=function(e,t,n,r){var i=h({key:e,output:n,decrypt:!1,mode:r||(t===null?"ECB":"CBC")});return i.start(t),i},e.des.createEncryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!1,mode:t})},e.des.startDecrypting=function(e,t,n,r){var i=h({key:e,output:n,decrypt:!0,mode:r||(t===null?"ECB":"CBC")});return i.start(t),i},e.des.createDecryptionCipher=function(e,t){return h({key:e,output:null,decrypt:!0,mode:t})},e.des.Algorithm=function(e,t){var n=this;n.name=e,n.mode=new t({blockSize:8,cipher:{encrypt:function(e,t){return c(n._keys,e,t,!1)},decrypt:function(e,t){return c(n._keys,e,t,!0)}}}),n._init=!1},e.des.Algorithm.prototype.initialize=function(t){if(this._init)return;var n=e.util.createBuffer(t.key);if(this.name.indexOf("3DES")===0&&n.length()!==24)throw new Error("Invalid Triple-DES key size: "+n.length()*8);this._keys=l(n),this._init=!0},t("DES-ECB",e.cipher.modes.ecb),t("DES-CBC",e.cipher.modes.cbc),t("DES-CFB",e.cipher.modes.cfb),t("DES-OFB",e.cipher.modes.ofb),t("DES-CTR",e.cipher.modes.ctr),t("3DES-ECB",e.cipher.modes.ecb),t("3DES-CBC",e.cipher.modes.cbc),t("3DES-CFB",e.cipher.modes.cfb),t("3DES-OFB",e.cipher.modes.ofb),t("3DES-CTR",e.cipher.modes.ctr);var n=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],r=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],i=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],s=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],o=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],u=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],a=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],f=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696]}var r="des";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/des",["require","module","./cipher","./cipherModes","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var n=e.pkcs5=e.pkcs5||{},r=typeof process!="undefined"&&process.versions&&process.versions.node,i;r&&!e.disableNativeCode&&(i=t("crypto")),e.pbkdf2=n.pbkdf2=function(t,n,s,o,u,a){function w(){if(y>c)return a(null,d);p.start(null,null),p.update(n),p.update(e.util.int32ToBytes(y)),v=g=p.digest().getBytes(),b=2,E()}function E(){if(b<=s)return p.start(null,null),p.update(g),m=p.digest().getBytes(),v=e.util.xorBytes(v,m,f),g=m,++b,e.util.setImmediate(E);d+=y<c?v:v.substr(0,h),++y,w()}typeof u=="function"&&(a=u,u=null);if(r&&!e.disableNativeCode&&i.pbkdf2&&(u===null||typeof u!="object")&&(i.pbkdf2Sync.length>4||!u||u==="sha1"))return typeof u!="string"&&(u="sha1"),n=new Buffer(n,"binary"),a?i.pbkdf2Sync.length===4?i.pbkdf2(t,n,s,o,function(e,t){if(e)return a(e);a(null,t.toString("binary"))}):i.pbkdf2(t,n,s,o,u,function(e,t){if(e)return a(e);a(null,t.toString("binary"))}):i.pbkdf2Sync.length===4?i.pbkdf2Sync(t,n,s,o).toString("binary"):i.pbkdf2Sync(t,n,s,o,u).toString("binary");if(typeof u=="undefined"||u===null)u=e.md.sha1.create();if(typeof u=="string"){if(!(u in e.md.algorithms))throw new Error("Unknown hash algorithm: "+u);u=e.md[u].create()}var f=u.digestLength;if(o>4294967295*f){var l=new Error("Derived key is too long.");if(a)return a(l);throw l}var c=Math.ceil(o/f),h=o-(c-1)*f,p=e.hmac.create();p.start(u,t);var d="",v,m,g;if(!a){for(var y=1;y<=c;++y){p.start(null,null),p.update(n),p.update(e.util.int32ToBytes(y)),v=g=p.digest().getBytes();for(var b=2;b<=s;++b)p.start(null,null),p.update(g),m=p.digest().getBytes(),v=e.util.xorBytes(v,m,f),g=m;d+=y<c?v:v.substr(0,h)}return d}var y=1,b;w()}}var r="pbkdf2";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pbkdf2",["require","module","./hmac","./md","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var n=typeof process!="undefined"&&process.versions&&process.versions.node,r=null;!e.disableNativeCode&&n&&!process.versions["node-webkit"]&&(r=t("crypto"));var i=e.prng=e.prng||{};i.create=function(t){function u(e){if(n.pools[0].messageLength>=32)return f(),e();var t=32-n.pools[0].messageLength<<5;n.seedFile(t,function(t,r){if(t)return e(t);n.collect(r),f(),e()})}function a(){if(n.pools[0].messageLength>=32)return f();var e=32-n.pools[0].messageLength<<5;n.collect(n.seedFileSync(e)),f()}function f(){var e=n.plugin.md.create();e.update(n.pools[0].digest().getBytes()),n.pools[0].start();var t=1;for(var r=1;r<32;++r)t=t===31?2147483648:t<<2,t%n.reseeds===0&&(e.update(n.pools[r].digest().getBytes()),n.pools[r].start());var i=e.digest().getBytes();e.start(),e.update(i);var s=e.digest().getBytes();n.key=n.plugin.formatKey(i),n.seed=n.plugin.formatSeed(s),n.reseeds=n.reseeds===4294967295?0:n.reseeds+1,n.generated=0}function l(t){var n=null;if(typeof window!="undefined"){var r=window.crypto||window.msCrypto;r&&r.getRandomValues&&(n=function(e){return r.getRandomValues(e)})}var i=e.util.createBuffer();if(n)while(i.length()<t){var s=Math.max(1,Math.min(t-i.length(),65536)/4),o=new Uint32Array(Math.floor(s));try{n(o);for(var u=0;u<o.length;++u)i.putInt32(o[u])}catch(a){if(!(typeof QuotaExceededError!="undefined"&&a instanceof QuotaExceededError))throw a}}if(i.length()<t){var f,l,c,h=Math.floor(Math.random()*65536);while(i.length()<t){l=16807*(h&65535),f=16807*(h>>16),l+=(f&32767)<<16,l+=f>>15,l=(l&2147483647)+(l>>31),h=l&4294967295;for(var u=0;u<3;++u)c=h>>>(u<<3),c^=Math.floor(Math.random()*256),i.putByte(String.fromCharCode(c&255))}}return i.getBytes(t)}var n={plugin:t,key:null,seed:null,time:null,reseeds:0,generated:0},i=t.md,s=new Array(32);for(var o=0;o<32;++o)s[o]=i.create();return n.pools=s,n.pool=0,n.generate=function(t,r){function l(c){if(c)return r(c);if(f.length()>=t)return r(null,f.getBytes(t));n.generated>1048575&&(n.key=null);if(n.key===null)return e.util.nextTick(function(){u(l)});var h=i(n.key,n.seed);n.generated+=h.length,f.putBytes(h),n.key=o(i(n.key,s(n.seed))),n.seed=a(i(n.key,n.seed)),e.util.setImmediate(l)}if(!r)return n.generateSync(t);var i=n.plugin.cipher,s=n.plugin.increment,o=n.plugin.formatKey,a=n.plugin.formatSeed,f=e.util.createBuffer();n.key=null,l()},n.generateSync=function(t){var r=n.plugin.cipher,i=n.plugin.increment,s=n.plugin.formatKey,o=n.plugin.formatSeed;n.key=null;var u=e.util.createBuffer();while(u.length()<t){n.generated>1048575&&(n.key=null),n.key===null&&a();var f=r(n.key,n.seed);n.generated+=f.length,u.putBytes(f),n.key=s(r(n.key,i(n.seed))),n.seed=o(r(n.key,n.seed))}return u.getBytes(t)},r?(n.seedFile=function(e,t){r.randomBytes(e,function(e,n){if(e)return t(e);t(null,n.toString())})},n.seedFileSync=function(e){return r.randomBytes(e).toString()}):(n.seedFile=function(e,t){try{t(null,l(e))}catch(n){t(n)}},n.seedFileSync=l),n.collect=function(e){var t=e.length;for(var r=0;r<t;++r)n.pools[n.pool].update(e.substr(r,1)),n.pool=n.pool===31?0:n.pool+1},n.collectInt=function(e,t){var r="";for(var i=0;i<t;i+=8)r+=String.fromCharCode(e>>i&255);n.collect(r)},n.registerWorker=function(e){if(e===self)n.seedFile=function(e,t){function n(e){var r=e.data;r.forge&&r.forge.prng&&(self.removeEventListener("message",n),t(r.forge.prng.err,r.forge.prng.bytes))}self.addEventListener("message",n),self.postMessage({forge:{prng:{needed:e}}})};else{var t=function(t){var r=t.data;r.forge&&r.forge.prng&&n.seedFile(r.forge.prng.needed,function(t,n){e.postMessage({forge:{prng:{err:t,bytes:n}}})})};e.addEventListener("message",t)}},n}}var r="prng";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/prng",["require","module","./md","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){if(e.random&&e.random.getBytes)return;(function(t){function s(){var t=e.prng.create(n);return t.getBytes=function(e,n){return t.generate(e,n)},t.getBytesSync=function(e){return t.generate(e)},t}var n={},r=new Array(4),i=e.util.createBuffer();n.formatKey=function(t){var n=e.util.createBuffer(t);return t=new Array(4),t[0]=n.getInt32(),t[1]=n.getInt32(),t[2]=n.getInt32(),t[3]=n.getInt32(),e.aes._expandKey(t,!1)},n.formatSeed=function(t){var n=e.util.createBuffer(t);return t=new Array(4),t[0]=n.getInt32(),t[1]=n.getInt32(),t[2]=n.getInt32(),t[3]=n.getInt32(),t},n.cipher=function(t,n){return e.aes._updateBlock(t,n,r,!1),i.putInt32(r[0]),i.putInt32(r[1]),i.putInt32(r[2]),i.putInt32(r[3]),i.getBytes()},n.increment=function(e){return++e[3],e},n.md=e.md.sha256;var o=s(),u=typeof process!="undefined"&&process.versions&&process.versions.node,a=null;if(typeof window!="undefined"){var f=window.crypto||window.msCrypto;f&&f.getRandomValues&&(a=function(e){return f.getRandomValues(e)})}if(e.disableNativeCode||!u&&!a){typeof window=="undefined"||window.document===undefined,o.collectInt(+(new Date),32);if(typeof navigator!="undefined"){var l="";for(var c in navigator)try{typeof navigator[c]=="string"&&(l+=navigator[c])}catch(h){}o.collect(l),l=null}t&&(t().mousemove(function(e){o.collectInt(e.clientX,16),o.collectInt(e.clientY,16)}),t().keypress(function(e){o.collectInt(e.charCode,8)}))}if(!e.random)e.random=o;else for(var c in o)e.random[c]=o[c];e.random.createInstance=s})(typeof jQuery!="undefined"?jQuery:null)}var r="random";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/random",["require","module","./aes","./md","./prng","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],n=[1,2,3,5],r=function(e,t){return e<<t&65535|(e&65535)>>16-t},i=function(e,t){return(e&65535)>>t|e<<16-t&65535};e.rc2=e.rc2||{},e.rc2.expandKey=function(n,r){typeof n=="string"&&(n=e.util.createBuffer(n)),r=r||128;var i=n,s=n.length(),o=r,u=Math.ceil(o/8),a=255>>(o&7),f;for(f=s;f<128;f++)i.putByte(t[i.at(f-1)+i.at(f-s)&255]);i.setAt(128-u,t[i.at(128-u)&a]);for(f=127-u;f>=0;f--)i.setAt(f,t[i.at(f+1)^i.at(f+u)]);return i};var s=function(t,s,o){var u=!1,a=null,f=null,l=null,c,h,p,d,v=[];t=e.rc2.expandKey(t,s);for(p=0;p<64;p++)v.push(t.getInt16Le());o?(c=function(e){for(p=0;p<4;p++)e[p]+=v[d]+(e[(p+3)%4]&e[(p+2)%4])+(~e[(p+3)%4]&e[(p+1)%4]),e[p]=r(e[p],n[p]),d++},h=function(e){for(p=0;p<4;p++)e[p]+=v[e[(p+3)%4]&63]}):(c=function(e){for(p=3;p>=0;p--)e[p]=i(e[p],n[p]),e[p]-=v[d]+(e[(p+3)%4]&e[(p+2)%4])+(~e[(p+3)%4]&e[(p+1)%4]),d--},h=function(e){for(p=3;p>=0;p--)e[p]-=v[e[(p+3)%4]&63]});var m=function(e){var t=[];for(p=0;p<4;p++){var n=a.getInt16Le();l!==null&&(o?n^=l.getInt16Le():l.putInt16Le(n)),t.push(n&65535)}d=o?0:63;for(var r=0;r<e.length;r++)for(var i=0;i<e[r][0];i++)e[r][1](t);for(p=0;p<4;p++)l!==null&&(o?l.putInt16Le(t[p]):t[p]^=l.getInt16Le()),f.putInt16Le(t[p])},g=null;return g={start:function(t,n){t&&typeof t=="string"&&(t=e.util.createBuffer(t)),u=!1,a=e.util.createBuffer(),f=n||new e.util.createBuffer,l=t,g.output=f},update:function(e){u||a.putBuffer(e);while(a.length()>=8)m([[5,c],[1,h],[6,c],[1,h],[5,c]])},finish:function(e){var t=!0;if(o)if(e)t=e(8,a,!o);else{var n=a.length()===8?8:8-a.length();a.fillWithByte(n,n)}t&&(u=!0,g.update());if(!o){t=a.length()===0;if(t)if(e)t=e(8,f,!o);else{var r=f.length(),i=f.at(r-1);i>r?t=!1:f.truncate(i)}}return t}},g};e.rc2.startEncrypting=function(t,n,r){var i=e.rc2.createEncryptionCipher(t,128);return i.start(n,r),i},e.rc2.createEncryptionCipher=function(e,t){return s(e,t,!0)},e.rc2.startDecrypting=function(t,n,r){var i=e.rc2.createDecryptionCipher(t,128);return i.start(n,r),i},e.rc2.createDecryptionCipher=function(e,t){return s(e,t,!1)}}var r="rc2";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/rc2",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function i(e,t,n){this.data=[],e!=null&&("number"==typeof e?this.fromNumber(e,t,n):t==null&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function s(){return new i(null)}function o(e,t,n,r,i,s){while(--s>=0){var o=t*this.data[e++]+n.data[r]+i;i=Math.floor(o/67108864),n.data[r++]=o&67108863}return i}function u(e,t,n,r,i,s){var o=t&32767,u=t>>15;while(--s>=0){var a=this.data[e]&32767,f=this.data[e++]>>15,l=u*a+f*o;a=o*a+((l&32767)<<15)+n.data[r]+(i&1073741823),i=(a>>>30)+(l>>>15)+u*f+(i>>>30),n.data[r++]=a&1073741823}return i}function a(e,t,n,r,i,s){var o=t&16383,u=t>>14;while(--s>=0){var a=this.data[e]&16383,f=this.data[e++]>>14,l=u*a+f*o;a=o*a+((l&16383)<<14)+n.data[r]+i,i=(a>>28)+(l>>14)+u*f,n.data[r++]=a&268435455}return i}function d(e){return l.charAt(e)}function v(e,t){var n=c[e.charCodeAt(t)];return n==null?-1:n}function m(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function g(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function y(e){var t=s();return t.fromInt(e),t}function b(e,t){var n;if(t==16)n=4;else if(t==8)n=3;else if(t==256)n=8;else if(t==2)n=1;else if(t==32)n=5;else{if(t!=4){this.fromRadix(e,t);return}n=2}this.t=0,this.s=0;var r=e.length,s=!1,o=0;while(--r>=0){var u=n==8?e[r]&255:v(e,r);if(u<0){e.charAt(r)=="-"&&(s=!0);continue}s=!1,o==0?this.data[this.t++]=u:o+n>this.DB?(this.data[this.t-1]|=(u&(1<<this.DB-o)-1)<<o,this.data[this.t++]=u>>this.DB-o):this.data[this.t-1]|=u<<o,o+=n,o>=this.DB&&(o-=this.DB)}n==8&&(e[0]&128)!=0&&(this.s=-1,o>0&&(this.data[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),s&&i.ZERO.subTo(this,this)}function w(){var e=this.s&this.DM;while(this.t>0&&this.data[this.t-1]==e)--this.t}function E(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else{if(e!=4)return this.toRadix(e);t=2}var n=(1<<t)-1,r,i=!1,s="",o=this.t,u=this.DB-o*this.DB%t;if(o-->0){u<this.DB&&(r=this.data[o]>>u)>0&&(i=!0,s=d(r));while(o>=0)u<t?(r=(this.data[o]&(1<<u)-1)<<t-u,r|=this.data[--o]>>(u+=this.DB-t)):(r=this.data[o]>>(u-=t)&n,u<=0&&(u+=this.DB,--o)),r>0&&(i=!0),i&&(s+=d(r))}return i?s:"0"}function S(){var e=s();return i.ZERO.subTo(this,e),e}function x(){return this.s<0?this.negate():this}function T(e){var t=this.s-e.s;if(t!=0)return t;var n=this.t;t=n-e.t;if(t!=0)return this.s<0?-t:t;while(--n>=0)if((t=this.data[n]-e.data[n])!=0)return t;return 0}function N(e){var t=1,n;return(n=e>>>16)!=0&&(e=n,t+=16),(n=e>>8)!=0&&(e=n,t+=8),(n=e>>4)!=0&&(e=n,t+=4),(n=e>>2)!=0&&(e=n,t+=2),(n=e>>1)!=0&&(e=n,t+=1),t}function C(){return this.t<=0?0:this.DB*(this.t-1)+N(this.data[this.t-1]^this.s&this.DM)}function k(e,t){var n;for(n=this.t-1;n>=0;--n)t.data[n+e]=this.data[n];for(n=e-1;n>=0;--n)t.data[n]=0;t.t=this.t+e,t.s=this.s}function L(e,t){for(var n=e;n<this.t;++n)t.data[n-e]=this.data[n];t.t=Math.max(this.t-e,0),t.s=this.s}function A(e,t){var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,s=Math.floor(e/this.DB),o=this.s<<n&this.DM,u;for(u=this.t-1;u>=0;--u)t.data[u+s+1]=this.data[u]>>r|o,o=(this.data[u]&i)<<n;for(u=s-1;u>=0;--u)t.data[u]=0;t.data[s]=o,t.t=this.t+s+1,t.s=this.s,t.clamp()}function O(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t){t.t=0;return}var r=e%this.DB,i=this.DB-r,s=(1<<r)-1;t.data[0]=this.data[n]>>r;for(var o=n+1;o<this.t;++o)t.data[o-n-1]|=(this.data[o]&s)<<i,t.data[o-n]=this.data[o]>>r;r>0&&(t.data[this.t-n-1]|=(this.s&s)<<i),t.t=this.t-n,t.clamp()}function M(e,t){var n=0,r=0,i=Math.min(e.t,this.t);while(n<i)r+=this.data[n]-e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){r-=e.s;while(n<this.t)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{r+=this.s;while(n<e.t)r-=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t.data[n++]=this.DV+r:r>0&&(t.data[n++]=r),t.t=n,t.clamp()}function _(e,t){var n=this.abs(),r=e.abs(),s=n.t;t.t=s+r.t;while(--s>=0)t.data[s]=0;for(s=0;s<r.t;++s)t.data[s+n.t]=n.am(0,r.data[s],t,s,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&i.ZERO.subTo(t,t)}function D(e){var t=this.abs(),n=e.t=2*t.t;while(--n>=0)e.data[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t.data[n],e,2*n,0,1);(e.data[n+t.t]+=t.am(n+1,2*t.data[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e.data[n+t.t]-=t.DV,e.data[n+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(n,t.data[n],e,2*n,0,1)),e.s=0,e.clamp()}function P(e,t,n){var r=e.abs();if(r.t<=0)return;var o=this.abs();if(o.t<r.t){t!=null&&t.fromInt(0),n!=null&&this.copyTo(n);return}n==null&&(n=s());var u=s(),a=this.s,f=e.s,l=this.DB-N(r.data[r.t-1]);l>0?(r.lShiftTo(l,u),o.lShiftTo(l,n)):(r.copyTo(u),o.copyTo(n));var c=u.t,h=u.data[c-1];if(h==0)return;var p=h*(1<<this.F1)+(c>1?u.data[c-2]>>this.F2:0),d=this.FV/p,v=(1<<this.F1)/p,m=1<<this.F2,g=n.t,y=g-c,b=t==null?s():t;u.dlShiftTo(y,b),n.compareTo(b)>=0&&(n.data[n.t++]=1,n.subTo(b,n)),i.ONE.dlShiftTo(c,b),b.subTo(u,u);while(u.t<c)u.data[u.t++]=0;while(--y>=0){var w=n.data[--g]==h?this.DM:Math.floor(n.data[g]*d+(n.data[g-1]+m)*v);if((n.data[g]+=u.am(0,w,n,y,0,c))<w){u.dlShiftTo(y,b),n.subTo(b,n);while(n.data[g]<--w)n.subTo(b,n)}}t!=null&&(n.drShiftTo(c,t),a!=f&&i.ZERO.subTo(t,t)),n.t=c,n.clamp(),l>0&&n.rShiftTo(l,n),a<0&&i.ZERO.subTo(n,n)}function H(e){var t=s();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(i.ZERO)>0&&e.subTo(t,t),t}function B(e){this.m=e}function j(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function F(e){return e}function I(e){e.divRemTo(this.m,null,e)}function q(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function R(e,t){e.squareTo(t),this.reduce(t)}function U(){if(this.t<1)return 0;var e=this.data[0];if((e&1)==0)return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function z(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function W(e){var t=s();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(i.ZERO)>0&&this.m.subTo(t,t),t}function X(e){var t=s();return e.copyTo(t),this.reduce(t),t}function V(e){while(e.t<=this.mt2)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=e.data[t]&32767,r=n*this.mpl+((n*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;n=t+this.m.t,e.data[n]+=this.m.am(0,r,e,t,0,this.m.t);while(e.data[n]>=e.DV)e.data[n]-=e.DV,e.data[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function $(e,t){e.squareTo(t),this.reduce(t)}function J(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function K(){return(this.t>0?this.data[0]&1:this.s)==0}function Q(e,t){if(e>4294967295||e<1)return i.ONE;var n=s(),r=s(),o=t.convert(this),u=N(e)-1;o.copyTo(n);while(--u>=0){t.sqrTo(n,r);if((e&1<<u)>0)t.mulTo(r,o,n);else{var a=n;n=r,r=a}}return t.revert(n)}function G(e,t){var n;return e<256||t.isEven()?n=new B(t):n=new z(t),this.exp(e,n)}function Y(){var e=s();return this.copyTo(e),e}function Z(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function et(){return this.t==0?this.s:this.data[0]<<24>>24}function tt(){return this.t==0?this.s:this.data[0]<<16>>16}function nt(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function rt(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function it(e){e==null&&(e=10);if(this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=y(n),i=s(),o=s(),u="";this.divRemTo(r,i,o);while(i.signum()>0)u=(n+o.intValue()).toString(e).substr(1)+u,i.divRemTo(r,i,o);return o.intValue().toString(e)+u}function st(e,t){this.fromInt(0),t==null&&(t=10);var n=this.chunkSize(t),r=Math.pow(t,n),s=!1,o=0,u=0;for(var a=0;a<e.length;++a){var f=v(e,a);if(f<0){e.charAt(a)=="-"&&this.signum()==0&&(s=!0);continue}u=t*u+f,++o>=n&&(this.dMultiply(r),this.dAddOffset(u,0),o=0,u=0)}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(u,0)),s&&i.ZERO.subTo(this,this)}function ot(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else{this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(i.ONE.shiftLeft(e-1),dt,this),this.isEven()&&this.dAddOffset(1,0);while(!this.isProbablePrime(t))this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(i.ONE.shiftLeft(e-1),this)}else{var r=new Array,s=e&7;r.length=(e>>3)+1,t.nextBytes(r),s>0?r[0]&=(1<<s)-1:r[0]=0,this.fromString(r,256)}}function ut(){var e=this.t,t=new Array;t[0]=this.s;var n=this.DB-e*this.DB%8,r,i=0;if(e-->0){n<this.DB&&(r=this.data[e]>>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<<this.DB-n);while(e>=0){n<8?(r=(this.data[e]&(1<<n)-1)<<8-n,r|=this.data[--e]>>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),(r&128)!=0&&(r|=-256),i==0&&(this.s&128)!=(r&128)&&++i;if(i>0||r!=this.s)t[i++]=r}}return t}function at(e){return this.compareTo(e)==0}function ft(e){return this.compareTo(e)<0?this:e}function lt(e){return this.compareTo(e)>0?this:e}function ct(e,t,n){var r,i,s=Math.min(e.t,this.t);for(r=0;r<s;++r)n.data[r]=t(this.data[r],e.data[r]);if(e.t<this.t){i=e.s&this.DM;for(r=s;r<this.t;++r)n.data[r]=t(this.data[r],i);n.t=this.t}else{i=this.s&this.DM;for(r=s;r<e.t;++r)n.data[r]=t(i,e.data[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()}function ht(e,t){return e&t}function pt(e){var t=s();return this.bitwiseTo(e,ht,t),t}function dt(e,t){return e|t}function vt(e){var t=s();return this.bitwiseTo(e,dt,t),t}function mt(e,t){return e^t}function gt(e){var t=s();return this.bitwiseTo(e,mt,t),t}function yt(e,t){return e&~t}function bt(e){var t=s();return this.bitwiseTo(e,yt,t),t}function wt(){var e=s();for(var t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function Et(e){var t=s();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function St(e){var t=s();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function xt(e){if(e==0)return-1;var t=0;return(e&65535)==0&&(e>>=16,t+=16),(e&255)==0&&(e>>=8,t+=8),(e&15)==0&&(e>>=4,t+=4),(e&3)==0&&(e>>=2,t+=2),(e&1)==0&&++t,t}function Tt(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+xt(this.data[e]);return this.s<0?this.t*this.DB:-1}function Nt(e){var t=0;while(e!=0)e&=e-1,++t;return t}function Ct(){var e=0,t=this.s&this.DM;for(var n=0;n<this.t;++n)e+=Nt(this.data[n]^t);return e}function kt(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function Lt(e,t){var n=i.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n}function At(e){return this.changeBit(e,dt)}function Ot(e){return this.changeBit(e,yt)}function Mt(e){return this.changeBit(e,mt)}function _t(e,t){var n=0,r=0,i=Math.min(e.t,this.t);while(n<i)r+=this.data[n]+e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){r+=e.s;while(n<this.t)r+=this.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{r+=this.s;while(n<e.t)r+=e.data[n],t.data[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t.data[n++]=r:r<-1&&(t.data[n++]=this.DV+r),t.t=n,t.clamp()}function Dt(e){var t=s();return this.addTo(e,t),t}function Pt(e){var t=s();return this.subTo(e,t),t}function Ht(e){var t=s();return this.multiplyTo(e,t),t}function Bt(e){var t=s();return this.divRemTo(e,t,null),t}function jt(e){var t=s();return this.divRemTo(e,null,t),t}function Ft(e){var t=s(),n=s();return this.divRemTo(e,t,n),new Array(t,n)}function It(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function qt(e,t){if(e==0)return;while(this.t<=t)this.data[this.t++]=0;this.data[t]+=e;while(this.data[t]>=this.DV)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}function Rt(){}function Ut(e){return e}function zt(e,t,n){e.multiplyTo(t,n)}function Wt(e,t){e.squareTo(t)}function Xt(e){return this.exp(e,new Rt)}function Vt(e,t,n){var r=Math.min(this.t+e.t,t);n.s=0,n.t=r;while(r>0)n.data[--r]=0;var i;for(i=n.t-this.t;r<i;++r)n.data[r+this.t]=this.am(0,e.data[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e.data[r],n,r,0,t-r);n.clamp()}function $t(e,t,n){--t;var r=n.t=this.t+e.t-t;n.s=0;while(--r>=0)n.data[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n.data[this.t+r-t]=this.am(t-r,e.data[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)}function Jt(e){this.r2=s(),this.q3=s(),i.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function Kt(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=s();return e.copyTo(t),this.reduce(t),t}function Qt(e){return e}function Gt(e){e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);while(e.compareTo(this.r2)<0)e.dAddOffset(1,this.m.t+1);e.subTo(this.r2,e);while(e.compareTo(this.m)>=0)e.subTo(this.m,e)}function Yt(e,t){e.squareTo(t),this.reduce(t)}function Zt(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function en(e,t){var n=e.bitLength(),r,i=y(1),o;if(n<=0)return i;n<18?r=1:n<48?r=3:n<144?r=4:n<768?r=5:r=6,n<8?o=new B(t):t.isEven()?o=new Jt(t):o=new z(t);var u=new Array,a=3,f=r-1,l=(1<<r)-1;u[1]=o.convert(this);if(r>1){var c=s();o.sqrTo(u[1],c);while(a<=l)u[a]=s(),o.mulTo(c,u[a-2],u[a]),a+=2}var h=e.t-1,p,d=!0,v=s(),m;n=N(e.data[h])-1;while(h>=0){n>=f?p=e.data[h]>>n-f&l:(p=(e.data[h]&(1<<n+1)-1)<<f-n,h>0&&(p|=e.data[h-1]>>this.DB+n-f)),a=r;while((p&1)==0)p>>=1,--a;(n-=a)<0&&(n+=this.DB,--h);if(d)u[p].copyTo(i),d=!1;else{while(a>1)o.sqrTo(i,v),o.sqrTo(v,i),a-=2;a>0?o.sqrTo(i,v):(m=i,i=v,v=m),o.mulTo(v,u[p],i)}while(h>=0&&(e.data[h]&1<<n)==0)o.sqrTo(i,v),m=i,i=v,v=m,--n<0&&(n=this.DB-1,--h)}return o.revert(i)}function tn(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),s=n.getLowestSetBit();if(s<0)return t;i<s&&(s=i),s>0&&(t.rShiftTo(s,t),n.rShiftTo(s,n));while(t.signum()>0)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return s>0&&n.lShiftTo(s,n),n}function nn(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(t==0)n=this.data[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this.data[r])%e;return n}function rn(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return i.ZERO;var n=e.clone(),r=this.clone(),s=y(1),o=y(0),u=y(0),a=y(1);while(n.signum()!=0){while(n.isEven()){n.rShiftTo(1,n);if(t){if(!s.isEven()||!o.isEven())s.addTo(this,s),o.subTo(e,o);s.rShiftTo(1,s)}else o.isEven()||o.subTo(e,o);o.rShiftTo(1,o)}while(r.isEven()){r.rShiftTo(1,r);if(t){if(!u.isEven()||!a.isEven())u.addTo(this,u),a.subTo(e,a);u.rShiftTo(1,u)}else a.isEven()||a.subTo(e,a);a.rShiftTo(1,a)}n.compareTo(r)>=0?(n.subTo(r,n),t&&s.subTo(u,s),o.subTo(a,o)):(r.subTo(n,r),t&&u.subTo(s,u),a.subTo(o,a))}return r.compareTo(i.ONE)!=0?i.ZERO:a.compareTo(e)>=0?a.subtract(e):a.signum()<0?(a.addTo(e,a),a.signum()<0?a.add(e):a):a}function un(e){var t,n=this.abs();if(n.t==1&&n.data[0]<=sn[sn.length-1]){for(t=0;t<sn.length;++t)if(n.data[0]==sn[t])return!0;return!1}if(n.isEven())return!1;t=1;while(t<sn.length){var r=sn[t],i=t+1;while(i<sn.length&&r<on)r*=sn[i++];r=n.modInt(r);while(t<i)if(r%sn[t++]==0)return!1}return n.millerRabin(e)}function an(e){var t=this.subtract(i.ONE),n=t.getLowestSetBit();if(n<=0)return!1;var r=t.shiftRight(n),s=fn(),o;for(var u=0;u<e;++u){do o=new i(this.bitLength(),s);while(o.compareTo(i.ONE)<=0||o.compareTo(t)>=0);var a=o.modPow(r,this);if(a.compareTo(i.ONE)!=0&&a.compareTo(t)!=0){var f=1;while(f++<n&&a.compareTo(t)!=0){a=a.modPowInt(2,this);if(a.compareTo(i.ONE)==0)return!1}if(a.compareTo(t)!=0)return!1}}return!0}function fn(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}var t,n=0xdeadbeefcafe,r=(n&16777215)==15715070;typeof navigator=="undefined"?(i.prototype.am=a,t=28):r&&navigator.appName=="Microsoft Internet Explorer"?(i.prototype.am=u,t=30):r&&navigator.appName!="Netscape"?(i.prototype.am=o,t=26):(i.prototype.am=a,t=28),i.prototype.DB=t,i.prototype.DM=(1<<t)-1,i.prototype.DV=1<<t;var f=52;i.prototype.FV=Math.pow(2,f),i.prototype.F1=f-t,i.prototype.F2=2*t-f;var l="0123456789abcdefghijklmnopqrstuvwxyz",c=new Array,h,p;h="0".charCodeAt(0);for(p=0;p<=9;++p)c[h++]=p;h="a".charCodeAt(0);for(p=10;p<36;++p)c[h++]=p;h="A".charCodeAt(0);for(p=10;p<36;++p)c[h++]=p;B.prototype.convert=j,B.prototype.revert=F,B.prototype.reduce=I,B.prototype.mulTo=q,B.prototype.sqrTo=R,z.prototype.convert=W,z.prototype.revert=X,z.prototype.reduce=V,z.prototype.mulTo=J,z.prototype.sqrTo=$,i.prototype.copyTo=m,i.prototype.fromInt=g,i.prototype.fromString=b,i.prototype.clamp=w,i.prototype.dlShiftTo=k,i.prototype.drShiftTo=L,i.prototype.lShiftTo=A,i.prototype.rShiftTo=O,i.prototype.subTo=M,i.prototype.multiplyTo=_,i.prototype.squareTo=D,i.prototype.divRemTo=P,i.prototype.invDigit=U,i.prototype.isEven=K,i.prototype.exp=Q,i.prototype.toString=E,i.prototype.negate=S,i.prototype.abs=x,i.prototype.compareTo=T,i.prototype.bitLength=C,i.prototype.mod=H,i.prototype.modPowInt=G,i.ZERO=y(0),i.ONE=y(1),Rt.prototype.convert=Ut,Rt.prototype.revert=Ut,Rt.prototype.mulTo=zt,Rt.prototype.sqrTo=Wt,Jt.prototype.convert=Kt,Jt.prototype.revert=Qt,Jt.prototype.reduce=Gt,Jt.prototype.mulTo=Zt,Jt.prototype.sqrTo=Yt;var sn=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],on=(1<<26)/sn[sn.length-1];i.prototype.chunkSize=nt,i.prototype.toRadix=it,i.prototype.fromRadix=st,i.prototype.fromNumber=ot,i.prototype.bitwiseTo=ct,i.prototype.changeBit=Lt,i.prototype.addTo=_t,i.prototype.dMultiply=It,i.prototype.dAddOffset=qt,i.prototype.multiplyLowerTo=Vt,i.prototype.multiplyUpperTo=$t,i.prototype.modInt=nn,i.prototype.millerRabin=an,i.prototype.clone=Y,i.prototype.intValue=Z,i.prototype.byteValue=et,i.prototype.shortValue=tt,i.prototype.signum=rt,i.prototype.toByteArray=ut,i.prototype.equals=at,i.prototype.min=ft,i.prototype.max=lt,i.prototype.and=pt,i.prototype.or=vt,i.prototype.xor=gt,i.prototype.andNot=bt,i.prototype.not=wt,i.prototype.shiftLeft=Et,i.prototype.shiftRight=St,i.prototype.getLowestSetBit=Tt,i.prototype.bitCount=Ct,i.prototype.testBit=kt,i.prototype.setBit=At,i.prototype.clearBit=Ot,i.prototype.flipBit=Mt,i.prototype.add=Dt,i.prototype.subtract=Pt,i.prototype.multiply=Ht,i.prototype.divide=Bt,i.prototype.remainder=jt,i.prototype.divideAndRemainder=Ft,i.prototype.modPow=en,i.prototype.modInverse=rn,i.prototype.pow=Xt,i.prototype.gcd=tn,i.prototype.isProbablePrime=un,e.jsbn=e.jsbn||{},e.jsbn.BigInteger=i}var r="jsbn";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/jsbn",["require","module"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function n(t,n,r){r||(r=e.md.sha1.create());var i="",s=Math.ceil(n/r.digestLength);for(var o=0;o<s;++o){var u=String.fromCharCode(o>>24&255,o>>16&255,o>>8&255,o&255);r.start(),r.update(t+u),i+=r.digest().getBytes()}return i.substring(0,n)}var t=e.pkcs1=e.pkcs1||{};t.encode_rsa_oaep=function(t,r,i){var s,o,u,a;typeof i=="string"?(s=i,o=arguments[3]||undefined,u=arguments[4]||undefined):i&&(s=i.label||undefined,o=i.seed||undefined,u=i.md||undefined,i.mgf1&&i.mgf1.md&&(a=i.mgf1.md)),u?u.start():u=e.md.sha1.create(),a||(a=u);var f=Math.ceil(t.n.bitLength()/8),l=f-2*u.digestLength-2;if(r.length>l){var c=new Error("RSAES-OAEP input message length is too long.");throw c.length=r.length,c.maxLength=l,c}s||(s=""),u.update(s,"raw");var h=u.digest(),p="",d=l-r.length;for(var v=0;v<d;v++)p+="\0";var m=h.getBytes()+p+""+r;if(!o)o=e.random.getBytes(u.digestLength);else if(o.length!==u.digestLength){var c=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw c.seedLength=o.length,c.digestLength=u.digestLength,c}var g=n(o,f-u.digestLength-1,a),y=e.util.xorBytes(m,g,m.length),b=n(y,u.digestLength,a),w=e.util.xorBytes(o,b,o.length);return"\0"+w+y},t.decode_rsa_oaep=function(t,r,i){var s,o,u;typeof i=="string"?(s=i,o=arguments[3]||undefined):i&&(s=i.label||undefined,o=i.md||undefined,i.mgf1&&i.mgf1.md&&(u=i.mgf1.md));var a=Math.ceil(t.n.bitLength()/8);if(r.length!==a){var f=new Error("RSAES-OAEP encoded message length is invalid.");throw f.length=r.length,f.expectedLength=a,f}o===undefined?o=e.md.sha1.create():o.start(),u||(u=o);if(a<2*o.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");s||(s=""),o.update(s,"raw");var l=o.digest().getBytes(),c=r.charAt(0),h=r.substring(1,o.digestLength+1),p=r.substring(1+o.digestLength),d=n(p,o.digestLength,u),v=e.util.xorBytes(h,d,h.length),m=n(v,a-o.digestLength-1,u),g=e.util.xorBytes(p,m,p.length),y=g.substring(0,o.digestLength),f=c!=="\0";for(var b=0;b<o.digestLength;++b)f|=l.charAt(b)!==y.charAt(b);var w=1,E=o.digestLength;for(var S=o.digestLength;S<g.length;S++){var x=g.charCodeAt(S),T=x&1^1,N=w?65534:0;f|=x&N,w&=T,E+=w}if(f||g.charCodeAt(E)!==1)throw new Error("Invalid RSAES-OAEP padding.");return g.substring(E+1)}}var r="pkcs1";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pkcs1",["require","module","./util","./random","./sha1"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function o(e,t,n,r){return"workers"in n?a(e,t,n,r):u(e,t,n,r)}function u(t,n,i,s){var o=f(t,n),a=0,c=l(o.bitLength());"millerRabinTests"in i&&(c=i.millerRabinTests);var h=10;"maxBlockTime"in i&&(h=i.maxBlockTime);var p=+(new Date);do{o.bitLength()>t&&(o=f(t,n));if(o.isProbablePrime(c))return s(null,o);o.dAddOffset(r[a++%8],0)}while(h<0||+(new Date)-p<h);e.util.setImmediate(function(){u(t,n,i,s)})}function a(t,r,i,s){function p(){function d(i){if(p)return;--u;var a=i.data;if(a.found){for(var h=0;h<e.length;++h)e[h].terminate();return p=!0,s(null,new n(a.prime,16))}o.bitLength()>t&&(o=f(t,r));var d=o.toString(16);i.target.postMessage({hex:d,workLoad:l}),o.dAddOffset(c,0)}a=Math.max(1,a);var e=[];for(var i=0;i<a;++i)e[i]=new Worker(h);var u=a;for(var i=0;i<a;++i)e[i].addEventListener("message",d);var p=!1}if(typeof Worker=="undefined")return u(t,r,i,s);var o=f(t,r),a=i.workers,l=i.workLoad||100,c=l*30/8,h=i.workerScript||"forge/prime.worker.js";if(a===-1)return e.util.estimateCores(function(e,t){e&&(t=2),a=t-1,p()});p()}function f(e,t){var r=new n(e,t),o=e-1;return r.testBit(o)||r.bitwiseTo(n.ONE.shiftLeft(o),s,r),r.dAddOffset(31-r.mod(i).byteValue(),0),r}function l(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}if(e.prime)return;var t=e.prime=e.prime||{},n=e.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],i=new n(null);i.fromInt(30);var s=function(e,t){return e|t};t.generateProbablePrime=function(t,n,r){typeof n=="function"&&(r=n,n={}),n=n||{};var i=n.algorithm||"PRIMEINC";typeof i=="string"&&(i={name:i}),i.options=i.options||{};var s=n.prng||e.random,u={nextBytes:function(e){var t=s.getBytesSync(e.length);for(var n=0;n<e.length;++n)e[n]=t.charCodeAt(n)}};if(i.name==="PRIMEINC")return o(t,u,i.options,r);throw new Error("Invalid prime generation algorithm: "+i.name)}}var r="prime";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/prime",["require","module","./util","./jsbn","./random"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function c(t,n,r){var i=e.util.createBuffer(),s=Math.ceil(n.n.bitLength()/8);if(t.length>s-11){var o=new Error("Message is too long for PKCS#1 v1.5 padding.");throw o.length=t.length,o.max=s-11,o}i.putByte(0),i.putByte(r);var u=s-3-t.length,a;if(r===0||r===1){a=r===0?0:255;for(var f=0;f<u;++f)i.putByte(a)}else while(u>0){var l=0,c=e.random.getBytes(u);for(var f=0;f<u;++f)a=c.charCodeAt(f),a===0?++l:i.putByte(a);u=l}return i.putByte(0),i.putBytes(t),i}function h(t,n,r,i){var s=Math.ceil(n.n.bitLength()/8),o=e.util.createBuffer(t),u=o.getByte(),a=o.getByte();if(u!==0||r&&a!==0&&a!==1||!r&&a!=2||r&&a===0&&typeof i=="undefined")throw new Error("Encryption block is invalid.");var f=0;if(a===0){f=s-3-i;for(var l=0;l<f;++l)if(o.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(a===1){f=0;while(o.length()>1){if(o.getByte()!==255){--o.read;break}++f}}else if(a===2){f=0;while(o.length()>1){if(o.getByte()===0){--o.read;break}++f}}var c=o.getByte();if(c!==0||f!==s-3-o.length())throw new Error("Encryption block is invalid.");return o.getBytes()}function p(n,i,s){function u(){a(n.pBits,function(e,t){if(e)return s(e);n.p=t;if(n.q!==null)return f(e,n.q);a(n.qBits,f)})}function a(t,n){e.prime.generateProbablePrime(t,o,n)}function f(e,i){if(e)return s(e);n.q=i;if(n.p.compareTo(n.q)<0){var o=n.p;n.p=n.q,n.q=o}if(n.p.subtract(t.ONE).gcd(n.e).compareTo(t.ONE)!==0){n.p=null,u();return}if(n.q.subtract(t.ONE).gcd(n.e).compareTo(t.ONE)!==0){n.q=null,a(n.qBits,f);return}n.p1=n.p.subtract(t.ONE),n.q1=n.q.subtract(t.ONE),n.phi=n.p1.multiply(n.q1);if(n.phi.gcd(n.e).compareTo(t.ONE)!==0){n.p=n.q=null,u();return}n.n=n.p.multiply(n.q);if(n.n.bitLength()!==n.bits){n.q=null,a(n.qBits,f);return}var l=n.e.modInverse(n.phi);n.keys={privateKey:r.rsa.setPrivateKey(n.n,n.e,l,n.p,n.q,l.mod(n.p1),l.mod(n.q1),n.q.modInverse(n.p)),publicKey:r.rsa.setPublicKey(n.n,n.e)},s(null,n.keys)}typeof i=="function"&&(s=i,i={}),i=i||{};var o={algorithm:{name:i.algorithm||"PRIMEINC",options:{workers:i.workers||2,workLoad:i.workLoad||100,workerScript:i.workerScript}}};"prng"in i&&(o.prng=i.prng),u()}function d(t){var n=t.toString(16);return n[0]>="8"&&(n="00"+n),e.util.hexToBytes(n)}function v(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}if(typeof t=="undefined")var t=e.jsbn.BigInteger;var n=e.asn1;e.pki=e.pki||{},e.pki.rsa=e.rsa=e.rsa||{};var r=e.pki,i=[6,4,2,4,2,4,6,2],s={name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},o={name:"RSAPrivateKey",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},u={name:"RSAPublicKey",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},a=e.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:n.Class.UNIVERSAL,type:n.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},f=function(e){var t;if(e.algorithm in r.oids){t=r.oids[e.algorithm];var s=n.oidToDer(t).getBytes(),o=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]),u=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[]);u.value.push(n.create(n.Class.UNIVERSAL,n.Type.OID,!1,s)),u.value.push(n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,""));var a=n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,e.digest().getBytes());return o.value.push(u),o.value.push(a),n.toDer(o).getBytes()}var i=new Error("Unknown message digest algorithm.");throw i.algorithm=e.algorithm,i},l=function(n,r,i){if(i)return n.modPow(r.e,r.n);if(!r.p||!r.q)return n.modPow(r.d,r.n);r.dP||(r.dP=r.d.mod(r.p.subtract(t.ONE))),r.dQ||(r.dQ=r.d.mod(r.q.subtract(t.ONE))),r.qInv||(r.qInv=r.q.modInverse(r.p));var s;do s=(new t(e.util.bytesToHex(e.random.getBytes(r.n.bitLength()/8)),16)).mod(r.n);while(s.equals(t.ZERO));n=n.multiply(s.modPow(r.e,r.n)).mod(r.n);var o=n.mod(r.p).modPow(r.dP,r.p),u=n.mod(r.q).modPow(r.dQ,r.q);while(o.compareTo(u)<0)o=o.add(r.p);var a=o.subtract(u).multiply(r.qInv).mod(r.p).multiply(r.q).add(u);return a=a.multiply(s.modInverse(r.n)).mod(r.n),a};r.rsa.encrypt=function(n,r,i){var s=i,o,u=Math.ceil(r.n.bitLength()/8);i!==!1&&i!==!0?(s=i===2,o=c(n,r,i)):(o=e.util.createBuffer(),o.putBytes(n));var a=new t(o.toHex(),16),f=l(a,r,s),h=f.toString(16),p=e.util.createBuffer(),d=u-Math.ceil(h.length/2);while(d>0)p.putByte(0),--d;return p.putBytes(e.util.hexToBytes(h)),p.getBytes()},r.rsa.decrypt=function(n,r,i,s){var o=Math.ceil(r.n.bitLength()/8);if(n.length!==o){var u=new Error("Encrypted message length is invalid.");throw u.length=n.length,u.expected=o,u}var a=new t(e.util.createBuffer(n).toHex(),16);if(a.compareTo(r.n)>=0)throw new Error("Encrypted message is invalid.");var f=l(a,r,i),c=f.toString(16),p=e.util.createBuffer(),d=o-Math.ceil(c.length/2);while(d>0)p.putByte(0),--d;return p.putBytes(e.util.hexToBytes(c)),s!==!1?h(p.getBytes(),r,i):p.getBytes()},r.rsa.createKeyPairGenerationState=function(n,r,i){typeof n=="string"&&(n=parseInt(n,10)),n=n||2048,i=i||{};var s=i.prng||e.random,o={nextBytes:function(e){var t=s.getBytesSync(e.length);for(var n=0;n<e.length;++n)e[n]=t.charCodeAt(n)}},u=i.algorithm||"PRIMEINC",a;if(u!=="PRIMEINC")throw new Error("Invalid key generation algorithm: "+u);return a={algorithm:u,state:0,bits:n,rng:o,eInt:r||65537,e:new t(null),p:null,q:null,qBits:n>>1,pBits:n-(n>>1),pqState:0,num:null,keys:null},a.e.fromInt(a.eInt),a},r.rsa.stepKeyPairGenerationState=function(e,n){"algorithm"in e||(e.algorithm="PRIMEINC");var s=new t(null);s.fromInt(30);var o=0,u=function(e,t){return e|t},a=+(new Date),f,l=0;while(e.keys===null&&(n<=0||l<n)){if(e.state===0){var c=e.p===null?e.pBits:e.qBits,h=c-1;e.pqState===0?(e.num=new t(c,e.rng),e.num.testBit(h)||e.num.bitwiseTo(t.ONE.shiftLeft(h),u,e.num),e.num.dAddOffset(31-e.num.mod(s).byteValue(),0),o=0,++e.pqState):e.pqState===1?e.num.bitLength()>c?e.pqState=0:e.num.isProbablePrime(v(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(i[o++%8],0):e.pqState===2?e.pqState=e.num.subtract(t.ONE).gcd(e.e).compareTo(t.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(t.ONE),e.q1=e.q.subtract(t.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(t.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var p=e.e.modInverse(e.phi);e.keys={privateKey:r.rsa.setPrivateKey(e.n,e.e,p,e.p,e.q,p.mod(e.p1),p.mod(e.q1),e.q.modInverse(e.p)),publicKey:r.rsa.setPublicKey(e.n,e.e)}}f=+(new Date),l+=f-a,a=f}return e.keys!==null},r.rsa.generateKeyPair=function(e,t,n,i){arguments.length===1?typeof e=="object"?(n=e,e=undefined):typeof e=="function"&&(i=e,e=undefined):arguments.length===2?typeof e=="number"?typeof t=="function"?(i=t,t=undefined):typeof t!="number"&&(n=t,t=undefined):(n=e,i=t,e=undefined,t=undefined):arguments.length===3&&(typeof t=="number"?typeof n=="function"&&(i=n,n=undefined):(i=n,n=t,t=undefined)),n=n||{},e===undefined&&(e=n.bits||2048),t===undefined&&(t=n.e||65537);var s=r.rsa.createKeyPairGenerationState(e,t,n);if(!i)return r.rsa.stepKeyPairGenerationState(s,0),s.keys;p(s,n,i)},r.setRsaPublicKey=r.rsa.setPublicKey=function(t,i){var s={n:t,e:i};return s.encrypt=function(t,n,i){typeof n=="string"?n=n.toUpperCase():n===undefined&&(n="RSAES-PKCS1-V1_5");if(n==="RSAES-PKCS1-V1_5")n={encode:function(e,t,n){return c(e,t,2).getBytes()}};else if(n==="RSA-OAEP"||n==="RSAES-OAEP")n={encode:function(t,n){return e.pkcs1.encode_rsa_oaep(n,t,i)}};else if(["RAW","NONE","NULL",null].indexOf(n)!==-1)n={encode:function(e){return e}};else if(typeof n=="string")throw new Error('Unsupported encryption scheme: "'+n+'".');var o=n.encode(t,s,!0);return r.rsa.encrypt(o,s,!0)},s.verify=function(e,t,i){typeof i=="string"?i=i.toUpperCase():i===undefined&&(i="RSASSA-PKCS1-V1_5");if(i==="RSASSA-PKCS1-V1_5")i={verify:function(e,t){t=h(t,s,!0);var r=n.fromDer(t);return e===r.value[1].value}};else if(i==="NONE"||i==="NULL"||i===null)i={verify:function(e,t){return t=h(t,s,!0),e===t}};var o=r.rsa.decrypt(t,s,!0,!1);return i.verify(e,o,s.n.bitLength())},s},r.setRsaPrivateKey=r.rsa.setPrivateKey=function(t,n,i,s,o,u,a,l){var c={n:t,e:n,d:i,p:s,q:o,dP:u,dQ:a,qInv:l};return c.decrypt=function(t,n,i){typeof n=="string"?n=n.toUpperCase():n===undefined&&(n="RSAES-PKCS1-V1_5");var s=r.rsa.decrypt(t,c,!1,!1);if(n==="RSAES-PKCS1-V1_5")n={decode:h};else if(n==="RSA-OAEP"||n==="RSAES-OAEP")n={decode:function(t,n){return e.pkcs1.decode_rsa_oaep(n,t,i)}};else{if(["RAW","NONE","NULL",null].indexOf(n)===-1)throw new Error('Unsupported encryption scheme: "'+n+'".');n={decode:function(e){return e}}}return n.decode(s,c,!1)},c.sign=function(e,t){var n=!1;typeof t=="string"&&(t=t.toUpperCase());if(t===undefined||t==="RSASSA-PKCS1-V1_5")t={encode:f},n=1;else if(t==="NONE"||t==="NULL"||t===null)t={encode:function(){return e}},n=1;var i=t.encode(e,c.n.bitLength());return r.rsa.encrypt(i,c,n)},c},r.wrapRsaPrivateKey=function(e){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(0).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(r.oids.rsaEncryption).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,n.toDer(e).getBytes())])},r.privateKeyFromAsn1=function(i){var u={},a=[];n.validate(i,s,u,a)&&(i=n.fromDer(e.util.createBuffer(u.privateKey))),u={},a=[];if(!n.validate(i,o,u,a)){var f=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw f.errors=a,f}var l,c,h,p,d,v,m,g;return l=e.util.createBuffer(u.privateKeyModulus).toHex(),c=e.util.createBuffer(u.privateKeyPublicExponent).toHex(),h=e.util.createBuffer(u.privateKeyPrivateExponent).toHex(),p=e.util.createBuffer(u.privateKeyPrime1).toHex(),d=e.util.createBuffer(u.privateKeyPrime2).toHex(),v=e.util.createBuffer(u.privateKeyExponent1).toHex(),m=e.util.createBuffer(u.privateKeyExponent2).toHex(),g=e.util.createBuffer(u.privateKeyCoefficient).toHex(),r.setRsaPrivateKey(new t(l,16),new t(c,16),new t(h,16),new t(p,16),new t(d,16),new t(v,16),new t(m,16),new t(g,16))},r.privateKeyToAsn1=r.privateKeyToRSAPrivateKey=function(e){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,n.integerToDer(0).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.n)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.e)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.d)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.p)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.q)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.dP)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.dQ)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.qInv))])},r.publicKeyFromAsn1=function(i){var s={},o=[];if(n.validate(i,a,s,o)){var f=n.derToOid(s.publicKeyOid);if(f!==r.oids.rsaEncryption){var l=new Error("Cannot read public key. Unknown OID.");throw l.oid=f,l}i=s.rsaPublicKey}o=[];if(!n.validate(i,u,s,o)){var l=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw l.errors=o,l}var c=e.util.createBuffer(s.publicKeyModulus).toHex(),h=e.util.createBuffer(s.publicKeyExponent).toHex();return r.setRsaPublicKey(new t(c,16),new t(h,16))},r.publicKeyToAsn1=r.publicKeyToSubjectPublicKeyInfo=function(e){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(r.oids.rsaEncryption).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.NULL,!1,"")]),n.create(n.Class.UNIVERSAL,n.Type.BITSTRING,!1,[r.publicKeyToRSAPublicKey(e)])])},r.publicKeyToRSAPublicKey=function(e){return n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.n)),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,d(e.e))])}}var r="rsa";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/rsa",["require","module","./asn1","./jsbn","./oids","./pkcs1","./prime","./random","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function a(e,t){return e.start().update(t).digest().getBytes()}if(typeof t=="undefined")var t=e.jsbn.BigInteger;var n=e.asn1,r=e.pki=e.pki||{};r.pbe=e.pbe=e.pbe||{};var i=r.oids,s={name:"EncryptedPrivateKeyInfo",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},o={name:"PBES2Algorithms",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,onstructed:!0,capture:"kdfIterationCount"}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:n.Class.UNIVERSAL,type:n.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},u={name:"pkcs-12PbeParams",tagClass:n.Class.UNIVERSAL,type:n.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:n.Class.UNIVERSAL,type:n.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:n.Class.UNIVERSAL,type:n.Type.INTEGER,constructed:!1,capture:"iterations"}]};r.encryptPrivateKeyInfo=function(t,s,o){o=o||{},o.saltSize=o.saltSize||8,o.count=o.count||2048,o.algorithm=o.algorithm||"aes128";var u=e.random.getBytesSync(o.saltSize),a=o.count,f=n.integerToDer(a),l,c,h;if(o.algorithm.indexOf("aes")===0||o.algorithm==="des"){var p,d,v;switch(o.algorithm){case"aes128":l=16,p=16,d=i["aes128-CBC"],v=e.aes.createEncryptionCipher;break;case"aes192":l=24,p=16,d=i["aes192-CBC"],v=e.aes.createEncryptionCipher;break;case"aes256":l=32,p=16,d=i["aes256-CBC"],v=e.aes.createEncryptionCipher;break;case"des":l=8,p=8,d=i.desCBC,v=e.des.createEncryptionCipher;break;default:var m=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw m.algorithm=o.algorithm,m}var g=e.pkcs5.pbkdf2(s,u,a,l),y=e.random.getBytesSync(p),b=v(g);b.start(y),b.update(n.toDer(t)),b.finish(),h=b.output.getBytes(),c=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pkcs5PBES2).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i.pkcs5PBKDF2).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,u),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,f.getBytes())])]),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(d).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,y)])])])}else{if(o.algorithm!=="3des"){var m=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw m.algorithm=o.algorithm,m}l=24;var w=new e.util.ByteBuffer(u),g=r.pbe.generatePkcs12Key(s,w,1,a,l),y=r.pbe.generatePkcs12Key(s,w,2,a,l),b=e.des.createEncryptionCipher(g);b.start(y),b.update(n.toDer(t)),b.finish(),h=b.output.getBytes(),c=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OID,!1,n.oidToDer(i["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,u),n.create(n.Class.UNIVERSAL,n.Type.INTEGER,!1,f.getBytes())])])}var E=n.create(n.Class.UNIVERSAL,n.Type.SEQUENCE,!0,[c,n.create(n.Class.UNIVERSAL,n.Type.OCTETSTRING,!1,h)]);return E},r.decryptPrivateKeyInfo=function(t,i){var o=null,u={},a=[];if(!n.validate(t,s,u,a)){var f=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw f.errors=a,f}var l=n.derToOid(u.encryptionOid),c=r.pbe.getCipher(l,u.encryptionParams,i),h=e.util.createBuffer(u.encryptedData);return c.update(h),c.finish()&&(o=n.fromDer(c.output)),o},r.encryptedPrivateKeyToPem=function(t,r){var i={type:"ENCRYPTED PRIVATE KEY",body:n.toDer(t).getBytes()};return e.pem.encode(i,{maxline:r})},r.encryptedPrivateKeyFromPem=function(t){var r=e.pem.decode(t)[0];if(r.type!=="ENCRYPTED PRIVATE KEY"){var i=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw i.headerType=r.type,i}if(r.procType&&r.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return n.fromDer(r.body)},r.encryptRsaPrivateKey=function(t,i,s){s=s||{};if(!s.legacy){var o=r.wrapRsaPrivateKey(r.privateKeyToAsn1(t));return o=r.encryptPrivateKeyInfo(o,i,s),r.encryptedPrivateKeyToPem(o)}var u,a,f,l;switch(s.algorithm){case"aes128":u="AES-128-CBC",f=16,a=e.random.getBytesSync(16),l=e.aes.createEncryptionCipher;break;case"aes192":u="AES-192-CBC",f=24,a=e.random.getBytesSync(16),l=e.aes.createEncryptionCipher;break;case"aes256":u="AES-256-CBC",f=32,a=e.random.getBytesSync(16),l=e.aes.createEncryptionCipher;break;case"3des":u="DES-EDE3-CBC",f=24,a=e.random.getBytesSync(8),l=e.des.createEncryptionCipher;break;case"des":u="DES-CBC",f=8,a=e.random.getBytesSync(8),l=e.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+s.algorithm+'".');throw c.algorithm=s.algorithm,c}var h=e.pbe.opensslDeriveBytes(i,a.substr(0,8),f),p=l(h);p.start(a),p.update(n.toDer(r.privateKeyToAsn1(t))),p.finish();var d={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:u,parameters:e.util.bytesToHex(a).toUpperCase()},body:p.output.getBytes()};return e.pem.encode(d)},r.decryptRsaPrivateKey=function(t,i){var s=null,o=e.pem.decode(t)[0];if(o.type!=="ENCRYPTED PRIVATE KEY"&&o.type!=="PRIVATE KEY"&&o.type!=="RSA PRIVATE KEY"){var u=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw u.headerType=u,u}if(o.procType&&o.procType.type==="ENCRYPTED"){var a,f;switch(o.dekInfo.algorithm){case"DES-CBC":a=8,f=e.des.createDecryptionCipher;break;case"DES-EDE3-CBC":a=24,f=e.des.createDecryptionCipher;break;case"AES-128-CBC":a=16,f=e.aes.createDecryptionCipher;break;case"AES-192-CBC":a=24,f=e.aes.createDecryptionCipher;break;case"AES-256-CBC":a=32,f=e.aes.createDecryptionCipher;break;case"RC2-40-CBC":a=5,f=function(t){return e.rc2.createDecryptionCipher(t,40)};break;case"RC2-64-CBC":a=8,f=function(t){return e.rc2.createDecryptionCipher(t,64)};break;case"RC2-128-CBC":a=16,f=function(t){return e.rc2.createDecryptionCipher(t,128)};break;default:var u=new Error('Could not decrypt private key; unsupported encryption algorithm "'+o.dekInfo.algorithm+'".');throw u.algorithm=o.dekInfo.algorithm,u}var l=e.util.hexToBytes(o.dekInfo.parameters),c=e.pbe.opensslDeriveBytes(i,l.substr(0,8),a),h=f(c);h.start(l),h.update(e.util.createBuffer(o.body));if(!h.finish())return s;s=h.output.getBytes()}else s=o.body;return o.type==="ENCRYPTED PRIVATE KEY"?s=r.decryptPrivateKeyInfo(n.fromDer(s),i):s=n.fromDer(s),s!==null&&(s=r.privateKeyFromAsn1(s)),s},r.pbe.generatePkcs12Key=function(t,n,r,i,s,o){var u,a;if(typeof o=="undefined"||o===null)o=e.md.sha1.create();var f=o.digestLength,l=o.blockLength,c=new e.util.ByteBuffer,h=new e.util.ByteBuffer;if(t!==null&&t!==undefined){for(a=0;a<t.length;a++)h.putInt16(t.charCodeAt(a));h.putInt16(0)}var p=h.length(),d=n.length(),v=new e.util.ByteBuffer;v.fillWithByte(r,l);var m=l*Math.ceil(d/l),g=new e.util.ByteBuffer;for(a=0;a<m;a++)g.putByte(n.at(a%d));var y=l*Math.ceil(p/l),b=new e.util.ByteBuffer;for(a=0;a<y;a++)b.putByte(h.at(a%p));var w=g;w.putBuffer(b);var E=Math.ceil(s/f);for(var S=1;S<=E;S++){var x=new e.util.ByteBuffer;x.putBytes(v.bytes()),x.putBytes(w.bytes());for(var T=0;T<i;T++)o.start(),o.update(x.getBytes()),x=o.digest();var N=new e.util.ByteBuffer;for(a=0;a<l;a++)N.putByte(x.at(a%f));var C=Math.ceil(d/l)+Math.ceil(p/l),k=new e.util.ByteBuffer;for(u=0;u<C;u++){var L=new e.util.ByteBuffer(w.getBytes(l)),A=511;for(a=N.length()-1;a>=0;a--)A>>=8,A+=N.at(a)+L.at(a),L.setAt(a,A&255);k.putBuffer(L)}w=k,c.putBuffer(x)}return c.truncate(c.length()-s),c},r.pbe.getCipher=function(e,t,n){switch(e){case r.oids.pkcs5PBES2:return r.pbe.getCipherForPBES2(e,t,n);case r.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case r.oids["pbewithSHAAnd40BitRC2-CBC"]:return r.pbe.getCipherForPKCS12PBE(e,t,n);default:var i=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw i.oid=e,i.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],i}},r.pbe.getCipherForPBES2=function(t,i,s){var u={},a=[];if(!n.validate(i,o,u,a)){var f=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw f.errors=a,f}t=n.derToOid(u.kdfOid);if(t!==r.oids.pkcs5PBKDF2){var f=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw f.oid=t,f.supportedOids=["pkcs5PBKDF2"],f}t=n.derToOid(u.encOid);if(t!==r.oids["aes128-CBC"]&&t!==r.oids["aes192-CBC"]&&t!==r.oids["aes256-CBC"]&&t!==r.oids["des-EDE3-CBC"]&&t!==r.oids.desCBC){var f=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw f.oid=t,f.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],f}var l=u.kdfSalt,c=e.util.createBuffer(u.kdfIterationCount);c=c.getInt(c.length()<<3);var h,p;switch(r.oids[t]){case"aes128-CBC":h=16,p=e.aes.createDecryptionCipher;break;case"aes192-CBC":h=24,p=e.aes.createDecryptionCipher;break;case"aes256-CBC":h=32,p=e.aes.createDecryptionCipher;break;case"des-EDE3-CBC":h=24,p=e.des.createDecryptionCipher;break;case"desCBC":h=8,p=e.des.createDecryptionCipher}var d=e.pkcs5.pbkdf2(s,l,c,h),v=u.encIv,m=p(d);return m.start(v),m},r.pbe.getCipherForPKCS12PBE=function(t,i,s){var o={},a=[];if(!n.validate(i,u,o,a)){var f=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw f.errors=a,f}var l=e.util.createBuffer(o.salt),c=e.util.createBuffer(o.iterations);c=c.getInt(c.length()<<3);var h,p,d;switch(t){case r.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:h=24,p=8,d=e.des.startDecrypting;break;case r.oids["pbewithSHAAnd40BitRC2-CBC"]:h=5,p=8,d=function(t,n){var r=e.rc2.createDecryptionCipher(t,40);return r.start(n,null),r};break;default:var f=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw f.oid=t,f}var v=r.pbe.generatePkcs12Key(s,l,1,c,h),m=r.pbe.generatePkcs12Key(s,l,2,c,p);return d(v,m)},r.pbe.opensslDeriveBytes=function(t,n,r,i){if(typeof i=="undefined"||i===null)i=e.md.md5.create();n===null&&(n="");var s=[a(i,t+n)];for(var o=16,u=1;o<r;++u,o+=16)s.push(a(i,s[u-1]+t+n));return s.join("").substr(0,r)}}var r="pbe";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pbe",["require","module","./aes","./asn1","./des","./md","./oids","./pem","./pbkdf2","./random","./rc2","./rsa","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t=e.asn1,n=e.pkcs7asn1=e.pkcs7asn1||{};e.pkcs7=e.pkcs7||{},e.pkcs7.asn1=n;var r={name:"ContentInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};n.contentInfoValidator=r;var i={name:"EncryptedContentInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:t.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};n.envelopedDataValidator={name:"EnvelopedData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(i)},n.encryptedDataValidator={name:"EncryptedData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"}].concat(i)};var s={name:"SignerInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:t.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};n.signedDataValidator={name:"SignedData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},r,{name:"SignedData.Certificates",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,capture:"signerInfos",optional:!0,value:[s]}]},n.recipientInfoValidator={name:"RecipientInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:t.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter"}]},{name:"RecipientInfo.encryptedKey",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}}var r="pkcs7asn1";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pkcs7asn1",["require","module","./asn1","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){e.mgf=e.mgf||{};var t=e.mgf.mgf1=e.mgf1=e.mgf1||{};t.create=function(t){var n={generate:function(n,r){var i=new e.util.ByteBuffer,s=Math.ceil(r/t.digestLength);for(var o=0;o<s;o++){var u=new e.util.ByteBuffer;u.putInt32(o),t.start(),t.update(n+u.getBytes()),i.putBuffer(t.digest())}return i.truncate(i.length()-r),i.getBytes()}};return n}}var r="mgf1";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/mgf1",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){e.mgf=e.mgf||{},e.mgf.mgf1=e.mgf1}var r="mgf";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/mgf",["require","module","./mgf1"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t=e.pss=e.pss||{};t.create=function(t){arguments.length===3&&(t={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var n=t.md,r=t.mgf,i=n.digestLength,s=t.salt||null;typeof s=="string"&&(s=e.util.createBuffer(s));var o;if("saltLength"in t)o=t.saltLength;else{if(s===null)throw new Error("Salt length not specified or specific salt not given.");o=s.length()}if(s!==null&&s.length()!==o)throw new Error("Given salt length does not match length of given salt.");var u=t.prng||e.random,a={};return a.encode=function(t,a){var f,l=a-1,c=Math.ceil(l/8),h=t.digest().getBytes();if(c<i+o+2)throw new Error("Message is too long to encrypt.");var p;s===null?p=u.getBytesSync(o):p=s.bytes();var d=new e.util.ByteBuffer;d.fillWithByte(0,8),d.putBytes(h),d.putBytes(p),n.start(),n.update(d.getBytes());var v=n.digest().getBytes(),m=new e.util.ByteBuffer;m.fillWithByte(0,c-o-i-2),m.putByte(1),m.putBytes(p);var g=m.getBytes(),y=c-i-1,b=r.generate(v,y),w="";for(f=0;f<y;f++)w+=String.fromCharCode(g.charCodeAt(f)^b.charCodeAt(f));var E=65280>>8*c-l&255;return w=String.fromCharCode(w.charCodeAt(0)&~E)+w.substr(1),w+v+String.fromCharCode(188)},a.verify=function(t,s,u){var a,f=u-1,l=Math.ceil(f/8);s=s.substr(-l);if(l<i+o+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(s.charCodeAt(l-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var c=l-i-1,h=s.substr(0,c),p=s.substr(c,i),d=65280>>8*l-f&255;if((h.charCodeAt(0)&d)!==0)throw new Error("Bits beyond keysize not zero as expected.");var v=r.generate(p,c),m="";for(a=0;a<c;a++)m+=String.fromCharCode(h.charCodeAt(a)^v.charCodeAt(a));m=String.fromCharCode(m.charCodeAt(0)&~d)+m.substr(1);var g=l-i-o-2;for(a=0;a<g;a++)if(m.charCodeAt(a)!==0)throw new Error("Leftmost octets not zero as expected");if(m.charCodeAt(g)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var y=m.substr(-o),b=new e.util.ByteBuffer;b.fillWithByte(0,8),b.putBytes(t),b.putBytes(y),n.start(),n.update(b.getBytes());var w=n.digest().getBytes();return p===w},a}}var r="pss";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pss",["require","module","./random","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function l(e,t){typeof t=="string"&&(t={shortName:t});var n=null,r;for(var i=0;n===null&&i<e.attributes.length;++i)r=e.attributes[i],t.type&&t.type===r.type?n=r:t.name&&t.name===r.name?n=r:t.shortName&&t.shortName===r.shortName&&(n=r);return n}function h(n){var r=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),i,s,o=n.attributes;for(var u=0;u<o.length;++u){i=o[u];var a=i.value,f=t.Type.PRINTABLESTRING;"valueTagClass"in i&&(f=i.valueTagClass,f===t.Type.UTF8&&(a=e.util.encodeUtf8(a))),s=t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(i.type).getBytes()),t.create(t.Class.UNIVERSAL,f,!1,a)])]),r.value.push(s)}return r}function p(n){var r={};for(var i=0;i<n.length;++i){var s=n[i];if(s.shortName&&(s.valueTagClass===t.Type.UTF8||s.valueTagClass===t.Type.PRINTABLESTRING||s.valueTagClass===t.Type.IA5STRING)){var o=s.value;s.valueTagClass===t.Type.UTF8&&(o=e.util.encodeUtf8(s.value)),s.shortName in r?e.util.isArray(r[s.shortName])?r[s.shortName].push(o):r[s.shortName]=[r[s.shortName],o]:r[s.shortName]=o}}return r}function d(e){var s;for(var o=0;o<e.length;++o){s=e[o],typeof s.name=="undefined"&&(s.type&&s.type in n.oids?s.name=n.oids[s.type]:s.shortName&&s.shortName in i&&(s.name=n.oids[i[s.shortName]]));if(typeof s.type=="undefined"){if(!(s.name&&s.name in n.oids)){var u=new Error("Attribute type not specified.");throw u.attribute=s,u}s.type=n.oids[s.name]}typeof s.shortName=="undefined"&&s.name&&s.name in i&&(s.shortName=i[s.name]);if(s.type===r.extensionRequest){s.valueConstructed=!0,s.valueTagClass=t.Type.SEQUENCE;if(!s.value&&s.extensions){s.value=[];for(var a=0;a<s.extensions.length;++a)s.value.push(n.certificateExtensionToAsn1(v(s.extensions[a])))}}if(typeof s.value=="undefined"){var u=new Error("Attribute value not specified.");throw u.attribute=s,u}}}function v(i,s){s=s||{},typeof i.name=="undefined"&&i.id&&i.id in n.oids&&(i.name=n.oids[i.id]);if(typeof i.id=="undefined"){if(!(i.name&&i.name in n.oids)){var o=new Error("Extension ID not specified.");throw o.extension=i,o}i.id=n.oids[i.name]}if(typeof i.value!="undefined")return i;if(i.name==="keyUsage"){var u=0,a=0,f=0;i.digitalSignature&&(a|=128,u=7),i.nonRepudiation&&(a|=64,u=6),i.keyEncipherment&&(a|=32,u=5),i.dataEncipherment&&(a|=16,u=4),i.keyAgreement&&(a|=8,u=3),i.keyCertSign&&(a|=4,u=2),i.cRLSign&&(a|=2,u=1),i.encipherOnly&&(a|=1,u=0),i.decipherOnly&&(f|=128,u=7);var l=String.fromCharCode(u);f!==0?l+=String.fromCharCode(a)+String.fromCharCode(f):a!==0&&(l+=String.fromCharCode(a)),i.value=t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,l)}else if(i.name==="basicConstraints")i.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]),i.cA&&i.value.value.push(t.create(t.Class.UNIVERSAL,t.Type.BOOLEAN,!1,String.fromCharCode(255))),"pathLenConstraint"in i&&i.value.value.push(t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(i.pathLenConstraint).getBytes()));else if(i.name==="extKeyUsage"){i.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);var c=i.value.value;for(var h in i){if(i[h]!==!0)continue;h in r?c.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(r[h]).getBytes())):h.indexOf(".")!==-1&&c.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(h).getBytes()))}}else if(i.name==="nsCertType"){var u=0,a=0;i.client&&(a|=128,u=7),i.server&&(a|=64,u=6),i.email&&(a|=32,u=5),i.objsign&&(a|=16,u=4),i.reserved&&(a|=8,u=3),i.sslCA&&(a|=4,u=2),i.emailCA&&(a|=2,u=1),i.objCA&&(a|=1,u=0);var l=String.fromCharCode(u);a!==0&&(l+=String.fromCharCode(a)),i.value=t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,l)}else if(i.name==="subjectAltName"||i.name==="issuerAltName"){i.value=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);var p;for(var d=0;d<i.altNames.length;++d){p=i.altNames[d];var l=p.value;if(p.type===7&&p.ip){l=e.util.bytesFromIP(p.ip);if(l===null){var o=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw o.extension=i,o}}else p.type===8&&(p.oid?l=t.oidToDer(t.oidToDer(p.oid)):l=t.oidToDer(l));i.value.value.push(t.create(t.Class.CONTEXT_SPECIFIC,p.type,!1,l))}}else if(i.name==="subjectKeyIdentifier"&&s.cert){var v=s.cert.generateSubjectKeyIdentifier();i.subjectKeyIdentifier=v.toHex(),i.value=t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,v.getBytes())}if(typeof i.value=="undefined"){var o=new Error("Extension value not specified.");throw o.extension=i,o}return i}function m(e,n){switch(e){case r["RSASSA-PSS"]:var i=[];return n.hash.algorithmOid!==undefined&&i.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.hash.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])])),n.mgf.algorithmOid!==undefined&&i.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.mgf.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.mgf.hash.algorithmOid).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])])])),n.saltLength!==undefined&&i.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(n.saltLength).getBytes())])),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,i);default:return t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")}}function g(n){var r=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[]);if(n.attributes.length===0)return r;var i=n.attributes;for(var s=0;s<i.length;++s){var o=i[s],u=o.value,a=t.Type.UTF8;"valueTagClass"in o&&(a=o.valueTagClass),a===t.Type.UTF8&&(u=e.util.encodeUtf8(u));var f=!1;"valueConstructed"in o&&(f=o.valueConstructed);var l=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(o.type).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,a,f,u)])]);r.value.push(l)}return r}var t=e.asn1,n=e.pki=e.pki||{},r=n.oids,i={};i.CN=r.commonName,i.commonName="CN",i.C=r.countryName,i.countryName="C",i.L=r.localityName,i.localityName="L",i.ST=r.stateOrProvinceName,i.stateOrProvinceName="ST",i.O=r.organizationName,i.organizationName="O",i.OU=r.organizationalUnitName,i.organizationalUnitName="OU",i.E=r.emailAddress,i.emailAddress="E";var s=e.pki.rsa.publicKeyValidator,o={name:"Certificate",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:t.Class.UNIVERSAL,type:t.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:t.Class.UNIVERSAL,type:t.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:t.Class.UNIVERSAL,type:t.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:t.Class.UNIVERSAL,type:t.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},s,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,capture:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:t.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,capture:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:t.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,capture:"certSignature"}]},u={name:"rsapss",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:t.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:t.Class.UNIVERSAL,type:t.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:t.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:t.Class.UNIVERSAL,type:t.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:t.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:t.Class.UNIVERSAL,type:t.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},a={name:"CertificationRequestInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},s,{name:"CertificationRequestInfo.attributes",tagClass:t.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0}]}]}]},f={name:"CertificationRequest",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[a,{name:"CertificationRequest.signatureAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:t.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:t.Class.UNIVERSAL,type:t.Type.BITSTRING,constructed:!1,capture:"csrSignature"}]};n.RDNAttributesAsArray=function(e,n){var s=[],o,u,a;for(var f=0;f<e.value.length;++f){o=e.value[f];for(var l=0;l<o.value.length;++l)a={},u=o.value[l],a.type=t.derToOid(u.value[0].value),a.value=u.value[1].value,a.valueTagClass=u.value[1].type,a.type in r&&(a.name=r[a.type],a.name in i&&(a.shortName=i[a.name])),n&&(n.update(a.type),n.update(a.value)),s.push(a)}return s},n.CRIAttributesAsArray=function(e){var s=[];for(var o=0;o<e.length;++o){var u=e[o],a=t.derToOid(u.value[0].value),f=u.value[1].value;for(var l=0;l<f.length;++l){var c={};c.type=a,c.value=f[l].value,c.valueTagClass=f[l].type,c.type in r&&(c.name=r[c.type],c.name in i&&(c.shortName=i[c.name]));if(c.type===r.extensionRequest){c.extensions=[];for(var h=0;h<c.value.length;++h)c.extensions.push(n.certificateExtensionFromAsn1(c.value[h]))}s.push(c)}}return s};var c=function(e,n,i){var s={};if(e!==r["RSASSA-PSS"])return s;i&&(s={hash:{algorithmOid:r.sha1},mgf:{algorithmOid:r.mgf1,hash:{algorithmOid:r.sha1}},saltLength:20});var o={},a=[];if(!t.validate(n,u,o,a)){var f=new Error("Cannot read RSASSA-PSS parameter block.");throw f.errors=a,f}return o.hashOid!==undefined&&(s.hash=s.hash||{},s.hash.algorithmOid=t.derToOid(o.hashOid)),o.maskGenOid!==undefined&&(s.mgf=s.mgf||{},s.mgf.algorithmOid=t.derToOid(o.maskGenOid),s.mgf.hash=s.mgf.hash||{},s.mgf.hash.algorithmOid=t.derToOid(o.maskGenHashOid)),o.saltLength!==undefined&&(s.saltLength=o.saltLength.charCodeAt(0)),s};n.certificateFromPem=function(r,i,s){var o=e.pem.decode(r)[0];if(o.type!=="CERTIFICATE"&&o.type!=="X509 CERTIFICATE"&&o.type!=="TRUSTED CERTIFICATE"){var u=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw u.headerType=o.type,u}if(o.procType&&o.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var a=t.fromDer(o.body,s);return n.certificateFromAsn1(a,i)},n.certificateToPem=function(r,i){var s={type:"CERTIFICATE",body:t.toDer(n.certificateToAsn1(r)).getBytes()};return e.pem.encode(s,{maxline:i})},n.publicKeyFromPem=function(r){var i=e.pem.decode(r)[0];if(i.type!=="PUBLIC KEY"&&i.type!=="RSA PUBLIC KEY"){var s=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw s.headerType=i.type,s}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var o=t.fromDer(i.body);return n.publicKeyFromAsn1(o)},n.publicKeyToPem=function(r,i){var s={type:"PUBLIC KEY",body:t.toDer(n.publicKeyToAsn1(r)).getBytes()};return e.pem.encode(s,{maxline:i})},n.publicKeyToRSAPublicKeyPem=function(r,i){var s={type:"RSA PUBLIC KEY",body:t.toDer(n.publicKeyToRSAPublicKey(r)).getBytes()};return e.pem.encode(s,{maxline:i})},n.getPublicKeyFingerprint=function(r,i){i=i||{};var s=i.md||e.md.sha1.create(),o=i.type||"RSAPublicKey",u;switch(o){case"RSAPublicKey":u=t.toDer(n.publicKeyToRSAPublicKey(r)).getBytes();break;case"SubjectPublicKeyInfo":u=t.toDer(n.publicKeyToAsn1(r)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+i.type+'".')}s.start(),s.update(u);var a=s.digest();if(i.encoding==="hex"){var f=a.toHex();return i.delimiter?f.match(/.{2}/g).join(i.delimiter):f}if(i.encoding==="binary")return a.getBytes();if(i.encoding)throw new Error('Unknown encoding "'+i.encoding+'".');return a},n.certificationRequestFromPem=function(r,i,s){var o=e.pem.decode(r)[0];if(o.type!=="CERTIFICATE REQUEST"){var u=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw u.headerType=o.type,u}if(o.procType&&o.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var a=t.fromDer(o.body,s);return n.certificationRequestFromAsn1(a,i)},n.certificationRequestToPem=function(r,i){var s={type:"CERTIFICATE REQUEST",body:t.toDer(n.certificationRequestToAsn1(r)).getBytes()};return e.pem.encode(s,{maxline:i})},n.createCertificate=function(){var i={};return i.version=2,i.serialNumber="00",i.signatureOid=null,i.signature=null,i.siginfo={},i.siginfo.algorithmOid=null,i.validity={},i.validity.notBefore=new Date,i.validity.notAfter=new Date,i.issuer={},i.issuer.getField=function(e){return l(i.issuer,e)},i.issuer.addField=function(e){d([e]),i.issuer.attributes.push(e)},i.issuer.attributes=[],i.issuer.hash=null,i.subject={},i.subject.getField=function(e){return l(i.subject,e)},i.subject.addField=function(e){d([e]),i.subject.attributes.push(e)},i.subject.attributes=[],i.subject.hash=null,i.extensions=[],i.publicKey=null,i.md=null,i.setSubject=function(e,t){d(e),i.subject.attributes=e,delete i.subject.uniqueId,t&&(i.subject.uniqueId=t),i.subject.hash=null},i.setIssuer=function(e,t){d(e),i.issuer.attributes=e,delete i.issuer.uniqueId,t&&(i.issuer.uniqueId=t),i.issuer.hash=null},i.setExtensions=function(e){for(var t=0;t<e.length;++t)v(e[t],{cert:i});i.extensions=e},i.getExtension=function(e){typeof e=="string"&&(e={name:e});var t=null,n;for(var r=0;t===null&&r<i.extensions.length;++r)n=i.extensions[r],e.id&&n.id===e.id?t=n:e.name&&n.name===e.name&&(t=n);return t},i.sign=function(s,o){i.md=o||e.md.sha1.create();var u=r[i.md.algorithm+"WithRSAEncryption"];if(!u){var a=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw a.algorithm=i.md.algorithm,a}i.signatureOid=i.siginfo.algorithmOid=u,i.tbsCertificate=n.getTBSCertificate(i);var f=t.toDer(i.tbsCertificate);i.md.update(f.getBytes()),i.signature=s.sign(i.md)},i.verify=function(s){var o=!1;if(!i.issued(s)){var u=s.issuer,a=i.subject,f=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw f.expectedIssuer=u.attributes,f.actualIssuer=a.attributes,f}var l=s.md;if(l===null){if(s.signatureOid in r){var c=r[s.signatureOid];switch(c){case"sha1WithRSAEncryption":l=e.md.sha1.create();break;case"md5WithRSAEncryption":l=e.md.md5.create();break;case"sha256WithRSAEncryption":l=e.md.sha256.create();break;case"RSASSA-PSS":l=e.md.sha256.create()}}if(l===null){var f=new Error("Could not compute certificate digest. Unknown signature OID.");throw f.signatureOid=s.signatureOid,f}var h=s.tbsCertificate||n.getTBSCertificate(s),p=t.toDer(h);l.update(p.getBytes())}if(l!==null){var d;switch(s.signatureOid){case r.sha1WithRSAEncryption:d=undefined;break;case r["RSASSA-PSS"]:var v,m;v=r[s.signatureParameters.mgf.hash.algorithmOid];if(v===undefined||e.md[v]===undefined){var f=new Error("Unsupported MGF hash function.");throw f.oid=s.signatureParameters.mgf.hash.algorithmOid,f.name=v,f}m=r[s.signatureParameters.mgf.algorithmOid];if(m===undefined||e.mgf[m]===undefined){var f=new Error("Unsupported MGF function.");throw f.oid=s.signatureParameters.mgf.algorithmOid,f.name=m,f}m=e.mgf[m].create(e.md[v].create()),v=r[s.signatureParameters.hash.algorithmOid];if(v===undefined||e.md[v]===undefined)throw{message:"Unsupported RSASSA-PSS hash function.",oid:s.signatureParameters.hash.algorithmOid,name:v};d=e.pss.create(e.md[v].create(),m,s.signatureParameters.saltLength)}o=i.publicKey.verify(l.digest().getBytes(),s.signature,d)}return o},i.isIssuer=function(e){var t=!1,n=i.issuer,r=e.subject;if(n.hash&&r.hash)t=n.hash===r.hash;else if(n.attributes.length===r.attributes.length){t=!0;var s,o;for(var u=0;t&&u<n.attributes.length;++u){s=n.attributes[u],o=r.attributes[u];if(s.type!==o.type||s.value!==o.value)t=!1}}return t},i.issued=function(e){return e.isIssuer(i)},i.generateSubjectKeyIdentifier=function(){return n.getPublicKeyFingerprint(i.publicKey,{type:"RSAPublicKey"})},i.verifySubjectKeyIdentifier=function(){var t=r.subjectKeyIdentifier;for(var n=0;n<i.extensions.length;++n){var s=i.extensions[n];if(s.id===t){var o=i.generateSubjectKeyIdentifier().getBytes();return e.util.hexToBytes(s.subjectKeyIdentifier)===o}}return!1},i},n.certificateFromAsn1=function(i,s){var u={},a=[];if(!t.validate(i,o,u,a)){var f=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw f.errors=a,f}if(typeof u.certSignature!="string"){var h="\0";for(var p=0;p<u.certSignature.length;++p)h+=t.toDer(u.certSignature[p]).getBytes();u.certSignature=h}var v=t.derToOid(u.publicKeyOid);if(v!==n.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var m=n.createCertificate();m.version=u.certVersion?u.certVersion.charCodeAt(0):0;var g=e.util.createBuffer(u.certSerialNumber);m.serialNumber=g.toHex(),m.signatureOid=e.asn1.derToOid(u.certSignatureOid),m.signatureParameters=c(m.signatureOid,u.certSignatureParams,!0),m.siginfo.algorithmOid=e.asn1.derToOid(u.certinfoSignatureOid),m.siginfo.parameters=c(m.siginfo.algorithmOid,u.certinfoSignatureParams,!1);var y=e.util.createBuffer(u.certSignature);++y.read,m.signature=y.getBytes();var b=[];u.certValidity1UTCTime!==undefined&&b.push(t.utcTimeToDate(u.certValidity1UTCTime)),u.certValidity2GeneralizedTime!==undefined&&b.push(t.generalizedTimeToDate(u.certValidity2GeneralizedTime)),u.certValidity3UTCTime!==undefined&&b.push(t.utcTimeToDate(u.certValidity3UTCTime)),u.certValidity4GeneralizedTime!==undefined&&b.push(t.generalizedTimeToDate(u.certValidity4GeneralizedTime));if(b.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(b.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");m.validity.notBefore=b[0],m.validity.notAfter=b[1],m.tbsCertificate=u.tbsCertificate;if(s){m.md=null;if(m.signatureOid in r){var v=r[m.signatureOid];switch(v){case"sha1WithRSAEncryption":m.md=e.md.sha1.create();break;case"md5WithRSAEncryption":m.md=e.md.md5.create();break;case"sha256WithRSAEncryption":m.md=e.md.sha256.create();break;case"RSASSA-PSS":m.md=e.md.sha256.create()}}if(m.md===null){var f=new Error("Could not compute certificate digest. Unknown signature OID.");throw f.signatureOid=m.signatureOid,f}var w=t.toDer(m.tbsCertificate);m.md.update(w.getBytes())}var E=e.md.sha1.create();m.issuer.getField=function(e){return l(m.issuer,e)},m.issuer.addField=function(e){d([e]),m.issuer.attributes.push(e)},m.issuer.attributes=n.RDNAttributesAsArray(u.certIssuer,E),u.certIssuerUniqueId&&(m.issuer.uniqueId=u.certIssuerUniqueId),m.issuer.hash=E.digest().toHex();var S=e.md.sha1.create();return m.subject.getField=function(e){return l(m.subject,e)},m.subject.addField=function(e){d([e]),m.subject.attributes.push(e)},m.subject.attributes=n.RDNAttributesAsArray(u.certSubject,S),u.certSubjectUniqueId&&(m.subject.uniqueId=u.certSubjectUniqueId),m.subject.hash=S.digest().toHex(),u.certExtensions?m.extensions=n.certificateExtensionsFromAsn1(u.certExtensions):m.extensions=[],m.publicKey=n.publicKeyFromAsn1(u.subjectPublicKeyInfo),m},n.certificateExtensionsFromAsn1=function(e){var t=[];for(var r=0;r<e.value.length;++r){var i=e.value[r];for(var s=0;s<i.value.length;++s)t.push(n.certificateExtensionFromAsn1(i.value[s]))}return t},n.certificateExtensionFromAsn1=function(n){var i={};i.id=t.derToOid(n.value[0].value),i.critical=!1,n.value[1].type===t.Type.BOOLEAN?(i.critical=n.value[1].value.charCodeAt(0)!==0,i.value=n.value[2].value):i.value=n.value[1].value;if(i.id in r){i.name=r[i.id];if(i.name==="keyUsage"){var s=t.fromDer(i.value),o=0,u=0;s.value.length>1&&(o=s.value.charCodeAt(1),u=s.value.length>2?s.value.charCodeAt(2):0),i.digitalSignature=(o&128)===128,i.nonRepudiation=(o&64)===64,i.keyEncipherment=(o&32)===32,i.dataEncipherment=(o&16)===16,i.keyAgreement=(o&8)===8,i.keyCertSign=(o&4)===4,i.cRLSign=(o&2)===2,i.encipherOnly=(o&1)===1,i.decipherOnly=(u&128)===128}else if(i.name==="basicConstraints"){var s=t.fromDer(i.value);s.value.length>0&&s.value[0].type===t.Type.BOOLEAN?i.cA=s.value[0].value.charCodeAt(0)!==0:i.cA=!1;var a=null;s.value.length>0&&s.value[0].type===t.Type.INTEGER?a=s.value[0].value:s.value.length>1&&(a=s.value[1].value),a!==null&&(i.pathLenConstraint=t.derToInteger(a))}else if(i.name==="extKeyUsage"){var s=t.fromDer(i.value);for(var f=0;f<s.value.length;++f){var l=t.derToOid(s.value[f].value);l in r?i[r[l]]=!0:i[l]=!0}}else if(i.name==="nsCertType"){var s=t.fromDer(i.value),o=0;s.value.length>1&&(o=s.value.charCodeAt(1)),i.client=(o&128)===128,i.server=(o&64)===64,i.email=(o&32)===32,i.objsign=(o&16)===16,i.reserved=(o&8)===8,i.sslCA=(o&4)===4,i.emailCA=(o&2)===2,i.objCA=(o&1)===1}else if(i.name==="subjectAltName"||i.name==="issuerAltName"){i.altNames=[];var c,s=t.fromDer(i.value);for(var h=0;h<s.value.length;++h){c=s.value[h];var p={type:c.type,value:c.value};i.altNames.push(p);switch(c.type){case 1:case 2:case 6:break;case 7:p.ip=e.util.bytesToIP(c.value);break;case 8:p.oid=t.derToOid(c.value);break;default:}}}else if(i.name==="subjectKeyIdentifier"){var s=t.fromDer(i.value);i.subjectKeyIdentifier=e.util.bytesToHex(s.value)}}return i},n.certificationRequestFromAsn1=function(i,s){var o={},u=[];if(!t.validate(i,f,o,u)){var a=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw a.errors=u,a}if(typeof o.csrSignature!="string"){var h="\0";for(var p=0;p<o.csrSignature.length;++p)h+=t.toDer(o.csrSignature[p]).getBytes();o.csrSignature=h}var v=t.derToOid(o.publicKeyOid);if(v!==n.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var m=n.createCertificationRequest();m.version=o.csrVersion?o.csrVersion.charCodeAt(0):0,m.signatureOid=e.asn1.derToOid(o.csrSignatureOid),m.signatureParameters=c(m.signatureOid,o.csrSignatureParams,!0),m.siginfo.algorithmOid=e.asn1.derToOid(o.csrSignatureOid),m.siginfo.parameters=c(m.siginfo.algorithmOid,o.csrSignatureParams,!1);var g=e.util.createBuffer(o.csrSignature);++g.read,m.signature=g.getBytes(),m.certificationRequestInfo=o.certificationRequestInfo;if(s){m.md=null;if(m.signatureOid in r){var v=r[m.signatureOid];switch(v){case"sha1WithRSAEncryption":m.md=e.md.sha1.create();break;case"md5WithRSAEncryption":m.md=e.md.md5.create();break;case"sha256WithRSAEncryption":m.md=e.md.sha256.create();break;case"RSASSA-PSS":m.md=e.md.sha256.create()}}if(m.md===null){var a=new Error("Could not compute certification request digest. Unknown signature OID.");throw a.signatureOid=m.signatureOid,a}var y=t.toDer(m.certificationRequestInfo);m.md.update(y.getBytes())}var b=e.md.sha1.create();return m.subject.getField=function(e){return l(m.subject,e)},m.subject.addField=function(e){d([e]),m.subject.attributes.push(e)},m.subject.attributes=n.RDNAttributesAsArray(o.certificationRequestInfoSubject,b),m.subject.hash=b.digest().toHex(),m.publicKey=n.publicKeyFromAsn1(o.subjectPublicKeyInfo),m.getAttribute=function(e){return l(m,e)},m.addAttribute=function(e){d([e]),m.attributes.push(e)},m.attributes=n.CRIAttributesAsArray(o.certificationRequestInfoAttributes||[]),m},n.createCertificationRequest=function(){var i={};return i.version=0,i.signatureOid=null,i.signature=null,i.siginfo={},i.siginfo.algorithmOid=null,i.subject={},i.subject.getField=function(e){return l(i.subject,e)},i.subject.addField=function(e){d([e]),i.subject.attributes.push(e)},i.subject.attributes=[],i.subject.hash=null,i.publicKey=null,i.attributes=[],i.getAttribute=function(e){return l(i,e)},i.addAttribute=function(e){d([e]),i.attributes.push(e)},i.md=null,i.setSubject=function(e){d(e),i.subject.attributes=e,i.subject.hash=null},i.setAttributes=function(e){d(e),i.attributes=e},i.sign=function(s,o){i.md=o||e.md.sha1.create();var u=r[i.md.algorithm+"WithRSAEncryption"];if(!u){var a=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw a.algorithm=i.md.algorithm,a}i.signatureOid=i.siginfo.algorithmOid=u,i.certificationRequestInfo=n.getCertificationRequestInfo(i);var f=t.toDer(i.certificationRequestInfo);i.md.update(f.getBytes()),i.signature=s.sign(i.md)},i.verify=function(){var s=!1,o=i.md;if(o===null){if(i.signatureOid in r){var u=r[i.signatureOid];switch(u){case"sha1WithRSAEncryption":o=e.md.sha1.create();break;case"md5WithRSAEncryption":o=e.md.md5.create();break;case"sha256WithRSAEncryption":o=e.md.sha256.create();break;case"RSASSA-PSS":o=e.md.sha256.create()}}if(o===null){var a=new Error("Could not compute certification request digest. Unknown signature OID.");throw a.signatureOid=i.signatureOid,a}var f=i.certificationRequestInfo||n.getCertificationRequestInfo(i),l=t.toDer(f);o.update(l.getBytes())}if(o!==null){var c;switch(i.signatureOid){case r.sha1WithRSAEncryption:break;case r["RSASSA-PSS"]:var h,p;h=r[i.signatureParameters.mgf.hash.algorithmOid];if(h===undefined||e.md[h]===undefined){var a=new Error("Unsupported MGF hash function.");throw a.oid=i.signatureParameters.mgf.hash.algorithmOid,a.name=h,a}p=r[i.signatureParameters.mgf.algorithmOid];if(p===undefined||e.mgf[p]===undefined){var a=new Error("Unsupported MGF function.");throw a.oid=i.signatureParameters.mgf.algorithmOid,a.name=p,a}p=e.mgf[p].create(e.md[h].create()),h=r[i.signatureParameters.hash.algorithmOid];if(h===undefined||e.md[h]===undefined){var a=new Error("Unsupported RSASSA-PSS hash function.");throw a.oid=i.signatureParameters.hash.algorithmOid,a.name=h,a}c=e.pss.create(e.md[h].create(),p,i.signatureParameters.saltLength)}s=i.publicKey.verify(o.digest().getBytes(),i.signature,c)}return s},i},n.getTBSCertificate=function(r){var i=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(r.version).getBytes())]),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,e.util.hexToBytes(r.serialNumber)),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(r.siginfo.algorithmOid).getBytes()),m(r.siginfo.algorithmOid,r.siginfo.parameters)]),h(r.issuer),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.UTCTIME,!1,t.dateToUtcTime(r.validity.notBefore)),t.create(t.Class.UNIVERSAL,t.Type.UTCTIME,!1,t.dateToUtcTime(r.validity.notAfter))]),h(r.subject),n.publicKeyToAsn1(r.publicKey)]);return r.issuer.uniqueId&&i.value.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,String.fromCharCode(0)+r.issuer.uniqueId)])),r.subject.uniqueId&&i.value.push(t.create(t.Class.CONTEXT_SPECIFIC,2,!0,[t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,String.fromCharCode(0)+r.subject.uniqueId)])),r.extensions.length>0&&i.value.push(n.certificateExtensionsToAsn1(r.extensions)),i},n.getCertificationRequestInfo=function(e){var r=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(e.version).getBytes()),h(e.subject),n.publicKeyToAsn1(e.publicKey),g(e)]);return r},n.distinguishedNameToAsn1=function(e){return h(e)},n.certificateToAsn1=function(e){var r=e.tbsCertificate||n.getTBSCertificate(e);return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[r,t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(e.signatureOid).getBytes()),m(e.signatureOid,e.signatureParameters)]),t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},n.certificateExtensionsToAsn1=function(e){var r=t.create(t.Class.CONTEXT_SPECIFIC,3,!0,[]),i=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);r.value.push(i);for(var s=0;s<e.length;++s)i.value.push(n.certificateExtensionToAsn1(e[s]));return r},n.certificateExtensionToAsn1=function(e){var n=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[]);n.value.push(t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(e.id).getBytes())),e.critical&&n.value.push(t.create(t.Class.UNIVERSAL,t.Type.BOOLEAN,!1,String.fromCharCode(255)));var r=e.value;return typeof e.value!="string"&&(r=t.toDer(r).getBytes()),n.value.push(t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,r)),n},n.certificationRequestToAsn1=function(e){var r=e.certificationRequestInfo||n.getCertificationRequestInfo(e);return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[r,t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(e.signatureOid).getBytes()),m(e.signatureOid,e.signatureParameters)]),t.create(t.Class.UNIVERSAL,t.Type.BITSTRING,!1,String.fromCharCode(0)+e.signature)])},n.createCaStore=function(r){function s(t){if(!t.hash){var r=e.md.sha1.create();t.attributes=n.RDNAttributesAsArray(h(t),r),t.hash=r.digest().toHex()}return i.certs[t.hash]||null}var i={certs:{}};i.getIssuer=function(e){var t=s(e.issuer);return t},i.addCertificate=function(t){typeof t=="string"&&(t=e.pki.certificateFromPem(t));if(!t.subject.hash){var r=e.md.sha1.create();t.subject.attributes=n.RDNAttributesAsArray(h(t.subject),r),t.subject.hash=r.digest().toHex()}if(t.subject.hash in i.certs){var s=i.certs[t.subject.hash];e.util.isArray(s)||(s=[s]),s.push(t)}else i.certs[t.subject.hash]=t},i.hasCertificate=function(r){var i=s(r.subject);if(!i)return!1;e.util.isArray(i)||(i=[i]);var o=t.toDer(n.certificateToAsn1(r)).getBytes();for(var u=0;u<i.length;++u){var a=t.toDer(n.certificateToAsn1(i[u])).getBytes();if(o===a)return!0}return!1};if(r)for(var o=0;o<r.length;++o){var u=r[o];i.addCertificate(u)}return i},n.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"},n.verifyCertificateChain=function(t,r,i){r=r.slice(0);var s=r.slice(0),o=new Date,u=!0,a=null,f=0;do{var l=r.shift(),c=null,h=!1;if(o<l.validity.notBefore||o>l.validity.notAfter)a={message:"Certificate is not valid yet or has expired.",error:n.certificateError.certificate_expired,notBefore:l.validity.notBefore,notAfter:l.validity.notAfter,now:o};if(a===null){c=r[0]||t.getIssuer(l),c===null&&l.isIssuer(l)&&(h=!0,c=l);if(c){var p=c;e.util.isArray(p)||(p=[p]);var d=!1;while(!d&&p.length>0){c=p.shift();try{d=c.verify(l)}catch(v){}}d||(a={message:"Certificate signature is invalid.",error:n.certificateError.bad_certificate})}a===null&&(!c||h)&&!t.hasCertificate(l)&&(a={message:"Certificate is not trusted.",error:n.certificateError.unknown_ca})}a===null&&c&&!l.isIssuer(c)&&(a={message:"Certificate issuer is invalid.",error:n.certificateError.bad_certificate});if(a===null){var m={keyUsage:!0,basicConstraints:!0};for(var g=0;a===null&&g<l.extensions.length;++g){var y=l.extensions[g];y.critical&&!(y.name in m)&&(a={message:"Certificate has an unsupported critical extension.",error:n.certificateError.unsupported_certificate})}}if(a===null&&(!u||r.length===0&&(!c||h))){var b=l.getExtension("basicConstraints"),w=l.getExtension("keyUsage");w!==null&&(!w.keyCertSign||b===null)&&(a={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:n.certificateError.bad_certificate}),a===null&&b!==null&&!b.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:n.certificateError.bad_certificate});if(a===null&&w!==null&&"pathLenConstraint"in b){var E=f-1;E>b.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:n.certificateError.bad_certificate})}}var S=a===null?!0:a.error,x=i?i(S,f,s):S;if(x!==!0){S===!0&&(a={message:"The application rejected the certificate.",error:n.certificateError.bad_certificate});if(x||x===0)typeof x=="object"&&!e.util.isArray(x)?(x.message&&(a.message=x.message),x.error&&(a.error=x.error)):typeof x=="string"&&(a.error=x);throw a}a=null,u=!1,++f}while(r.length>0);return!0}}var r="x509";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n.pki}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/x509",["require","module","./aes","./asn1","./des","./md","./mgf","./oids","./pem","./pss","./rsa","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function f(e,t,n,r){var i=[];for(var s=0;s<e.length;s++)for(var o=0;o<e[s].safeBags.length;o++){var u=e[s].safeBags[o];if(r!==undefined&&u.type!==r)continue;if(t===null){i.push(u);continue}u.attributes[t]!==undefined&&u.attributes[t].indexOf(n)>=0&&i.push(u)}return i}function l(t){if(t.composed||t.constructed){var n=e.util.createBuffer();for(var r=0;r<t.value.length;++r)n.putBytes(t.value[r].value);t.composed=t.constructed=!1,t.value=n.getBytes()}return t}function c(e,r,s,o){r=t.fromDer(r,s);if(r.tagClass!==t.Class.UNIVERSAL||r.type!==t.Type.SEQUENCE||r.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var u=0;u<r.value.length;u++){var a=r.value[u],f={},c=[];if(!t.validate(a,i,f,c)){var d=new Error("Cannot read ContentInfo.");throw d.errors=c,d}var v={encrypted:!1},m=null,g=f.content.value[0];switch(t.derToOid(f.contentType)){case n.oids.data:if(g.tagClass!==t.Class.UNIVERSAL||g.type!==t.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");m=l(g).value;break;case n.oids.encryptedData:m=h(g,o),v.encrypted=!0;break;default:var d=new Error("Unsupported PKCS#12 contentType.");throw d.contentType=t.derToOid(f.contentType),d}v.safeBags=p(m,s,o),e.safeContents.push(v)}}function h(r,i){var s={},o=[];if(!t.validate(r,e.pkcs7.asn1.encryptedDataValidator,s,o)){var u=new Error("Cannot read EncryptedContentInfo.");throw u.errors=o,u}var a=t.derToOid(s.contentType);if(a!==n.oids.data){var u=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw u.oid=a,u}a=t.derToOid(s.encAlgorithm);var f=n.pbe.getCipher(a,s.encParameter,i),c=l(s.encryptedContentAsn1),h=e.util.createBuffer(c.value);f.update(h);if(!f.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return f.output.getBytes()}function p(e,r,i){if(!r&&e.length===0)return[];e=t.fromDer(e,r);if(e.tagClass!==t.Class.UNIVERSAL||e.type!==t.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");var s=[];for(var u=0;u<e.value.length;u++){var f=e.value[u],l={},c=[];if(!t.validate(f,o,l,c)){var h=new Error("Cannot read SafeBag.");throw h.errors=c,h}var p={type:t.derToOid(l.bagId),attributes:d(l.bagAttributes)};s.push(p);var v,m,g=l.bagValue.value[0];switch(p.type){case n.oids.pkcs8ShroudedKeyBag:g=n.decryptPrivateKeyInfo(g,i);if(g===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case n.oids.keyBag:try{p.key=n.privateKeyFromAsn1(g)}catch(y){p.key=null,p.asn1=g}continue;case n.oids.certBag:v=a,m=function(){if(t.derToOid(l.certId)!==n.oids.x509Certificate){var e=new Error("Unsupported certificate type, only X.509 supported.");throw e.oid=t.derToOid(l.certId),e}var i=t.fromDer(l.cert,r);try{p.cert=n.certificateFromAsn1(i,!0)}catch(s){p.cert=null,p.asn1=i}};break;default:var h=new Error("Unsupported PKCS#12 SafeBag type.");throw h.oid=p.type,h}if(v!==undefined&&!t.validate(g,v,l,c)){var h=new Error("Cannot read PKCS#12 "+v.name);throw h.errors=c,h}m()}return s}function d(e){var r={};if(e!==undefined)for(var i=0;i<e.length;++i){var s={},o=[];if(!t.validate(e[i],u,s,o)){var a=new Error("Cannot read PKCS#12 BagAttribute.");throw a.errors=o,a}var f=t.derToOid(s.oid);if(n.oids[f]===undefined)continue;r[n.oids[f]]=[];for(var l=0;l<s.values.length;++l)r[n.oids[f]].push(s.values[l].value)}return r}var t=e.asn1,n=e.pki,r=e.pkcs12=e.pkcs12||{},i={name:"ContentInfo",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:t.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},s={name:"PFX",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,capture:"version"},i,{name:"PFX.macData",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",tagClass:t.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:t.Class.UNIVERSAL,type:t.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:t.Class.UNIVERSAL,type:t.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},o={name:"SafeBag",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:t.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},u={name:"Attribute",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:t.Class.UNIVERSAL,type:t.Type.SET,constructed:!0,capture:"values"}]},a={name:"CertBag",tagClass:t.Class.UNIVERSAL,type:t.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:t.Class.UNIVERSAL,type:t.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:t.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:t.Class.UNIVERSAL,type:t.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};r.pkcs12FromAsn1=function(i,o,u){typeof o=="string"?(u=o,o=!0):o===undefined&&(o=!0);var a={},h=[];if(!t.validate(i,s,a,h)){var p=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw p.errors=p,p}var d={version:a.version.charCodeAt(0),safeContents:[],getBags:function(t){var n={},r;return"localKeyId"in t?r=t.localKeyId:"localKeyIdHex"in t&&(r=e.util.hexToBytes(t.localKeyIdHex)),r===undefined&&!("friendlyName"in t)&&"bagType"in t&&(n[t.bagType]=f(d.safeContents,null,null,t.bagType)),r!==undefined&&(n.localKeyId=f(d.safeContents,"localKeyId",r,t.bagType)),"friendlyName"in t&&(n.friendlyName=f(d.safeContents,"friendlyName",t.friendlyName,t.bagType)),n},getBagsByFriendlyName:function(e,t){return f(d.safeContents,"friendlyName",e,t)},getBagsByLocalKeyId:function(e,t){return f(d.safeContents,"localKeyId",e,t)}};if(a.version.charCodeAt(0)!==3){var p=new Error("PKCS#12 PFX of version other than 3 not supported.");throw p.version=a.version.charCodeAt(0),p}if(t.derToOid(a.contentType)!==n.oids.data){var p=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw p.oid=t.derToOid(a.contentType),p}var v=a.content.value[0];if(v.tagClass!==t.Class.UNIVERSAL||v.type!==t.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");v=l(v);if(a.mac){var m=null,g=0,y=t.derToOid(a.macAlgorithm);switch(y){case n.oids.sha1:m=e.md.sha1.create(),g=20;break;case n.oids.sha256:m=e.md.sha256.create(),g=32;break;case n.oids.sha384:m=e.md.sha384.create(),g=48;break;case n.oids.sha512:m=e.md.sha512.create(),g=64;break;case n.oids.md5:m=e.md.md5.create(),g=16}if(m===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+y);var b=new e.util.ByteBuffer(a.macSalt),w="macIterations"in a?parseInt(e.util.bytesToHex(a.macIterations),16):1,E=r.generateKey(u,b,3,w,g,m),S=e.hmac.create();S.start(m,E),S.update(v.value);var x=S.getMac();if(x.getBytes()!==a.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}return c(d,v.value,o,u),d},r.toPkcs12Asn1=function(i,s,o,u){u=u||{},u.saltSize=u.saltSize||8,u.count=u.count||2048,u.algorithm=u.algorithm||u.encAlgorithm||"aes128","useMac"in u||(u.useMac=!0),"localKeyId"in u||(u.localKeyId=null),"generateLocalKeyId"in u||(u.generateLocalKeyId=!0);var a=u.localKeyId,f;if(a!==null)a=e.util.hexToBytes(a);else if(u.generateLocalKeyId)if(s){var l=e.util.isArray(s)?s[0]:s;typeof l=="string"&&(l=n.certificateFromPem(l));var c=e.md.sha1.create();c.update(t.toDer(n.certificateToAsn1(l)).getBytes()),a=c.digest().getBytes()}else a=e.random.getBytes(20);var h=[];a!==null&&h.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.localKeyId).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,a)])])),"friendlyName"in u&&h.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.friendlyName).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[t.create(t.Class.UNIVERSAL,t.Type.BMPSTRING,!1,u.friendlyName)])])),h.length>0&&(f=t.create(t.Class.UNIVERSAL,t.Type.SET,!0,h));var p=[],d=[];s!==null&&(e.util.isArray(s)?d=s:d=[s]);var v=[];for(var m=0;m<d.length;++m){s=d[m],typeof s=="string"&&(s=n.certificateFromPem(s));var g=m===0?f:undefined,y=n.certificateToAsn1(s),b=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.certBag).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.x509Certificate).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(y).getBytes())])])]),g]);v.push(b)}if(v.length>0){var w=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,v),E=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.data).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(w).getBytes())])]);p.push(E)}var S=null;if(i!==null){var x=n.wrapRsaPrivateKey(n.privateKeyToAsn1(i));o===null?S=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.keyBag).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[x]),f]):S=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.pkcs8ShroudedKeyBag).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[n.encryptPrivateKeyInfo(x,o,u)]),f]);var T=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[S]),N=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.data).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(T).getBytes())])]);p.push(N)}var C=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,p),k;if(u.useMac){var c=e.md.sha1.create(),L=new e.util.ByteBuffer(e.random.getBytes(u.saltSize)),A=u.count,i=r.generateKey(o,L,3,A,20),O=e.hmac.create();O.start(c,i),O.update(t.toDer(C).getBytes());var M=O.getMac();k=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.sha1).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")]),t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,M.getBytes())]),t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,L.getBytes()),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(A).getBytes())])}return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(3).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.oids.data).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,t.toDer(C).getBytes())])]),k])},r.generateKey=e.pbe.generatePkcs12Key}var r="pkcs12";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pkcs12",["require","module","./asn1","./hmac","./oids","./pkcs7asn1","./pbe","./random","./rsa","./sha1","./util","./x509"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t=e.asn1,n=e.pki=e.pki||{};n.pemToDer=function(t){var n=e.pem.decode(t)[0];if(n.procType&&n.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return e.util.createBuffer(n.body)},n.privateKeyFromPem=function(r){var i=e.pem.decode(r)[0];if(i.type!=="PRIVATE KEY"&&i.type!=="RSA PRIVATE KEY"){var s=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw s.headerType=i.type,s}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var o=t.fromDer(i.body);return n.privateKeyFromAsn1(o)},n.privateKeyToPem=function(r,i){var s={type:"RSA PRIVATE KEY",body:t.toDer(n.privateKeyToAsn1(r)).getBytes()};return e.pem.encode(s,{maxline:i})},n.privateKeyInfoToPem=function(n,r){var i={type:"PRIVATE KEY",body:t.toDer(n).getBytes()};return e.pem.encode(i,{maxline:r})}}var r="pki";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pki",["require","module","./asn1","./oids","./pbe","./pem","./pbkdf2","./pkcs12","./pss","./rsa","./util","./x509"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t=function(t,n,r,i){var s=e.util.createBuffer(),o=t.length>>1,u=o+(t.length&1),a=t.substr(0,u),f=t.substr(o,u),l=e.util.createBuffer(),c=e.hmac.create();r=n+r;var h=Math.ceil(i/16),p=Math.ceil(i/20);c.start("MD5",a);var d=e.util.createBuffer();l.putBytes(r);for(var v=0;v<h;++v)c.start(null,null),c.update(l.getBytes()),l.putBuffer(c.digest()),c.start(null,null),c.update(l.bytes()+r),d.putBuffer(c.digest());c.start("SHA1",f);var m=e.util.createBuffer();l.clear(),l.putBytes(r);for(var v=0;v<p;++v)c.start(null,null),c.update(l.getBytes()),l.putBuffer(c.digest()),c.start(null,null),c.update(l.bytes()+r),m.putBuffer(c.digest());return s.putBytes(e.util.xorBytes(d.getBytes(),m.getBytes(),i)),s},n=function(e,t,n,r){},r=function(t,n,r){var i=e.hmac.create();i.start("SHA1",t);var s=e.util.createBuffer();return s.putInt32(n[0]),s.putInt32(n[1]),s.putByte(r.type),s.putByte(r.version.major),s.putByte(r.version.minor),s.putInt16(r.length),s.putBytes(r.fragment.bytes()),i.update(s.getBytes()),i.digest().getBytes()},i=function(t,n,r){var i=!1;try{var s=t.deflate(n.fragment.getBytes());n.fragment=e.util.createBuffer(s),n.length=s.length,i=!0}catch(o){}return i},s=function(t,n,r){var i=!1;try{var s=t.inflate(n.fragment.getBytes());n.fragment=e.util.createBuffer(s),n.length=s.length,i=!0}catch(o){}return i},o=function(t,n){var r=0;switch(n){case 1:r=t.getByte();break;case 2:r=t.getInt16();break;case 3:r=t.getInt24();break;case 4:r=t.getInt32()}return e.util.createBuffer(t.getBytes(r))},u=function(e,t,n){e.putInt(n.length(),t<<3),e.putBuffer(n)},a={};a.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}},a.SupportedVersions=[a.Versions.TLS_1_1,a.Versions.TLS_1_0],a.Version=a.SupportedVersions[0],a.MaxFragment=15360,a.ConnectionEnd={server:0,client:1},a.PRFAlgorithm={tls_prf_sha256:0},a.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2},a.CipherType={stream:0,block:1,aead:2},a.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4},a.CompressionMethod={none:0,deflate:1},a.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24},a.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20},a.Alert={},a.Alert.Level={warning:1,fatal:2},a.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100},a.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2},a.CipherSuites={},a.getCipherSuite=function(e){var t=null;for(var n in a.CipherSuites){var r=a.CipherSuites[n];if(r.id[0]===e.charCodeAt(0)&&r.id[1]===e.charCodeAt(1)){t=r;break}}return t},a.handleUnexpected=function(e,t){var n=!e.open&&e.entity===a.ConnectionEnd.client;n||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unexpected_message}})},a.handleHelloRequest=function(e,t,n){!e.handshaking&&e.handshakes>0&&(a.queue(e,a.createAlert(e,{level:a.Alert.Level.warning,description:a.Alert.Description.no_renegotiation})),a.flush(e)),e.process()},a.parseHelloMessage=function(t,n,r){var i=null,s=t.entity===a.ConnectionEnd.client;if(r<38)t.error(t,{message:s?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});else{var u=n.fragment,f=u.length();i={version:{major:u.getByte(),minor:u.getByte()},random:e.util.createBuffer(u.getBytes(32)),session_id:o(u,1),extensions:[]},s?(i.cipher_suite=u.getBytes(2),i.compression_method=u.getByte()):(i.cipher_suites=o(u,2),i.compression_methods=o(u,1)),f=r-(f-u.length());if(f>0){var l=o(u,2);while(l.length()>0)i.extensions.push({type:[l.getByte(),l.getByte()],data:o(l,2)});if(!s)for(var c=0;c<i.extensions.length;++c){var h=i.extensions[c];if(h.type[0]===0&&h.type[1]===0){var p=o(h.data,2);while(p.length()>0){var d=p.getByte();if(d!==0)break;t.session.extensions.server_name.serverNameList.push(o(p,2).getBytes())}}}}if(t.session.version)if(i.version.major!==t.session.version.major||i.version.minor!==t.session.version.minor)return t.error(t,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}});if(s)t.session.cipherSuite=a.getCipherSuite(i.cipher_suite);else{var v=e.util.createBuffer(i.cipher_suites.bytes());while(v.length()>0){t.session.cipherSuite=a.getCipherSuite(v.getBytes(2));if(t.session.cipherSuite!==null)break}}if(t.session.cipherSuite===null)return t.error(t,{message:"No cipher suites in common.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.handshake_failure},cipherSuite:e.util.bytesToHex(i.cipher_suite)});s?t.session.compressionMethod=i.compression_method:t.session.compressionMethod=a.CompressionMethod.none}return i},a.createSecurityParameters=function(e,t){var n=e.entity===a.ConnectionEnd.client,r=t.random.bytes(),i=n?e.session.sp.client_random:r,s=n?r:a.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:a.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:i,server_random:s}},a.handleServerHello=function(e,t,n){var r=a.parseHelloMessage(e,t,n);if(e.fail)return;if(!(r.version.minor<=e.version.minor))return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}});e.version.minor=r.version.minor,e.session.version=e.version;var i=r.session_id.bytes();i.length>0&&i===e.session.id?(e.expect=d,e.session.resuming=!0,e.session.sp.server_random=r.random.bytes()):(e.expect=l,e.session.resuming=!1,a.createSecurityParameters(e,r)),e.session.id=i,e.process()},a.handleClientHello=function(t,n,r){var i=a.parseHelloMessage(t,n,r);if(t.fail)return;var s=i.session_id.bytes(),o=null;if(t.sessionCache){o=t.sessionCache.getSession(s);if(o===null)s="";else if(o.version.major!==i.version.major||o.version.minor>i.version.minor)o=null,s=""}s.length===0&&(s=e.random.getBytes(32)),t.session.id=s,t.session.clientHelloVersion=i.version,t.session.sp={};if(o)t.version=t.session.version=o.version,t.session.sp=o.sp;else{var u;for(var f=1;f<a.SupportedVersions.length;++f){u=a.SupportedVersions[f];if(u.minor<=i.version.minor)break}t.version={major:u.major,minor:u.minor},t.session.version=t.version}o!==null?(t.expect=S,t.session.resuming=!0,t.session.sp.client_random=i.random.bytes()):(t.expect=t.verifyClient!==!1?b:w,t.session.resuming=!1,a.createSecurityParameters(t,i)),t.open=!0,a.queue(t,a.createRecord(t,{type:a.ContentType.handshake,data:a.createServerHello(t)})),t.session.resuming?(a.queue(t,a.createRecord(t,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),t.state.pending=a.createConnectionState(t),t.state.current.write=t.state.pending.write,a.queue(t,a.createRecord(t,{type:a.ContentType.handshake,data:a.createFinished(t)}))):(a.queue(t,a.createRecord(t,{type:a.ContentType.handshake,data:a.createCertificate(t)})),t.fail||(a.queue(t,a.createRecord(t,{type:a.ContentType.handshake,data:a.createServerKeyExchange(t)})),t.verifyClient!==!1&&a.queue(t,a.createRecord(t,{type:a.ContentType.handshake,data:a.createCertificateRequest(t)})),a.queue(t,a.createRecord(t,{type:a.ContentType.handshake,data:a.createServerHelloDone(t)})))),a.flush(t),t.process()},a.handleCertificate=function(t,n,r){if(r<3)return t.error(t,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var i=n.fragment,s={certificate_list:o(i,3)},u,f,l=[];try{while(s.certificate_list.length()>0)u=o(s.certificate_list,3),f=e.asn1.fromDer(u),u=e.pki.certificateFromAsn1(f,!0),l.push(u)}catch(h){return t.error(t,{message:"Could not parse certificate list.",cause:h,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate}})}var p=t.entity===a.ConnectionEnd.client;!p&&t.verifyClient!==!0||l.length!==0?l.length===0?t.expect=p?c:w:(p?t.session.serverCertificate=l[0]:t.session.clientCertificate=l[0],a.verifyCertificateChain(t,l)&&(t.expect=p?c:w)):t.error(t,{message:p?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}}),t.process()},a.handleServerKeyExchange=function(e,t,n){if(n>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unsupported_certificate}});e.expect=h,e.process()},a.handleClientKeyExchange=function(t,n,r){if(r<48)return t.error(t,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unsupported_certificate}});var i=n.fragment,s={enc_pre_master_secret:o(i,2).getBytes()},u=null;if(t.getPrivateKey)try{u=t.getPrivateKey(t,t.session.serverCertificate),u=e.pki.privateKeyFromPem(u)}catch(f){t.error(t,{message:"Could not get private key.",cause:f,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}})}if(u===null)return t.error(t,{message:"No private key set.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}});try{var l=t.session.sp;l.pre_master_secret=u.decrypt(s.enc_pre_master_secret);var c=t.session.clientHelloVersion;if(c.major!==l.pre_master_secret.charCodeAt(0)||c.minor!==l.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch(f){l.pre_master_secret=e.random.getBytes(48)}t.expect=S,t.session.clientCertificate!==null&&(t.expect=E),t.process()},a.handleCertificateRequest=function(e,t,n){if(n<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var r=t.fragment,i={certificate_types:o(r,1),certificate_authorities:o(r,2)};e.session.certificateRequest=i,e.expect=p,e.process()},a.handleCertificateVerify=function(t,n,r){if(r<2)return t.error(t,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var i=n.fragment;i.read-=4;var s=i.bytes();i.read+=4;var u={signature:o(i,2).getBytes()},f=e.util.createBuffer();f.putBuffer(t.session.md5.digest()),f.putBuffer(t.session.sha1.digest()),f=f.getBytes();try{var l=t.session.clientCertificate;if(!l.publicKey.verify(f,u.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");t.session.md5.update(s),t.session.sha1.update(s)}catch(c){return t.error(t,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.handshake_failure}})}t.expect=S,t.process()},a.handleServerHelloDone=function(t,n,r){if(r>0)return t.error(t,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.record_overflow}});if(t.serverCertificate===null){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.insufficient_security}},s=0,o=t.verify(t,i.alert.description,s,[]);if(o!==!0){if(o||o===0)typeof o=="object"&&!e.util.isArray(o)?(o.message&&(i.message=o.message),o.alert&&(i.alert.description=o.alert)):typeof o=="number"&&(i.alert.description=o);return t.error(t,i)}}t.session.certificateRequest!==null&&(n=a.createRecord(t,{type:a.ContentType.handshake,data:a.createCertificate(t)}),a.queue(t,n)),n=a.createRecord(t,{type:a.ContentType.handshake,data:a.createClientKeyExchange(t)}),a.queue(t,n),t.expect=g;var u=function(e,t){e.session.certificateRequest!==null&&e.session.clientCertificate!==null&&a.queue(e,a.createRecord(e,{type:a.ContentType.handshake,data:a.createCertificateVerify(e,t)})),a.queue(e,a.createRecord(e,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),e.state.pending=a.createConnectionState(e),e.state.current.write=e.state.pending.write,a.queue(e,a.createRecord(e,{type:a.ContentType.handshake,data:a.createFinished(e)})),e.expect=d,a.flush(e),e.process()};if(t.session.certificateRequest===null||t.session.clientCertificate===null)return u(t,null);a.getClientSignature(t,u)},a.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.illegal_parameter}});var n=e.entity===a.ConnectionEnd.client;if(e.session.resuming&&n||!e.session.resuming&&!n)e.state.pending=a.createConnectionState(e);e.state.current.read=e.state.pending.read;if(!e.session.resuming&&n||e.session.resuming&&!n)e.state.pending=null;e.expect=n?v:x,e.process()},a.handleFinished=function(n,r,i){var s=r.fragment;s.read-=4;var o=s.bytes();s.read+=4;var u=r.fragment.getBytes();s=e.util.createBuffer(),s.putBuffer(n.session.md5.digest()),s.putBuffer(n.session.sha1.digest());var f=n.entity===a.ConnectionEnd.client,l=f?"server finished":"client finished",c=n.session.sp,h=12,p=t;s=p(c.master_secret,l,s.getBytes(),h);if(s.getBytes()!==u)return n.error(n,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.decrypt_error}});n.session.md5.update(o),n.session.sha1.update(o);if(n.session.resuming&&f||!n.session.resuming&&!f)a.queue(n,a.createRecord(n,{type:a.ContentType.change_cipher_spec,data:a.createChangeCipherSpec()})),n.state.current.write=n.state.pending.write,n.state.pending=null,a.queue(n,a.createRecord(n,{type:a.ContentType.handshake,data:a.createFinished(n)}));n.expect=f?m:T,n.handshaking=!1,++n.handshakes,n.peerCertificate=f?n.session.serverCertificate:n.session.clientCertificate,a.flush(n),n.isConnected=!0,n.connected(n),n.process()},a.handleAlert=function(e,t){var n=t.fragment,r={level:n.getByte(),description:n.getByte()},i;switch(r.description){case a.Alert.Description.close_notify:i="Connection closed.";break;case a.Alert.Description.unexpected_message:i="Unexpected message.";break;case a.Alert.Description.bad_record_mac:i="Bad record MAC.";break;case a.Alert.Description.decryption_failed:i="Decryption failed.";break;case a.Alert.Description.record_overflow:i="Record overflow.";break;case a.Alert.Description.decompression_failure:i="Decompression failed.";break;case a.Alert.Description.handshake_failure:i="Handshake failure.";break;case a.Alert.Description.bad_certificate:i="Bad certificate.";break;case a.Alert.Description.unsupported_certificate:i="Unsupported certificate.";break;case a.Alert.Description.certificate_revoked:i="Certificate revoked.";break;case a.Alert.Description.certificate_expired:i="Certificate expired.";break;case a.Alert.Description.certificate_unknown:i="Certificate unknown.";break;case a.Alert.Description.illegal_parameter:i="Illegal parameter.";break;case a.Alert.Description.unknown_ca:i="Unknown certificate authority.";break;case a.Alert.Description.access_denied:i="Access denied.";break;case a.Alert.Description.decode_error:i="Decode error.";break;case a.Alert.Description.decrypt_error:i="Decrypt error.";break;case a.Alert.Description.export_restriction:i="Export restriction.";break;case a.Alert.Description.protocol_version:i="Unsupported protocol version.";break;case a.Alert.Description.insufficient_security:i="Insufficient security.";break;case a.Alert.Description.internal_error:i="Internal error.";break;case a.Alert.Description.user_canceled:i="User canceled.";break;case a.Alert.Description.no_renegotiation:i="Renegotiation not supported.";break;default:i="Unknown error."}if(r.description===a.Alert.Description.close_notify)return e.close();e.error(e,{message:i,send:!1,origin:e.entity===a.ConnectionEnd.client?"server":"client",alert:r}),e.process()},a.handleHandshake=function(t,n){var r=n.fragment,i=r.getByte(),s=r.getInt24();if(s>r.length())return t.fragmented=n,n.fragment=e.util.createBuffer(),r.read-=4,t.process();t.fragmented=null,r.read-=4;var o=r.bytes(s+4);r.read+=4,i in q[t.entity][t.expect]?(t.entity===a.ConnectionEnd.server&&!t.open&&!t.fail&&(t.handshaking=!0,t.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:e.md.md5.create(),sha1:e.md.sha1.create()}),i!==a.HandshakeType.hello_request&&i!==a.HandshakeType.certificate_verify&&i!==a.HandshakeType.finished&&(t.session.md5.update(o),t.session.sha1.update(o)),q[t.entity][t.expect][i](t,n,s)):a.handleUnexpected(t,n)},a.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()},a.handleHeartbeat=function(t,n){var r=n.fragment,i=r.getByte(),s=r.getInt16(),o=r.getBytes(s);if(i===a.HeartbeatMessageType.heartbeat_request){if(t.handshaking||s>o.length)return t.process();a.queue(t,a.createRecord(t,{type:a.ContentType.heartbeat,data:a.createHeartbeat(a.HeartbeatMessageType.heartbeat_response,o)})),a.flush(t)}else if(i===a.HeartbeatMessageType.heartbeat_response){if(o!==t.expectedHeartbeatPayload)return t.process();t.heartbeatReceived&&t.heartbeatReceived(t,e.util.createBuffer(o))}t.process()};var f=0,l=1,c=2,h=3,p=4,d=5,v=6,m=7,g=8,y=0,b=1,w=2,E=3,S=4,x=5,T=6,N=7,C=a.handleUnexpected,k=a.handleChangeCipherSpec,L=a.handleAlert,A=a.handleHandshake,O=a.handleApplicationData,M=a.handleHeartbeat,_=[];_[a.ConnectionEnd.client]=[[C,L,A,C,M],[C,L,A,C,M],[C,L,A,C,M],[C,L,A,C,M],[C,L,A,C,M],[k,L,C,C,M],[C,L,A,C,M],[C,L,A,O,M],[C,L,A,C,M]],_[a.ConnectionEnd.server]=[[C,L,A,C,M],[C,L,A,C,M],[C,L,A,C,M],[C,L,A,C,M],[k,L,C,C,M],[C,L,A,C,M],[C,L,A,O,M],[C,L,A,C,M]];var D=a.handleHelloRequest,P=a.handleServerHello,H=a.handleCertificate,B=a.handleServerKeyExchange,j=a.handleCertificateRequest,F=a.handleServerHelloDone,I=a.handleFinished,q=[];q[a.ConnectionEnd.client]=[[C,C,P,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[D,C,C,C,C,C,C,C,C,C,C,H,B,j,F,C,C,C,C,C,C],[D,C,C,C,C,C,C,C,C,C,C,C,B,j,F,C,C,C,C,C,C],[D,C,C,C,C,C,C,C,C,C,C,C,C,j,F,C,C,C,C,C,C],[D,C,C,C,C,C,C,C,C,C,C,C,C,C,F,C,C,C,C,C,C],[D,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[D,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,I],[D,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[D,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C]];var R=a.handleClientHello,U=a.handleClientKeyExchange,z=a.handleCertificateVerify;q[a.ConnectionEnd.server]=[[C,R,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,H,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,U,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,z,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,I],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C],[C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C]],a.generateKeys=function(e,n){var r=t,i=n.client_random+n.server_random;e.session.resuming||(n.master_secret=r(n.pre_master_secret,"master secret",i,48).bytes(),n.pre_master_secret=null),i=n.server_random+n.client_random;var s=2*n.mac_key_length+2*n.enc_key_length,o=e.version.major===a.Versions.TLS_1_0.major&&e.version.minor===a.Versions.TLS_1_0.minor;o&&(s+=2*n.fixed_iv_length);var u=r(n.master_secret,"key expansion",i,s),f={client_write_MAC_key:u.getBytes(n.mac_key_length),server_write_MAC_key:u.getBytes(n.mac_key_length),client_write_key:u.getBytes(n.enc_key_length),server_write_key:u.getBytes(n.enc_key_length)};return o&&(f.client_write_IV=u.getBytes(n.fixed_iv_length),f.server_write_IV=u.getBytes(n.fixed_iv_length)),f},a.createConnectionState=function(e){var t=e.entity===a.ConnectionEnd.client,n=function(){var e={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(e){return!0},compressionState:null,compressFunction:function(e){return!0},updateSequenceNumber:function(){e.sequenceNumber[1]===4294967295?(e.sequenceNumber[1]=0,++e.sequenceNumber[0]):++e.sequenceNumber[1]}};return e},r={read:n(),write:n()};r.read.update=function(e,t){return r.read.cipherFunction(t,r.read)?r.read.compressFunction(e,t,r.read)||e.error(e,{message:"Could not decompress record.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.decompression_failure}}):e.error(e,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_record_mac}}),!e.fail},r.write.update=function(e,t){return r.write.compressFunction(e,t,r.write)?r.write.cipherFunction(t,r.write)||e.error(e,{message:"Could not encrypt record.",send:!1,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}}):e.error(e,{message:"Could not compress record.",send:!1,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}}),!e.fail};if(e.session){var o=e.session.sp;e.session.cipherSuite.initSecurityParameters(o),o.keys=a.generateKeys(e,o),r.read.macKey=t?o.keys.server_write_MAC_key:o.keys.client_write_MAC_key,r.write.macKey=t?o.keys.client_write_MAC_key:o.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(r,e,o);switch(o.compression_algorithm){case a.CompressionMethod.none:break;case a.CompressionMethod.deflate:r.read.compressFunction=s,r.write.compressFunction=i;break;default:throw new Error("Unsupported compression algorithm.")}}return r},a.createRandom=function(){var t=new Date,n=+t+t.getTimezoneOffset()*6e4,r=e.util.createBuffer();return r.putInt32(n),r.putBytes(e.random.getBytes(28)),r},a.createRecord=function(e,t){if(!t.data)return null;var n={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return n},a.createAlert=function(t,n){var r=e.util.createBuffer();return r.putByte(n.level),r.putByte(n.description),a.createRecord(t,{type:a.ContentType.alert,data:r})},a.createClientHello=function(t){t.session.clientHelloVersion={major:t.version.major,minor:t.version.minor};var n=e.util.createBuffer();for(var r=0;r<t.cipherSuites.length;++r){var i=t.cipherSuites[r];n.putByte(i.id[0]),n.putByte(i.id[1])}var s=n.length(),o=e.util.createBuffer();o.putByte(a.CompressionMethod.none);var f=o.length(),l=e.util.createBuffer();if(t.virtualHost){var c=e.util.createBuffer();c.putByte(0),c.putByte(0);var h=e.util.createBuffer();h.putByte(0),u(h,2,e.util.createBuffer(t.virtualHost));var p=e.util.createBuffer();u(p,2,h),u(c,2,p),l.putBuffer(c)}var d=l.length();d>0&&(d+=2);var v=t.session.id,m=v.length+1+2+4+28+2+s+1+f+d,g=e.util.createBuffer();return g.putByte(a.HandshakeType.client_hello),g.putInt24(m),g.putByte(t.version.major),g.putByte(t.version.minor),g.putBytes(t.session.sp.client_random),u(g,1,e.util.createBuffer(v)),u(g,2,n),u(g,1,o),d>0&&u(g,2,l),g},a.createServerHello=function(t){var n=t.session.id,r=n.length+1+2+4+28+2+1,i=e.util.createBuffer();return i.putByte(a.HandshakeType.server_hello),i.putInt24(r),i.putByte(t.version.major),i.putByte(t.version.minor),i.putBytes(t.session.sp.server_random),u(i,1,e.util.createBuffer(n)),i.putByte(t.session.cipherSuite.id[0]),i.putByte(t.session.cipherSuite.id[1]),i.putByte(t.session.compressionMethod),i},a.createCertificate=function(t){var n=t.entity===a.ConnectionEnd.client,r=null;if(t.getCertificate){var i;n?i=t.session.certificateRequest:i=t.session.extensions.server_name.serverNameList,r=t.getCertificate(t,i)}var s=e.util.createBuffer();if(r!==null)try{e.util.isArray(r)||(r=[r]);var o=null;for(var f=0;f<r.length;++f){var l=e.pem.decode(r[f])[0];if(l.type!=="CERTIFICATE"&&l.type!=="X509 CERTIFICATE"&&l.type!=="TRUSTED CERTIFICATE"){var c=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw c.headerType=l.type,c}if(l.procType&&l.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var h=e.util.createBuffer(l.body);o===null&&(o=e.asn1.fromDer(h.bytes(),!1));var p=e.util.createBuffer();u(p,3,h),s.putBuffer(p)}r=e.pki.certificateFromAsn1(o),n?t.session.clientCertificate=r:t.session.serverCertificate=r}catch(d){return t.error(t,{message:"Could not send certificate list.",cause:d,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate}})}var v=3+s.length(),m=e.util.createBuffer();return m.putByte(a.HandshakeType.certificate),m.putInt24(v),u(m,3,s),m},a.createClientKeyExchange=function(t){var n=e.util.createBuffer();n.putByte(t.session.clientHelloVersion.major),n.putByte(t.session.clientHelloVersion.minor),n.putBytes(e.random.getBytes(46));var r=t.session.sp;r.pre_master_secret=n.getBytes();var i=t.session.serverCertificate.publicKey;n=i.encrypt(r.pre_master_secret);var s=n.length+2,o=e.util.createBuffer();return o.putByte(a.HandshakeType.client_key_exchange),o.putInt24(s),o.putInt16(n.length),o.putBytes(n),o},a.createServerKeyExchange=function(t){var n=0,r=e.util.createBuffer();return n>0&&(r.putByte(a.HandshakeType.server_key_exchange),r.putInt24(n)),r},a.getClientSignature=function(t,n){var r=e.util.createBuffer();r.putBuffer(t.session.md5.digest()),r.putBuffer(t.session.sha1.digest()),r=r.getBytes(),t.getSignature=t.getSignature||function(t,n,r){var i=null;if(t.getPrivateKey)try{i=t.getPrivateKey(t,t.session.clientCertificate),i=e.pki.privateKeyFromPem(i)}catch(s){t.error(t,{message:"Could not get private key.",cause:s,send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}})}i===null?t.error(t,{message:"No private key set.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.internal_error}}):n=i.sign(n,null),r(t,n)},t.getSignature(t,r,n)},a.createCertificateVerify=function(t,n){var r=n.length+2,i=e.util.createBuffer();return i.putByte(a.HandshakeType.certificate_verify),i.putInt24(r),i.putInt16(n.length),i.putBytes(n),i},a.createCertificateRequest=function(t){var n=e.util.createBuffer();n.putByte(1);var r=e.util.createBuffer();for(var i in t.caStore.certs){var s=t.caStore.certs[i],o=e.pki.distinguishedNameToAsn1(s.subject);r.putBuffer(e.asn1.toDer(o))}var f=1+n.length()+2+r.length(),l=e.util.createBuffer();return l.putByte(a.HandshakeType.certificate_request),l.putInt24(f),u(l,1,n),u(l,2,r),l},a.createServerHelloDone=function(t){var n=e.util.createBuffer();return n.putByte(a.HandshakeType.server_hello_done),n.putInt24(0),n},a.createChangeCipherSpec=function(){var t=e.util.createBuffer();return t.putByte(1),t},a.createFinished=function(n){var r=e.util.createBuffer();r.putBuffer(n.session.md5.digest()),r.putBuffer(n.session.sha1.digest());var i=n.entity===a.ConnectionEnd.client,s=n.session.sp,o=12,u=t,f=i?"client finished":"server finished";r=u(s.master_secret,f,r.getBytes(),o);var l=e.util.createBuffer();return l.putByte(a.HandshakeType.finished),l.putInt24(r.length()),l.putBuffer(r),l},a.createHeartbeat=function(t,n,r){typeof r=="undefined"&&(r=n.length);var i=e.util.createBuffer();i.putByte(t),i.putInt16(r),i.putBytes(n);var s=i.length(),o=Math.max(16,s-r-3);return i.putBytes(e.random.getBytes(o)),i},a.queue=function(t,n){if(!n)return;if(n.type===a.ContentType.handshake){var r=n.fragment.bytes();t.session.md5.update(r),t.session.sha1.update(r),r=null}var i;if(n.fragment.length()<=a.MaxFragment)i=[n];else{i=[];var s=n.fragment.bytes();while(s.length>a.MaxFragment)i.push(a.createRecord(t,{type:n.type,data:e.util.createBuffer(s.slice(0,a.MaxFragment))})),s=s.slice(a.MaxFragment);s.length>0&&i.push(a.createRecord(t,{type:n.type,data:e.util.createBuffer(s)}))}for(var o=0;o<i.length&&!t.fail;++o){var u=i[o],f=t.state.current.write;f.update(t,u)&&t.records.push(u)}},a.flush=function(e){for(var t=0;t<e.records.length;++t){var n=e.records[t];e.tlsData.putByte(n.type),e.tlsData.putByte(n.version.major),e.tlsData.putByte(n.version.minor),e.tlsData.putInt16(n.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var W=function(t){switch(t){case!0:return!0;case e.pki.certificateError.bad_certificate:return a.Alert.Description.bad_certificate;case e.pki.certificateError.unsupported_certificate:return a.Alert.Description.unsupported_certificate;case e.pki.certificateError.certificate_revoked:return a.Alert.Description.certificate_revoked;case e.pki.certificateError.certificate_expired:return a.Alert.Description.certificate_expired;case e.pki.certificateError.certificate_unknown:return a.Alert.Description.certificate_unknown;case e.pki.certificateError.unknown_ca:return a.Alert.Description.unknown_ca;default:return a.Alert.Description.bad_certificate}},X=function(t){switch(t){case!0:return!0;case a.Alert.Description.bad_certificate:return e.pki.certificateError.bad_certificate;case a.Alert.Description.unsupported_certificate:return e.pki.certificateError.unsupported_certificate;case a.Alert.Description.certificate_revoked:return e.pki.certificateError.certificate_revoked;case a.Alert.Description.certificate_expired:return e.pki.certificateError.certificate_expired;case a.Alert.Description.certificate_unknown:return e.pki.certificateError.certificate_unknown;case a.Alert.Description.unknown_ca:return e.pki.certificateError.unknown_ca;default:return e.pki.certificateError.bad_certificate}};a.verifyCertificateChain=function(t,n){try{e.pki.verifyCertificateChain(t.caStore,n,function(r,i,s){var o=W(r),u=t.verify(t,r,i,s);if(u!==!0){if(typeof u=="object"&&!e.util.isArray(u)){var f=new Error("The application rejected the certificate.");throw f.send=!0,f.alert={level:a.Alert.Level.fatal,description:a.Alert.Description.bad_certificate},u.message&&(f.message=u.message),u.alert&&(f.alert.description=u.alert),f}u!==r&&(u=X(u))}return u})}catch(r){var i=r;if(typeof i!="object"||e.util.isArray(i))i={send:!0,alert:{level:a.Alert.Level.fatal,description:W(r)}};"send"in i||(i.send=!0),"alert"in i||(i.alert={level:a.Alert.Level.fatal,description:W(i.error)}),t.error(t,i)}return!t.fail},a.createSessionCache=function(t,n){var r=null;if(t&&t.getSession&&t.setSession&&t.order)r=t;else{r={},r.cache=t||{},r.capacity=Math.max(n||100,1),r.order=[];for(var i in t)r.order.length<=n?r.order.push(i):delete t[i];r.getSession=function(t){var n=null,i=null;t?i=e.util.bytesToHex(t):r.order.length>0&&(i=r.order[0]);if(i!==null&&i in r.cache){n=r.cache[i],delete r.cache[i];for(var s in r.order)if(r.order[s]===i){r.order.splice(s,1);break}}return n},r.setSession=function(t,n){if(r.order.length===r.capacity){var i=r.order.shift();delete r.cache[i]}var i=e.util.bytesToHex(t);r.order.push(i),r.cache[i]=n}}return r},a.createConnection=function(t){var n=null;t.caStore?e.util.isArray(t.caStore)?n=e.pki.createCaStore(t.caStore):n=t.caStore:n=e.pki.createCaStore();var r=t.cipherSuites||null;if(r===null){r=[];for(var i in a.CipherSuites)r.push(a.CipherSuites[i])}var s=t.server||!1?a.ConnectionEnd.server:a.ConnectionEnd.client,o=t.sessionCache?a.createSessionCache(t.sessionCache):null,u={version:{major:a.Version.major,minor:a.Version.minor},entity:s,sessionId:t.sessionId,caStore:n,sessionCache:o,cipherSuites:r,connected:t.connected,virtualHost:t.virtualHost||null,verifyClient:t.verifyClient||!1,verify:t.verify||function(e,t,n,r){return t},getCertificate:t.getCertificate||null,getPrivateKey:t.getPrivateKey||null,getSignature:t.getSignature||null,input:e.util.createBuffer(),tlsData:e.util.createBuffer(),data:e.util.createBuffer(),tlsDataReady:t.tlsDataReady,dataReady:t.dataReady,heartbeatReceived:t.heartbeatReceived,closed:t.closed,error:function(e,n){n.origin=n.origin||(e.entity===a.ConnectionEnd.client?"client":"server"),n.send&&(a.queue(e,a.createAlert(e,n.alert)),a.flush(e));var r=n.fatal!==!1;r&&(e.fail=!0),t.error(e,n),r&&e.close(!1)},deflate:t.deflate||null,inflate:t.inflate||null};u.reset=function(e){u.version={major:a.Version.major,minor:a.Version.minor},u.record=null,u.session=null,u.peerCertificate=null,u.state={pending:null,current:null},u.expect=u.entity===a.ConnectionEnd.client?f:y,u.fragmented=null,u.records=[],u.open=!1,u.handshakes=0,u.handshaking=!1,u.isConnected=!1,u.fail=!e&&typeof e!="undefined",u.input.clear(),u.tlsData.clear(),u.data.clear(),u.state.current=a.createConnectionState(u)},u.reset();var l=function(e,t){var n=t.type-a.ContentType.change_cipher_spec,r=_[e.entity][e.expect];n in r?r[n](e,t):a.handleUnexpected(e,t)},c=function(t){var n=0,r=t.input,i=r.length();if(i<5)n=5-i;else{t.record={type:r.getByte(),version:{major:r.getByte(),minor:r.getByte()},length:r.getInt16(),fragment:e.util.createBuffer(),ready:!1};var s=t.record.version.major===t.version.major;s&&t.session&&t.session.version&&(s=t.record.version.minor===t.version.minor),s||t.error(t,{message:"Incompatible TLS version.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.protocol_version}})}return n},h=function(e){var t=0,n=e.input,r=n.length();if(r<e.record.length)t=e.record.length-r;else{e.record.fragment.putBytes(n.getBytes(e.record.length)),n.compact();var i=e.state.current.read;i.update(e,e.record)&&(e.fragmented!==null&&(e.fragmented.type===e.record.type?(e.fragmented.fragment.putBuffer(e.record.fragment),e.record=e.fragmented):e.error(e,{message:"Invalid fragmented record.",send:!0,alert:{level:a.Alert.Level.fatal,description:a.Alert.Description.unexpected_message}})),e.record.ready=!0)}return t};return u.handshake=function(t){if(u.entity!==a.ConnectionEnd.client)u.error(u,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(u.handshaking)u.error(u,{message:"Handshake already in progress.",fatal:!1});else{u.fail&&!u.open&&u.handshakes===0&&(u.fail=!1),u.handshaking=!0,t=t||"";var n=null;t.length>0&&(u.sessionCache&&(n=u.sessionCache.getSession(t)),n===null&&(t="")),t.length===0&&u.sessionCache&&(n=u.sessionCache.getSession(),n!==null&&(t=n.id)),u.session={id:t,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:e.md.md5.create(),sha1:e.md.sha1.create()},n&&(u.version=n.version,u.session.sp=n.sp),u.session.sp.client_random=a.createRandom().getBytes(),u.open=!0,a.queue(u,a.createRecord(u,{type:a.ContentType.handshake,data:a.createClientHello(u)})),a.flush(u)}},u.process=function(e){var t=0;return e&&u.input.putBytes(e),u.fail||(u.record!==null&&u.record.ready&&u.record.fragment.isEmpty()&&(u.record=null),u.record===null&&(t=c(u)),!u.fail&&u.record!==null&&!u.record.ready&&(t=h(u)),!u.fail&&u.record!==null&&u.record.ready&&l(u,u.record)),t},u.prepare=function(t){return a.queue(u,a.createRecord(u,{type:a.ContentType.application_data,data:e.util.createBuffer(t)})),a.flush(u)},u.prepareHeartbeatRequest=function(t,n){return t instanceof e.util.ByteBuffer&&(t=t.bytes()),typeof n=="undefined"&&(n=t.length),u.expectedHeartbeatPayload=t,a.queue(u,a.createRecord(u,{type:a.ContentType.heartbeat,data:a.createHeartbeat(a.HeartbeatMessageType.heartbeat_request,t,n)})),a.flush(u)},u.close=function(e){if(!u.fail&&u.sessionCache&&u.session){var t={id:u.session.id,version:u.session.version,sp:u.session.sp};t.sp.keys=null,u.sessionCache.setSession(t.id,t)}if(u.open){u.open=!1,u.input.clear();if(u.isConnected||u.handshaking)u.isConnected=u.handshaking=!1,a.queue(u,a.createAlert(u,{level:a.Alert.Level.warning,description:a.Alert.Description.close_notify})),a.flush(u);u.closed(u)}u.reset(e)},u},e.tls=e.tls||{};for(var V in a)typeof a[V]!="function"&&(e.tls[V]=a[V]);e.tls.prf_tls1=t,e.tls.hmac_sha1=r,e.tls.createSessionCache=a.createSessionCache,e.tls.createConnection=a.createConnection}var r="tls";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/tls",["require","module","./asn1","./hmac","./md","./pem","./pki","./random","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function n(n,i,s){var o=i.entity===e.tls.ConnectionEnd.client;n.read.cipherState={init:!1,cipher:e.cipher.createDecipher("AES-CBC",o?s.keys.server_write_key:s.keys.client_write_key),iv:o?s.keys.server_write_IV:s.keys.client_write_IV},n.write.cipherState={init:!1,cipher:e.cipher.createCipher("AES-CBC",o?s.keys.client_write_key:s.keys.server_write_key),iv:o?s.keys.client_write_IV:s.keys.server_write_IV},n.read.cipherFunction=u,n.write.cipherFunction=r,n.read.macLength=n.write.macLength=s.mac_length,n.read.macFunction=n.write.macFunction=t.hmac_sha1}function r(n,r){var s=!1,o=r.macFunction(r.macKey,r.sequenceNumber,n);n.fragment.putBytes(o),r.updateSequenceNumber();var u;n.version.minor===t.Versions.TLS_1_0.minor?u=r.cipherState.init?null:r.cipherState.iv:u=e.random.getBytesSync(16),r.cipherState.init=!0;var a=r.cipherState.cipher;return a.start({iv:u}),n.version.minor>=t.Versions.TLS_1_1.minor&&a.output.putBytes(u),a.update(n.fragment),a.finish(i)&&(n.fragment=a.output,n.length=n.fragment.length(),s=!0),s}function i(e,t,n){if(!n){var r=e-t.length()%e;t.fillWithByte(r-1,r)}return!0}function s(e,t,n){var r=!0;if(n){var i=t.length(),s=t.last();for(var o=i-1-s;o<i-1;++o)r=r&&t.at(o)==s;r&&t.truncate(s+1)}return r}function u(n,r){var i=!1;++o;var u;n.version.minor===t.Versions.TLS_1_0.minor?u=r.cipherState.init?null:r.cipherState.iv:u=n.fragment.getBytes(16),r.cipherState.init=!0;var f=r.cipherState.cipher;f.start({iv:u}),f.update(n.fragment),i=f.finish(s);var l=r.macLength,c=e.random.getBytesSync(l),h=f.output.length();h>=l?(n.fragment=f.output.getBytes(h-l),c=f.output.getBytes(l)):n.fragment=f.output.getBytes(),n.fragment=e.util.createBuffer(n.fragment),n.length=n.fragment.length();var p=r.macFunction(r.macKey,r.sequenceNumber,n);return r.updateSequenceNumber(),i=a(r.macKey,c,p)&&i,i}function a(t,n,r){var i=e.hmac.create();return i.start("SHA1",t),i.update(n),n=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),n===r}var t=e.tls;t.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=t.BulkCipherAlgorithm.aes,e.cipher_type=t.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=t.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:n},t.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=t.BulkCipherAlgorithm.aes,e.cipher_type=t.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=t.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:n};var o=0}var r="aesCipherSuites";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/aesCipherSuites",["require","module","./aes","./tls"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){e.debug=e.debug||{},e.debug.storage={},e.debug.get=function(t,n){var r;return typeof t=="undefined"?r=e.debug.storage:t in e.debug.storage&&(typeof n=="undefined"?r=e.debug.storage[t]:r=e.debug.storage[t][n]),r},e.debug.set=function(t,n,r){t in e.debug.storage||(e.debug.storage[t]={}),e.debug.storage[t][n]=r},e.debug.clear=function(t,n){typeof t=="undefined"?e.debug.storage={}:t in e.debug.storage&&(typeof n=="undefined"?delete e.debug.storage[t]:delete e.debug.storage[t][n])}}var r="debug";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/debug",["require","module"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function n(t,n,r,i){t.generate=function(t,s){var o=new e.util.ByteBuffer,u=Math.ceil(s/i)+r,a=new e.util.ByteBuffer;for(var f=r;f<u;++f){a.putInt32(f),n.start(),n.update(t+a.getBytes());var l=n.digest();o.putBytes(l.getBytes(i))}return o.truncate(o.length()-s),o.getBytes()}}e.kem=e.kem||{};var t=e.jsbn.BigInteger;e.kem.rsa={},e.kem.rsa.create=function(n,r){r=r||{};var i=r.prng||e.random,s={};return s.encrypt=function(r,s){var o=Math.ceil(r.n.bitLength()/8),u;do u=(new t(e.util.bytesToHex(i.getBytesSync(o)),16)).mod(r.n);while(u.equals(t.ZERO));u=e.util.hexToBytes(u.toString(16));var a=o-u.length;a>0&&(u=e.util.fillString(String.fromCharCode(0),a)+u);var f=r.encrypt(u,"NONE"),l=n.generate(u,s);return{encapsulation:f,key:l}},s.decrypt=function(e,t,r){var i=e.decrypt(t,"NONE");return n.generate(i,r)},s},e.kem.kdf1=function(e,t){n(this,e,0,t||e.digestLength)},e.kem.kdf2=function(e,t){n(this,e,1,t||e.digestLength)}}var r="kem";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/kem",["require","module","./util","./random","./jsbn"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){e.log=e.log||{},e.log.levels=["none","error","warning","info","debug","verbose","max"];var t={},n=[],r=null;e.log.LEVEL_LOCKED=2,e.log.NO_LEVEL_CHECK=4,e.log.INTERPOLATE=8;for(var i=0;i<e.log.levels.length;++i){var s=e.log.levels[i];t[s]={index:i,name:s.toUpperCase()}}e.log.logMessage=function(r){var i=t[r.level].index;for(var s=0;s<n.length;++s){var o=n[s];if(o.flags&e.log.NO_LEVEL_CHECK)o.f(r);else{var u=t[o.level].index;i<=u&&o.f(o,r)}}},e.log.prepareStandard=function(e){"standard"in e||(e.standard=t[e.level].name+" ["+e.category+"] "+e.message)},e.log.prepareFull=function(t){if(!("full"in t)){var n=[t.message];n=n.concat([]||t.arguments),t.full=e.util.format.apply(this,n)}},e.log.prepareStandardFull=function(t){"standardFull"in t||(e.log.prepareStandard(t),t.standardFull=t.standard)};var o=["error","warning","info","debug","verbose"];for(var i=0;i<o.length;++i)(function(t){e.log[t]=function(n,r){var i=Array.prototype.slice.call(arguments).slice(2),s={timestamp:new Date,level:t,category:n,message:r,arguments:i};e.log.logMessage(s)}})(o[i]);e.log.makeLogger=function(t){var n={flags:0,f:t};return e.log.setLevel(n,"none"),n},e.log.setLevel=function(t,n){var r=!1;if(t&&!(t.flags&e.log.LEVEL_LOCKED))for(var i=0;i<e.log.levels.length;++i){var s=e.log.levels[i];if(n==s){t.level=n,r=!0;break}}return r},e.log.lock=function(t,n){typeof n=="undefined"||n?t.flags|=e.log.LEVEL_LOCKED:t.flags&=~e.log.LEVEL_LOCKED},e.log.addLogger=function(e){n.push(e)};if(typeof console!="undefined"&&"log"in console){var u;if(console.error&&console.warn&&console.info&&console.debug){var a={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},f=function(t,n){e.log.prepareStandard(n);var r=a[n.level],i=[n.standard];i=i.concat(n.arguments.slice()),r.apply(console,i)};u=e.log.makeLogger(f)}else{var f=function(t,n){e.log.prepareStandardFull(n),console.log(n.standardFull)};u=e.log.makeLogger(f)}e.log.setLevel(u,"debug"),e.log.addLogger(u),r=u}else console={log:function(){}};if(r!==null){var l=e.util.getQueryVariables();"console.level"in l&&e.log.setLevel(r,l["console.level"].slice(-1)[0]);if("console.lock"in l){var c=l["console.lock"].slice(-1)[0];c=="true"&&e.log.lock(r)}}e.log.consoleLogger=r}var r="log";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/log",["require","module","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function r(r){var i={},s=[];if(!t.validate(r,n.asn1.recipientInfoValidator,i,s)){var o=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw o.errors=s,o}return{version:i.version.charCodeAt(0),issuer:e.pki.RDNAttributesAsArray(i.issuer),serialNumber:e.util.createBuffer(i.serial).toHex(),encryptedContent:{algorithm:t.derToOid(i.encAlgorithm),parameter:i.encParameter.value,content:i.encKey}}}function i(n){return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(n.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[e.pki.distinguishedNameToAsn1({attributes:n.issuer}),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,e.util.hexToBytes(n.serialNumber))]),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.encryptedContent.algorithm).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")]),t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,n.encryptedContent.content)])}function s(e){var t=[];for(var n=0;n<e.length;++n)t.push(r(e[n]));return t}function o(e){var t=[];for(var n=0;n<e.length;++n)t.push(i(e[n]));return t}function u(r){var i={},s=[];if(!t.validate(r,n.asn1.signerInfoValidator,i,s)){var o=new Error("Cannot read PKCS#7 SignerInfo. ASN.1 object is not an PKCS#7 SignerInfo.");throw o.errors=s,o}var u={version:i.version.charCodeAt(0),issuer:e.pki.RDNAttributesAsArray(i.issuer),serialNumber:e.util.createBuffer(i.serial).toHex(),digestAlgorithm:t.derToOid(i.digestAlgorithm),signatureAlgorithm:t.derToOid(i.signatureAlgorithm),signature:i.signature,authenticatedAttributes:[],unauthenticatedAttributes:[]},a=i.authenticatedAttributes||[],f=i.unauthenticatedAttributes||[];return u}function a(n){var r=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(n.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[e.pki.distinguishedNameToAsn1({attributes:n.issuer}),t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,e.util.hexToBytes(n.serialNumber))]),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.digestAlgorithm).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])]);n.authenticatedAttributesAsn1&&r.value.push(n.authenticatedAttributesAsn1),r.value.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.signatureAlgorithm).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")])),r.value.push(t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,n.signature));if(n.unauthenticatedAttributes.length>0){var i=t.create(t.Class.CONTEXT_SPECIFIC,1,!0,[]);for(var s=0;s<n.unauthenticatedAttributes.length;++s){var o=n.unauthenticatedAttributes[s];i.values.push(c(o))}r.value.push(i)}return r}function f(e){var t=[];for(var n=0;n<e.length;++n)t.push(u(e[n]));return t}function l(e){var t=[];for(var n=0;n<e.length;++n)t.push(a(e[n]));return t}function c(n){var r;if(n.type===e.pki.oids.contentType)r=t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.value).getBytes());else if(n.type===e.pki.oids.messageDigest)r=t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,n.value.bytes());else if(n.type===e.pki.oids.signingTime){var i=new Date("Jan 1, 1950 00:00:00Z"),s=new Date("Jan 1, 2050 00:00:00Z"),o=n.value;if(typeof o=="string"){var u=Date.parse(o);isNaN(u)?o.length===13?o=t.utcTimeToDate(o):o=t.generalizedTimeToDate(o):o=new Date(u)}o>=i&&o<s?r=t.create(t.Class.UNIVERSAL,t.Type.UTCTIME,!1,t.dateToUtcTime(o)):r=t.create(t.Class.UNIVERSAL,t.Type.GENERALIZEDTIME,!1,t.dateToGeneralizedTime(o))}return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.type).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[r])])}function h(n){return[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(e.pki.oids.data).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(n.algorithm).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,n.parameter.getBytes())]),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,n.content.getBytes())])]}function p(n,r,i){var s={},o=[];if(!t.validate(r,i,s,o)){var u=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw u.errors=u,u}var a=t.derToOid(s.contentType);if(a!==e.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(s.encryptedContent){var f="";if(e.util.isArray(s.encryptedContent))for(var l=0;l<s.encryptedContent.length;++l){if(s.encryptedContent[l].type!==t.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");f+=s.encryptedContent[l].value}else f=s.encryptedContent;n.encryptedContent={algorithm:t.derToOid(s.encAlgorithm),parameter:e.util.createBuffer(s.encParameter.value),content:e.util.createBuffer(f)}}if(s.content){var f="";if(e.util.isArray(s.content))for(var l=0;l<s.content.length;++l){if(s.content[l].type!==t.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");f+=s.content[l].value}else f=s.content;n.content=e.util.createBuffer(f)}return n.version=s.version.charCodeAt(0),n.rawCapture=s,s}function d(t){if(t.encryptedContent.key===undefined)throw new Error("Symmetric key not available.");if(t.content===undefined){var n;switch(t.encryptedContent.algorithm){case e.pki.oids["aes128-CBC"]:case e.pki.oids["aes192-CBC"]:case e.pki.oids["aes256-CBC"]:n=e.aes.createDecryptionCipher(t.encryptedContent.key);break;case e.pki.oids.desCBC:case e.pki.oids["des-EDE3-CBC"]:n=e.des.createDecryptionCipher(t.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+t.encryptedContent.algorithm)}n.start(t.encryptedContent.parameter),n.update(t.encryptedContent.content);if(!n.finish())throw new Error("Symmetric decryption failed.");t.content=n.output}}var t=e.asn1,n=e.pkcs7=e.pkcs7||{};n.messageFromPem=function(r){var i=e.pem.decode(r)[0];if(i.type!=="PKCS7"){var s=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw s.headerType=i.type,s}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var o=t.fromDer(i.body);return n.messageFromAsn1(o)},n.messageToPem=function(n,r){var i={type:"PKCS7",body:t.toDer(n.toAsn1()).getBytes()};return e.pem.encode(i,{maxline:r})},n.messageFromAsn1=function(r){var i={},s=[];if(!t.validate(r,n.asn1.contentInfoValidator,i,s)){var o=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw o.errors=s,o}var u=t.derToOid(i.contentType),a;switch(u){case e.pki.oids.envelopedData:a=n.createEnvelopedData();break;case e.pki.oids.encryptedData:a=n.createEncryptedData();break;case e.pki.oids.signedData:a=n.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+u+" is not (yet) supported.")}return a.fromAsn1(i.content.value[0]),a},n.createSignedData=function(){function i(){var n={};for(var i=0;i<r.signers.length;++i){var s=r.signers[i],o=s.digestAlgorithm;o in n||(n[o]=e.md[e.pki.oids[o]].create()),s.authenticatedAttributes.length===0?s.md=n[o]:s.md=e.md[e.pki.oids[o]].create()}r.digestAlgorithmIdentifiers=[];for(var o in n)r.digestAlgorithmIdentifiers.push(t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(o).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.NULL,!1,"")]));return n}function s(n){if(r.contentInfo.value.length<2)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var i=t.derToOid(r.contentInfo.value[0].value),s=r.contentInfo.value[1];s=s.value[0];var o=t.toDer(s);o.getByte(),t.getBerValueLength(o),o=o.getBytes();for(var u in n)n[u].start().update(o);var a=new Date;for(var f=0;f<r.signers.length;++f){var h=r.signers[f];if(h.authenticatedAttributes.length===0){if(i!==e.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{h.authenticatedAttributesAsn1=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[]);var p=t.create(t.Class.UNIVERSAL,t.Type.SET,!0,[]);for(var d=0;d<h.authenticatedAttributes.length;++d){var v=h.authenticatedAttributes[d];v.type===e.pki.oids.messageDigest?v.value=n[h.digestAlgorithm].digest():v.type===e.pki.oids.signingTime&&(v.value||(v.value=a)),p.value.push(c(v)),h.authenticatedAttributesAsn1.value.push(c(v))}o=t.toDer(p).getBytes(),h.md.start().update(o)}h.signature=h.key.sign(h.md,"RSASSA-PKCS1-V1_5")}r.signerInfos=l(r.signers)}var r=null;return r={type:e.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(t){p(r,t,n.asn1.signedDataValidator),r.certificates=[],r.crls=[],r.digestAlgorithmIdentifiers=[],r.contentInfo=null,r.signerInfos=[];var i=r.rawCapture.certificates.value;for(var s=0;s<i.length;++s)r.certificates.push(e.pki.certificateFromAsn1(i[s]))},toAsn1:function(){r.contentInfo||r.sign();var n=[];for(var i=0;i<r.certificates.length;++i)n.push(e.pki.certificateToAsn1(r.certificates[i]));var s=[],o=t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(r.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,r.digestAlgorithmIdentifiers),r.contentInfo])]);return n.length>0&&o.value[0].value.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,n)),s.length>0&&o.value[0].value.push(t.create(t.Class.CONTEXT_SPECIFIC,1,!0,s)),o.value[0].value.push(t.create(t.Class.UNIVERSAL,t.Type.SET,!0,r.signerInfos)),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(r.type).getBytes()),o])},addSigner:function(t){var n=t.issuer,i=t.serialNumber;if(t.certificate){var s=t.certificate;typeof s=="string"&&(s=e.pki.certificateFromPem(s)),n=s.issuer.attributes,i=s.serialNumber}var o=t.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=e.pki.privateKeyFromPem(o));var u=t.digestAlgorithm||e.pki.oids.sha1;switch(u){case e.pki.oids.sha1:case e.pki.oids.sha256:case e.pki.oids.sha384:case e.pki.oids.sha512:case e.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+u)}var a=t.authenticatedAttributes||[];if(a.length>0){var f=!1,l=!1;for(var c=0;c<a.length;++c){var h=a[c];if(!f&&h.type===e.pki.oids.contentType){f=!0;if(l)break;continue}if(!l&&h.type===e.pki.oids.messageDigest){l=!0;if(f)break;continue}}if(!f||!l)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}r.signers.push({key:o,version:1,issuer:n,serialNumber:i,digestAlgorithm:u,signatureAlgorithm:e.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:a,unauthenticatedAttributes:[]})},sign:function(){if(typeof r.content!="object"||r.contentInfo===null){r.contentInfo=t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(e.pki.oids.data).getBytes())]);if("content"in r){var n;r.content instanceof e.util.ByteBuffer?n=r.content.bytes():typeof r.content=="string"&&(n=e.util.encodeUtf8(r.content)),r.contentInfo.value.push(t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.OCTETSTRING,!1,n)]))}}if(r.signers.length===0)return;var o=i();s(o)},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(t){typeof t=="string"&&(t=e.pki.certificateFromPem(t)),r.certificates.push(t)},addCertificateRevokationList:function(e){throw new Error("PKCS#7 CRL support not yet implemented.")}},r},n.createEncryptedData=function(){var t=null;return t={type:e.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:e.pki.oids["aes256-CBC"]},fromAsn1:function(e){p(t,e,n.asn1.encryptedDataValidator)},decrypt:function(e){e!==undefined&&(t.encryptedContent.key=e),d(t)}},t},n.createEnvelopedData=function(){var r=null;return r={type:e.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:e.pki.oids["aes256-CBC"]},fromAsn1:function(e){var t=p(r,e,n.asn1.envelopedDataValidator);r.recipients=s(t.recipientInfos.value)},toAsn1:function(){return t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.OID,!1,t.oidToDer(r.type).getBytes()),t.create(t.Class.CONTEXT_SPECIFIC,0,!0,[t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,[t.create(t.Class.UNIVERSAL,t.Type.INTEGER,!1,t.integerToDer(r.version).getBytes()),t.create(t.Class.UNIVERSAL,t.Type.SET,!0,o(r.recipients)),t.create(t.Class.UNIVERSAL,t.Type.SEQUENCE,!0,h(r.encryptedContent))])])])},findRecipient:function(e){var t=e.issuer.attributes;for(var n=0;n<r.recipients.length;++n){var i=r.recipients[n],s=i.issuer;if(i.serialNumber!==e.serialNumber)continue;if(s.length!==t.length)continue;var o=!0;for(var u=0;u<t.length;++u)if(s[u].type!==t[u].type||s[u].value!==t[u].value){o=!1;break}if(o)return i}return null},decrypt:function(t,n){if(r.encryptedContent.key===undefined&&t!==undefined&&n!==undefined)switch(t.encryptedContent.algorithm){case e.pki.oids.rsaEncryption:case e.pki.oids.desCBC:var i=n.decrypt(t.encryptedContent.content);r.encryptedContent.key=e.util.createBuffer(i);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}d(r)},addRecipient:function(t){r.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:e.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,n){if(r.encryptedContent.content===undefined){n=n||r.encryptedContent.algorithm,t=t||r.encryptedContent.key;var i,s,o;switch(n){case e.pki.oids["aes128-CBC"]:i=16,s=16,o=e.aes.createEncryptionCipher;break;case e.pki.oids["aes192-CBC"]:i=24,s=16,o=e.aes.createEncryptionCipher;break;case e.pki.oids["aes256-CBC"]:i=32,s=16,o=e.aes.createEncryptionCipher;break;case e.pki.oids["des-EDE3-CBC"]:i=24,s=8,o=e.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+n)}if(t===undefined)t=e.util.createBuffer(e.random.getBytes(i));else if(t.length()!=i)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+i+".");r.encryptedContent.algorithm=n,r.encryptedContent.key=t,r.encryptedContent.parameter=e.util.createBuffer(e.random.getBytes(s));var u=o(t);u.start(r.encryptedContent.parameter.copy()),u.update(r.content);if(!u.finish())throw new Error("Symmetric encryption failed.");r.encryptedContent.content=u.output}for(var a=0;a<r.recipients.length;++a){var f=r.recipients[a];if(f.encryptedContent.content!==undefined)continue;switch(f.encryptedContent.algorithm){case e.pki.oids.rsaEncryption:f.encryptedContent.content=f.encryptedContent.key.encrypt(r.encryptedContent.key.data);break;default:throw new Error("Unsupported asymmetric cipher, OID "+f.encryptedContent.algorithm)}}}},r}}var r="pkcs7";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/pkcs7",["require","module","./aes","./asn1","./des","./oids","./pem","./pkcs7asn1","./random","./util","./x509"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){function n(t,n){var r=n.toString(16);r[0]>="8"&&(r="00"+r);var i=e.util.hexToBytes(r);t.putInt32(i.length),t.putBytes(i)}function r(e,t){e.putInt32(t.length),e.putString(t)}function i(){var t=e.md.sha1.create(),n=arguments.length;for(var r=0;r<n;++r)t.update(arguments[r]);return t.digest()}var t=e.ssh=e.ssh||{};t.privateKeyToPutty=function(t,s,o){o=o||"",s=s||"";var u="ssh-rsa",a=s===""?"none":"aes256-cbc",f="PuTTY-User-Key-File-2: "+u+"\r\n";f+="Encryption: "+a+"\r\n",f+="Comment: "+o+"\r\n";var l=e.util.createBuffer();r(l,u),n(l,t.e),n(l,t.n);var c=e.util.encode64(l.bytes(),64),h=Math.floor(c.length/66)+1;f+="Public-Lines: "+h+"\r\n",f+=c;var p=e.util.createBuffer();n(p,t.d),n(p,t.p),n(p,t.q),n(p,t.qInv);var d;if(!s)d=e.util.encode64(p.bytes(),64);else{var v=p.length()+16-1;v-=v%16;var m=i(p.bytes());m.truncate(m.length()-v+p.length()),p.putBuffer(m);var g=e.util.createBuffer();g.putBuffer(i("\0\0\0\0",s)),g.putBuffer(i("\0\0\0",s));var y=e.aes.createEncryptionCipher(g.truncate(8),"CBC");y.start(e.util.createBuffer().fillWithByte(0,16)),y.update(p.copy()),y.finish();var b=y.output;b.truncate(16),d=e.util.encode64(b.bytes(),64)}h=Math.floor(d.length/66)+1,f+="\r\nPrivate-Lines: "+h+"\r\n",f+=d;var w=i("putty-private-key-file-mac-key",s),E=e.util.createBuffer();r(E,u),r(E,a),r(E,o),E.putInt32(l.length()),E.putBuffer(l),E.putInt32(p.length()),E.putBuffer(p);var S=e.hmac.create();return S.start("sha1",w),S.update(E.bytes()),f+="\r\nPrivate-MAC: "+S.digest().toHex()+"\r\n",f},t.publicKeyToOpenSSH=function(t,i){var s="ssh-rsa";i=i||"";var o=e.util.createBuffer();return r(o,s),n(o,t.e),n(o,t.n),s+" "+e.util.encode64(o.bytes())+" "+i},t.privateKeyToOpenSSH=function(t,n){return n?e.pki.encryptRsaPrivateKey(t,n,{legacy:!0,algorithm:"aes128"}):e.pki.privateKeyToPem(t)},t.getPublicKeyFingerprint=function(t,i){i=i||{};var s=i.md||e.md.md5.create(),o="ssh-rsa",u=e.util.createBuffer();r(u,o),n(u,t.e),n(u,t.n),s.start(),s.update(u.getBytes());var a=s.digest();if(i.encoding==="hex"){var f=a.toHex();return i.delimiter?f.match(/.{2}/g).join(i.delimiter):f}if(i.encoding==="binary")return a.getBytes();if(i.encoding)throw new Error('Unknown encoding "'+i.encoding+'".');return a}}var r="ssh";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/ssh",["require","module","./aes","./hmac","./md5","./sha1","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){function e(e){var t="forge.task",n=0,r={},i=0;e.debug.set(t,"tasks",r);var s={};e.debug.set(t,"queues",s);var o="?",u=30,a=20,f="ready",l="running",c="blocked",h="sleeping",p="done",d="error",v="stop",m="start",g="block",y="unblock",b="sleep",w="wakeup",E="cancel",S="fail",x={};x[f]={},x[f][v]=f,x[f][m]=l,x[f][E]=p,x[f][S]=d,x[l]={},x[l][v]=f,x[l][m]=l,x[l][g]=c,x[l][y]=l,x[l][b]=h,x[l][w]=l,x[l][E]=p,x[l][S]=d,x[c]={},x[c][v]=c,x[c][m]=c,x[c][g]=c,x[c][y]=c,x[c][b]=c,x[c][w]=c,x[c][E]=p,x[c][S]=d,x[h]={},x[h][v]=h,x[h][m]=h,x[h][g]=h,x[h][y]=h,x[h][b]=h,x[h][w]=h,x[h][E]=p,x[h][S]=d,x[p]={},x[p][v]=p,x[p][m]=p,x[p][g]=p,x[p][y]=p,x[p][b]=p,x[p][w]=p,x[p][E]=p,x[p][S]=d,x[d]={},x[d][v]=d,x[d][m]=d,x[d][g]=d,x[d][y]=d,x[d][b]=d,x[d][w]=d,x[d][E]=d,x[d][S]=d;var T=function(s){this.id=-1,this.name=s.name||o,this.parent=s.parent||null,this.run=s.run,this.subtasks=[],this.error=!1,this.state=f,this.blocks=0,this.timeoutId=null,this.swapTime=null,this.userData=null,this.id=i++,r[this.id]=this,n>=1&&e.log.verbose(t,"[%s][%s] init",this.id,this.name,this)};T.prototype.debug=function(n){n=n||"",e.log.debug(t,n,"[%s][%s] task:",this.id,this.name,this,"subtasks:",this.subtasks.length,"queue:",s)},T.prototype.next=function(e,t){typeof e=="function"&&(t=e,e=this.name);var n=new T({run:t,name:e,parent:this});return n.state=l,n.type=this.type,n.successCallback=this.successCallback||null,n.failureCallback=this.failureCallback||null,this.subtasks.push(n),this},T.prototype.parallel=function(t,n){return e.util.isArray(t)&&(n=t,t=this.name),this.next(t,function(r){var i=r;i.block(n.length);var s=function(t,r){e.task.start({type:t,run:function(e){n[r](e)},success:function(e){i.unblock()},failure:function(e){i.unblock()}})};for(var o=0;o<n.length;o++){var u=t+"__parallel-"+r.id+"-"+o,a=o;s(u,a)}})},T.prototype.stop=function(){this.state=x[this.state][v]},T.prototype.start=function(){this.error=!1,this.state=x[this.state][m],this.state===l&&(this.start=new Date,this.run(this),C(this,0))},T.prototype.block=function(e){e=typeof e=="undefined"?1:e,this.blocks+=e,this.blocks>0&&(this.state=x[this.state][g])},T.prototype.unblock=function(e){return e=typeof e=="undefined"?1:e,this.blocks-=e,this.blocks===0&&this.state!==p&&(this.state=l,C(this,0)),this.blocks},T.prototype.sleep=function(e){e=typeof e=="undefined"?0:e,this.state=x[this.state][b];var t=this;this.timeoutId=setTimeout(function(){t.timeoutId=null,t.state=l,C(t,0)},e)},T.prototype.wait=function(e){e.wait(this)},T.prototype.wakeup=function(){this.state===h&&(cancelTimeout(this.timeoutId),this.timeoutId=null,this.state=l,C(this,0))},T.prototype.cancel=function(){this.state=x[this.state][E],this.permitsNeeded=0,this.timeoutId!==null&&(cancelTimeout(this.timeoutId),this.timeoutId=null),this.subtasks=[]},T.prototype.fail=function(e){this.error=!0,k(this,!0);if(e)e.error=this.error,e.swapTime=this.swapTime,e.userData=this.userData,C(e,0);else{if(this.parent!==null){var t=this.parent;while(t.parent!==null)t.error=this.error,t.swapTime=this.swapTime,t.userData=this.userData,t=t.parent;k(t,!0)}this.failureCallback&&this.failureCallback(this)}};var N=function(e){e.error=!1,e.state=x[e.state][m],setTimeout(function(){e.state===l&&(e.swapTime=+(new Date),e.run(e),C(e,0))},0)},C=function(e,t){var n=t>u||+(new Date)-e.swapTime>a,r=function(t){t++;if(e.state===l){n&&(e.swapTime=+(new Date));if(e.subtasks.length>0){var r=e.subtasks.shift();r.error=e.error,r.swapTime=e.swapTime,r.userData=e.userData,r.run(r),r.error||C(r,t)}else k(e),e.error||e.parent!==null&&(e.parent.error=e.error,e.parent.swapTime=e.swapTime,e.parent.userData=e.userData,C(e.parent,t))}};n?setTimeout(r,0):r(t)},k=function(i,o){i.state=p,delete r[i.id],n>=1&&e.log.verbose(t,"[%s][%s] finish",i.id,i.name,i),i.parent===null&&(i.type in s?s[i.type].length===0?e.log.error(t,"[%s][%s] task queue empty [%s]",i.id,i.name,i.type):s[i.type][0]!==i?e.log.error(t,"[%s][%s] task not first in queue [%s]",i.id,i.name,i.type):(s[i.type].shift(),s[i.type].length===0?(n>=1&&e.log.verbose(t,"[%s][%s] delete queue [%s]",i.id,i.name,i.type),delete s[i.type]):(n>=1&&e.log.verbose(t,"[%s][%s] queue start next [%s] remain:%s",i.id,i.name,i.type,s[i.type].length),s[i.type][0].start())):e.log.error(t,"[%s][%s] task queue missing [%s]",i.id,i.name,i.type),o||(i.error&&i.failureCallback?i.failureCallback(i):!i.error&&i.successCallback&&i.successCallback(i)))};e.task=e.task||{},e.task.start=function(r){var i=new T({run:r.run,name:r.name||o});i.type=r.type,i.successCallback=r.success||null,i.failureCallback=r.failure||null,i.type in s?s[r.type].push(i):(n>=1&&e.log.verbose(t,"[%s][%s] create queue [%s]",i.id,i.name,i.type),s[i.type]=[i],N(i))},e.task.cancel=function(e){e in s&&(s[e]=[s[e][0]])},e.task.createCondition=function(){var e={tasks:{}};return e.wait=function(t){t.id in e.tasks||(t.block(),e.tasks[t.id]=t)},e.notify=function(){var t=e.tasks;e.tasks={};for(var n in t)t[n].unblock()},e}}var r="task";if(typeof n!="function"){if(typeof module!="object"||!module.exports)return typeof forge=="undefined"&&(forge={}),e(forge);var i=!0;n=function(e,n){n(t,module)}}var s,o=function(t,n){n.exports=function(n){var i=s.map(function(e){return t(e)}).concat(e);n=n||{},n.defined=n.defined||{};if(n.defined[r])return n[r];n.defined[r]=!0;for(var o=0;o<i.length;++o)i[o](n);return n[r]}},u=n;n=function(e,t){return s=typeof e=="string"?t.slice(2):e.slice(2),i?(delete n,u.apply(null,Array.prototype.slice.call(arguments,0))):(n=u,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/task",["require","module","./debug","./log","./util"],function(){o.apply(null,Array.prototype.slice.call(arguments,0))})}(),function(){var e="forge";if(typeof n!="function"){if(typeof module!="object"||!module.exports){typeof forge=="undefined"&&(forge={disableNativeCode:!1});return}var r=!0;n=function(e,n){n(t,module)}}var i,s=function(t,n){n.exports=function(n){var r=i.map(function(e){return t(e)});n=n||{},n.defined=n.defined||{};if(n.defined[e])return n[e];n.defined[e]=!0;for(var s=0;s<r.length;++s)r[s](n);return n},n.exports.disableNativeCode=!1,n.exports(n.exports)},o=n;n=function(e,t){return i=typeof e=="string"?t.slice(2):e.slice(2),r?(delete n,o.apply(null,Array.prototype.slice.call(arguments,0))):(n=o,n.apply(null,Array.prototype.slice.call(arguments,0)))},n("js/forge",["require","module","./aes","./aesCipherSuites","./asn1","./cipher","./cipherModes","./debug","./des","./hmac","./kem","./log","./md","./mgf1","./pbkdf2","./pem","./pkcs7","./pkcs1","./pkcs12","./pki","./prime","./prng","./pss","./random","./rc2","./ssh","./task","./tls","./util"],function(){s.apply(null,Array.prototype.slice.call(arguments,0))})}(),t("js/forge")});//
// This file is part of Honey Require
//
// Copyright (c) 2015 Torben Haase
//
// Honey Require is free software: you can redistribute it and/or modify it
// under the terms of the MIT License (MIT).
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// You should have received a copy of the MIT License along with Honey Require.
// If not, see <https://opensource.org/licenses/MIT>.
//
////////////////////////////////////////////////////////////////////////////////
// NOTE The load parameter points to the function, which prepares the
// environment for each module and runs its code. Scroll down to the end of
// the file to see the function definition.
(function(load) { 'use strict';
// NOTE Mozilla still sets the wrong fileName property for errors that occur
// inside an eval call (even with sourceURL). However, the stack
// contains the correct source, so it can be used to re-threw the error
// with the correct fileName property.
// WARN Re-throwing an error object will mess up the stack trace and the
// column number.
if (typeof (new Error()).fileName == "string") {
self.addEventListener("error", function(evt) {
if (evt.error instanceof Error) {
if (pwd[0]) {
evt.preventDefault();
throw new evt.error.constructor(evt.error.message, pwd[0].uri, evt.error.lineNumber);
}
else {
var m = evt.error.stack.match(/^[^\n@]*@([^\n]+):\d+:\d+/);
if (m === null) {
console.warn("Honey: unable to read file name from stack");
}
else if (evt.error.fileName != m[1]) {
evt.preventDefault();
throw new evt.error.constructor(evt.error.message, m[1], evt.error.lineNumber);
}
}
}
}, false);
}
// INFO Current module descriptors
// pwd[0] contains the descriptor of the currently loaded module,
// pwd[1] contains the descriptor its parent module and so on.
var pwd = Array();
// INFO Path parser
// Older browsers don't support the URL interface, therefore we use an
// anchor element as parser in that case. Thes breaks web worker support,
// but we don't care since these browsers also don't support web workers.
try {
var parser = new URL(location.href);
}
catch (e) {
console.warn("Honey: falling back to DOM workaround for URL parser ("+e+")");
parser = document.createElement('A');
}
// INFO Module cache
// Contains getter functions for the exports objects of all the loaded
// modules. The getter for the module 'mymod' is name '$name' to prevent
// collisions with predefined object properties (see note below).
// As long as a module has not been loaded the getter is either undefined
// or contains the module code as a function (in case the module has been
// pre-loaded in a bundle).
// WARN IE8 supports defineProperty only for DOM objects, therfore we use a
// HTMLDivElement as cache in that case. This breaks web worker support,
// but we don't care since IE8 has no web workers at all.
try {
var cache = new Object();
Object.defineProperty(cache, "foo", {'value':"bar",'configurable':true});
delete cache.foo;
}
catch (e) {
console.warn("Honey: falling back to DOM workaround for cache object ("+e+")");
cache = document.createElement('DIV');
}
// INFO Send lock
// Sending the request causes the event loop to continue. Therefore
// pending AJAX load events for the same url might be executed before
// the synchronous onLoad is called. This should be no problem, but in
// Chrome the responseText of the sneaked in load events will be empty.
// Therefore we have to lock the loading while executing send().
var lock = new Object();
// INFO Honey options
// The values can be set by defining a object called Honey. The
// Honey object has to be defined before this script here is loaded
// and changing the values in the Honey object will have no effect
// afterwards!
var requirePath = self.Honey&&self.Honey.requirePath!==undefined ? self.Honey.requirePath.slice(0) : ['./'];
var requireCompiler = self.Honey&&self.Honey.requireCompiler!==undefined ? self.Honey.requireCompiler : null;
// NOTE Parse module root paths
var base = [location.origin, location.href.substr(0, location.href.replace(location.hash,"").lastIndexOf("/")+1)];
for (var i=0; i<requirePath.length; i++) {
parser.href = (requirePath[i][0]=="."?base[1]:base[0])+requirePath[i];
requirePath[i] = parser.href;
}
// NOTE Add preloaded modules to cache
for (var id in (self.Honey && self.Honey.requirePreloaded))
cache['$'+resolve(id).id] = self.Honey.requirePreloaded[id].toString();
// NOTE Add module overrides to cache
for (var id in (self.Honey && self.Honey.requireOverrides))
cache['$'+resolve(id).id] = self.Honey.requireOverrides[id];
// INFO Module getter
// Takes a module identifier, resolves it and gets the module code via an
// AJAX request from the module URI. If this was successful the code and
// some environment variables are passed to the load function. The return
// value is the module's `exports` object. If the cache already
// contains an object for the module id, this object is returned directly.
// NOTE If a callback function has been passed, the AJAX request is asynchronous
// and the mpdule exports are passed to the callback function after the
// module has been loaded.
function require(identifier, callback, compiler) {
if (identifier instanceof Array) {
var modules = new Array();
var modcount = identifier.length;
for (var index = 0; index < identifier.length; index++) {
(function(id, i) {
modules.push(require(id, callback&&function(mod) {
modules[i] = mod;
(--modcount==0) && callback(modules);
}, compiler));
})(identifier[index], index);
}
return modules;
}
compiler = compiler!==undefined ? compiler : requireCompiler;
var descriptor = resolve(identifier);
var cacheid = '$'+descriptor.id;
if (cache[cacheid]) {
if (typeof cache[cacheid] === 'string')
load(descriptor, cache, pwd, cache[cacheid]);
// NOTE The callback should always be called asynchronously to ensure
// that a cached call won't differ from an uncached one.
callback && setTimeout(function(){callback(cache[cacheid])}, 0);
return cache[cacheid];
}
var request = new XMLHttpRequest();
// NOTE IE8 doesn't support the onload event, therefore we use
// onreadystatechange as a fallback here. However, onreadystatechange
// shouldn't be used for all browsers, since at least mobile Safari
// seems to have an issue where onreadystatechange is called twice for
// readyState 4.
callback && (request[request.onload===null?'onload':'onreadystatechange'] = onLoad);
request.open('GET', descriptor.uri, !!callback);
lock[cacheid] = lock[cacheid]++||1;
request.send();
lock[cacheid]--;
!callback && onLoad();
return cache[cacheid];
function onLoad() {
if (request.readyState != 4)
return;
if (request.status != 200)
throw new Error("Honey: unable to load "+descriptor.id+" ("+request.status+" "+request.statusText+")");
if (lock[cacheid]) {
console.warn("Honey: module locked: "+descriptor.id);
callback && setTimeout(onLoad, 0);
return;
}
if (!cache[cacheid]) {
var source = compiler ? compiler(request.responseText) : request.responseText;
load(descriptor, cache, pwd, 'function(){\n'+source+'\n}');
}
callback && callback(cache[cacheid]);
}
}
// INFO Module resolver
// Takes a module identifier and resolves it to a module id and URI. Both
// values are returned as a module descriptor, which can be passed to
// `fetch` to load a module.
function resolve(identifier) {
// NOTE Matches [1]:[..]/[path/to/][file][.js]
var m = identifier.match(/^(?:([^:\/]+):)?(\.\.?)?\/?((?:.*\/)?)([^\.]+)?(\..*)?$/);
// NOTE Matches [1]:[/path/to/]file.js
var p = (pwd[0]?pwd[0].id:"").match(/^(?:([^:\/]+):)?(.*\/|)[^\/]*$/);
var root = m[2] ? requirePath[p[1]?parseInt(p[1]):0] : requirePath[m[1]?parseInt(m[1]):0];
parser.href = (m[2]?root+p[2]+m[2]+'/':root)+m[3]+(m[4]?m[4]:'index');
var uri = parser.href+(m[5]?m[5]:'.js');
if (uri.substr(0,root.length) != root)
throw new Error("Honey: relative identifier outside of module root");
var id = (m[1]?m[1]+":":"0:")+parser.href.substr(root.length);
return {'id':id,'uri':uri};
}
// INFO Exporting require to global scope
if (self.require !== undefined)
throw new Error("Honey: '\'require\' already defined in global scope");
try {
Object.defineProperty(self, 'require', {'value':require});
Object.defineProperty(self.require, 'resolve', {'value':resolve});
Object.defineProperty(self.require, 'path', {'get':function(){return requirePath.slice(0);}});
}
catch (e) {
// NOTE IE8 can't use defineProperty on non-DOM objects, so we have to fall
// back to unsave property assignments in this case.
self.require = require;
self.require.resolve = resolve;
self.require.path = requirePath.slice(0);
}
})(
// INFO Module loader
// Takes the module descriptor, the global variables and the module code,
// sets up the module envirinment, defines the module getter in the cache
// and evaluates the module code. If module is a bundle the code of the
// pre-loaded modules will be stored in the cache afterwards.
// NOTE This functions is defined as an anonymous function, which is passed as
// a parameter to the closure above to provide a clean environment (only
// global variables, module and exports) for the loaded module. This is
// also the reason why `source`, `pwd` & `cache` are not named parameters.
// NOTE If we would strict use mode here, the evaluated code would be forced to be
// in strict mode, too.
function /*load*/(module/*, cache, pwd, source*/) {
var global = self;
var exports = new Object();
Object.defineProperty(module, 'exports', {'get':function(){return exports;},'set':function(e){exports=e;}});
arguments[2].unshift(module);
Object.defineProperty(arguments[1], '$'+module.id, {'get':function(){return exports;}});
arguments[3] = '('+arguments[3]+')();\n//# sourceURL='+module.uri;
eval(arguments[3]);
// NOTE Store module code in the cache if the loaded file is a bundle
if (typeof module.id !== 'string')
for (id in module)
arguments[1]['$'+require.resolve(id).id] = module[id].toString();
arguments[2].shift();
}
);/*!
Papa Parse
v4.1.2
https://github.com/mholt/PapaParse
*/
(function(global)
{
"use strict";
var IS_WORKER = !global.document && !!global.postMessage,
IS_PAPA_WORKER = IS_WORKER && /(\?|&)papaworker(=|&|$)/.test(global.location.search),
LOADED_SYNC = false, AUTO_SCRIPT_PATH;
var workers = {}, workerIdCounter = 0;
var Papa = {};
Papa.parse = CsvToJson;
Papa.unparse = JsonToCsv;
Papa.RECORD_SEP = String.fromCharCode(30);
Papa.UNIT_SEP = String.fromCharCode(31);
Papa.BYTE_ORDER_MARK = "\ufeff";
Papa.BAD_DELIMITERS = ["\r", "\n", "\"", Papa.BYTE_ORDER_MARK];
Papa.WORKERS_SUPPORTED = !IS_WORKER && !!global.Worker;
Papa.SCRIPT_PATH = null; // Must be set by your code if you use workers and this lib is loaded asynchronously
// Configurable chunk sizes for local and remote files, respectively
Papa.LocalChunkSize = 1024 * 1024 * 10; // 10 MB
Papa.RemoteChunkSize = 1024 * 1024 * 5; // 5 MB
Papa.DefaultDelimiter = ","; // Used if not specified and detection fails
// Exposed for testing and development only
Papa.Parser = Parser;
Papa.ParserHandle = ParserHandle;
Papa.NetworkStreamer = NetworkStreamer;
Papa.FileStreamer = FileStreamer;
Papa.StringStreamer = StringStreamer;
if (typeof module !== 'undefined' && module.exports)
{
// Export to Node...
module.exports = Papa;
}
else if (isFunction(global.define) && global.define.amd)
{
// Wireup with RequireJS
define(function() { return Papa; });
}
else
{
// ...or as browser global
global.Papa = Papa;
}
if (global.jQuery)
{
var $ = global.jQuery;
$.fn.parse = function(options)
{
var config = options.config || {};
var queue = [];
this.each(function(idx)
{
var supported = $(this).prop('tagName').toUpperCase() == "INPUT"
&& $(this).attr('type').toLowerCase() == "file"
&& global.FileReader;
if (!supported || !this.files || this.files.length == 0)
return true; // continue to next input element
for (var i = 0; i < this.files.length; i++)
{
queue.push({
file: this.files[i],
inputElem: this,
instanceConfig: $.extend({}, config)
});
}
});
parseNextFile(); // begin parsing
return this; // maintains chainability
function parseNextFile()
{
if (queue.length == 0)
{
if (isFunction(options.complete))
options.complete();
return;
}
var f = queue[0];
if (isFunction(options.before))
{
var returned = options.before(f.file, f.inputElem);
if (typeof returned === 'object')
{
if (returned.action == "abort")
{
error("AbortError", f.file, f.inputElem, returned.reason);
return; // Aborts all queued files immediately
}
else if (returned.action == "skip")
{
fileComplete(); // parse the next file in the queue, if any
return;
}
else if (typeof returned.config === 'object')
f.instanceConfig = $.extend(f.instanceConfig, returned.config);
}
else if (returned == "skip")
{
fileComplete(); // parse the next file in the queue, if any
return;
}
}
// Wrap up the user's complete callback, if any, so that ours also gets executed
var userCompleteFunc = f.instanceConfig.complete;
f.instanceConfig.complete = function(results)
{
if (isFunction(userCompleteFunc))
userCompleteFunc(results, f.file, f.inputElem);
fileComplete();
};
Papa.parse(f.file, f.instanceConfig);
}
function error(name, file, elem, reason)
{
if (isFunction(options.error))
options.error({name: name}, file, elem, reason);
}
function fileComplete()
{
queue.splice(0, 1);
parseNextFile();
}
}
}
if (IS_PAPA_WORKER)
{
global.onmessage = workerThreadReceivedMessage;
}
else if (Papa.WORKERS_SUPPORTED)
{
AUTO_SCRIPT_PATH = getScriptPath();
// Check if the script was loaded synchronously
if (!document.body)
{
// Body doesn't exist yet, must be synchronous
LOADED_SYNC = true;
}
else
{
document.addEventListener('DOMContentLoaded', function () {
LOADED_SYNC = true;
}, true);
}
}
function CsvToJson(_input, _config)
{
_config = _config || {};
if (_config.worker && Papa.WORKERS_SUPPORTED)
{
var w = newWorker();
w.userStep = _config.step;
w.userChunk = _config.chunk;
w.userComplete = _config.complete;
w.userError = _config.error;
_config.step = isFunction(_config.step);
_config.chunk = isFunction(_config.chunk);
_config.complete = isFunction(_config.complete);
_config.error = isFunction(_config.error);
delete _config.worker; // prevent infinite loop
w.postMessage({
input: _input,
config: _config,
workerId: w.id
});
return;
}
var streamer = null;
if (typeof _input === 'string')
{
if (_config.download)
streamer = new NetworkStreamer(_config);
else
streamer = new StringStreamer(_config);
}
else if ((global.File && _input instanceof File) || _input instanceof Object) // ...Safari. (see issue #106)
streamer = new FileStreamer(_config);
return streamer.stream(_input);
}
function JsonToCsv(_input, _config)
{
var _output = "";
var _fields = [];
// Default configuration
/** whether to surround every datum with quotes */
var _quotes = false;
/** delimiting character */
var _delimiter = ",";
/** newline character(s) */
var _newline = "\r\n";
unpackConfig();
if (typeof _input === 'string')
_input = JSON.parse(_input);
if (_input instanceof Array)
{
if (!_input.length || _input[0] instanceof Array)
return serialize(null, _input);
else if (typeof _input[0] === 'object')
return serialize(objectKeys(_input[0]), _input);
}
else if (typeof _input === 'object')
{
if (typeof _input.data === 'string')
_input.data = JSON.parse(_input.data);
if (_input.data instanceof Array)
{
if (!_input.fields)
_input.fields = _input.data[0] instanceof Array
? _input.fields
: objectKeys(_input.data[0]);
if (!(_input.data[0] instanceof Array) && typeof _input.data[0] !== 'object')
_input.data = [_input.data]; // handles input like [1,2,3] or ["asdf"]
}
return serialize(_input.fields || [], _input.data || []);
}
// Default (any valid paths should return before this)
throw "exception: Unable to serialize unrecognized input";
function unpackConfig()
{
if (typeof _config !== 'object')
return;
if (typeof _config.delimiter === 'string'
&& _config.delimiter.length == 1
&& Papa.BAD_DELIMITERS.indexOf(_config.delimiter) == -1)
{
_delimiter = _config.delimiter;
}
if (typeof _config.quotes === 'boolean'
|| _config.quotes instanceof Array)
_quotes = _config.quotes;
if (typeof _config.newline === 'string')
_newline = _config.newline;
}
/** Turns an object's keys into an array */
function objectKeys(obj)
{
if (typeof obj !== 'object')
return [];
var keys = [];
for (var key in obj)
keys.push(key);
return keys;
}
/** The double for loop that iterates the data and writes out a CSV string including header row */
function serialize(fields, data)
{
var csv = "";
if (typeof fields === 'string')
fields = JSON.parse(fields);
if (typeof data === 'string')
data = JSON.parse(data);
var hasHeader = fields instanceof Array && fields.length > 0;
var dataKeyedByField = !(data[0] instanceof Array);
// If there a header row, write it first
if (hasHeader)
{
for (var i = 0; i < fields.length; i++)
{
if (i > 0)
csv += _delimiter;
csv += safe(fields[i], i);
}
if (data.length > 0)
csv += _newline;
}
// Then write out the data
for (var row = 0; row < data.length; row++)
{
var maxCol = hasHeader ? fields.length : data[row].length;
for (var col = 0; col < maxCol; col++)
{
if (col > 0)
csv += _delimiter;
var colIdx = hasHeader && dataKeyedByField ? fields[col] : col;
csv += safe(data[row][colIdx], col);
}
if (row < data.length - 1)
csv += _newline;
}
return csv;
}
/** Encloses a value around quotes if needed (makes a value safe for CSV insertion) */
function safe(str, col)
{
if (typeof str === "undefined" || str === null)
return "";
str = str.toString().replace(/"/g, '""');
var needsQuotes = (typeof _quotes === 'boolean' && _quotes)
|| (_quotes instanceof Array && _quotes[col])
|| hasAny(str, Papa.BAD_DELIMITERS)
|| str.indexOf(_delimiter) > -1
|| str.charAt(0) == ' '
|| str.charAt(str.length - 1) == ' ';
return needsQuotes ? '"' + str + '"' : str;
}
function hasAny(str, substrings)
{
for (var i = 0; i < substrings.length; i++)
if (str.indexOf(substrings[i]) > -1)
return true;
return false;
}
}
/** ChunkStreamer is the base prototype for various streamer implementations. */
function ChunkStreamer(config)
{
this._handle = null;
this._paused = false;
this._finished = false;
this._input = null;
this._baseIndex = 0;
this._partialLine = "";
this._rowCount = 0;
this._start = 0;
this._nextChunk = null;
this.isFirstChunk = true;
this._completeResults = {
data: [],
errors: [],
meta: {}
};
replaceConfig.call(this, config);
this.parseChunk = function(chunk)
{
// First chunk pre-processing
if (this.isFirstChunk && isFunction(this._config.beforeFirstChunk))
{
var modifiedChunk = this._config.beforeFirstChunk(chunk);
if (modifiedChunk !== undefined)
chunk = modifiedChunk;
}
this.isFirstChunk = false;
// Rejoin the line we likely just split in two by chunking the file
var aggregate = this._partialLine + chunk;
this._partialLine = "";
var results = this._handle.parse(aggregate, this._baseIndex, !this._finished);
if (this._handle.paused() || this._handle.aborted())
return;
var lastIndex = results.meta.cursor;
if (!this._finished)
{
this._partialLine = aggregate.substring(lastIndex - this._baseIndex);
this._baseIndex = lastIndex;
}
if (results && results.data)
this._rowCount += results.data.length;
var finishedIncludingPreview = this._finished || (this._config.preview && this._rowCount >= this._config.preview);
if (IS_PAPA_WORKER)
{
global.postMessage({
results: results,
workerId: Papa.WORKER_ID,
finished: finishedIncludingPreview
});
}
else if (isFunction(this._config.chunk))
{
this._config.chunk(results, this._handle);
if (this._paused)
return;
results = undefined;
this._completeResults = undefined;
}
if (!this._config.step && !this._config.chunk) {
this._completeResults.data = this._completeResults.data.concat(results.data);
this._completeResults.errors = this._completeResults.errors.concat(results.errors);
this._completeResults.meta = results.meta;
}
if (finishedIncludingPreview && isFunction(this._config.complete) && (!results || !results.meta.aborted))
this._config.complete(this._completeResults);
if (!finishedIncludingPreview && (!results || !results.meta.paused))
this._nextChunk();
return results;
};
this._sendError = function(error)
{
if (isFunction(this._config.error))
this._config.error(error);
else if (IS_PAPA_WORKER && this._config.error)
{
global.postMessage({
workerId: Papa.WORKER_ID,
error: error,
finished: false
});
}
};
function replaceConfig(config)
{
// Deep-copy the config so we can edit it
var configCopy = copy(config);
configCopy.chunkSize = parseInt(configCopy.chunkSize); // parseInt VERY important so we don't concatenate strings!
if (!config.step && !config.chunk)
configCopy.chunkSize = null; // disable Range header if not streaming; bad values break IIS - see issue #196
this._handle = new ParserHandle(configCopy);
this._handle.streamer = this;
this._config = configCopy; // persist the copy to the caller
}
}
function NetworkStreamer(config)
{
config = config || {};
if (!config.chunkSize)
config.chunkSize = Papa.RemoteChunkSize;
ChunkStreamer.call(this, config);
var xhr;
if (IS_WORKER)
{
this._nextChunk = function()
{
this._readChunk();
this._chunkLoaded();
};
}
else
{
this._nextChunk = function()
{
this._readChunk();
};
}
this.stream = function(url)
{
this._input = url;
this._nextChunk(); // Starts streaming
};
this._readChunk = function()
{
if (this._finished)
{
this._chunkLoaded();
return;
}
xhr = new XMLHttpRequest();
if (!IS_WORKER)
{
xhr.onload = bindFunction(this._chunkLoaded, this);
xhr.onerror = bindFunction(this._chunkError, this);
}
xhr.open("GET", this._input, !IS_WORKER);
if (this._config.chunkSize)
{
var end = this._start + this._config.chunkSize - 1; // minus one because byte range is inclusive
xhr.setRequestHeader("Range", "bytes="+this._start+"-"+end);
xhr.setRequestHeader("If-None-Match", "webkit-no-cache"); // https://bugs.webkit.org/show_bug.cgi?id=82672
}
try {
xhr.send();
}
catch (err) {
this._chunkError(err.message);
}
if (IS_WORKER && xhr.status == 0)
this._chunkError();
else
this._start += this._config.chunkSize;
}
this._chunkLoaded = function()
{
if (xhr.readyState != 4)
return;
if (xhr.status < 200 || xhr.status >= 400)
{
this._chunkError();
return;
}
this._finished = !this._config.chunkSize || this._start > getFileSize(xhr);
this.parseChunk(xhr.responseText);
}
this._chunkError = function(errorMessage)
{
var errorText = xhr.statusText || errorMessage;
this._sendError(errorText);
}
function getFileSize(xhr)
{
var contentRange = xhr.getResponseHeader("Content-Range");
return parseInt(contentRange.substr(contentRange.lastIndexOf("/") + 1));
}
}
NetworkStreamer.prototype = Object.create(ChunkStreamer.prototype);
NetworkStreamer.prototype.constructor = NetworkStreamer;
function FileStreamer(config)
{
config = config || {};
if (!config.chunkSize)
config.chunkSize = Papa.LocalChunkSize;
ChunkStreamer.call(this, config);
var reader, slice;
// FileReader is better than FileReaderSync (even in worker) - see http://stackoverflow.com/q/24708649/1048862
// But Firefox is a pill, too - see issue #76: https://github.com/mholt/PapaParse/issues/76
var usingAsyncReader = typeof FileReader !== 'undefined'; // Safari doesn't consider it a function - see issue #105
this.stream = function(file)
{
this._input = file;
slice = file.slice || file.webkitSlice || file.mozSlice;
if (usingAsyncReader)
{
reader = new FileReader(); // Preferred method of reading files, even in workers
reader.onload = bindFunction(this._chunkLoaded, this);
reader.onerror = bindFunction(this._chunkError, this);
}
else
reader = new FileReaderSync(); // Hack for running in a web worker in Firefox
this._nextChunk(); // Starts streaming
};
this._nextChunk = function()
{
if (!this._finished && (!this._config.preview || this._rowCount < this._config.preview))
this._readChunk();
}
this._readChunk = function()
{
var input = this._input;
if (this._config.chunkSize)
{
var end = Math.min(this._start + this._config.chunkSize, this._input.size);
input = slice.call(input, this._start, end);
}
var txt = reader.readAsText(input, this._config.encoding);
if (!usingAsyncReader)
this._chunkLoaded({ target: { result: txt } }); // mimic the async signature
}
this._chunkLoaded = function(event)
{
// Very important to increment start each time before handling results
this._start += this._config.chunkSize;
this._finished = !this._config.chunkSize || this._start >= this._input.size;
this.parseChunk(event.target.result);
}
this._chunkError = function()
{
this._sendError(reader.error);
}
}
FileStreamer.prototype = Object.create(ChunkStreamer.prototype);
FileStreamer.prototype.constructor = FileStreamer;
function StringStreamer(config)
{
config = config || {};
ChunkStreamer.call(this, config);
var string;
var remaining;
this.stream = function(s)
{
string = s;
remaining = s;
return this._nextChunk();
}
this._nextChunk = function()
{
if (this._finished) return;
var size = this._config.chunkSize;
var chunk = size ? remaining.substr(0, size) : remaining;
remaining = size ? remaining.substr(size) : '';
this._finished = !remaining;
return this.parseChunk(chunk);
}
}
StringStreamer.prototype = Object.create(StringStreamer.prototype);
StringStreamer.prototype.constructor = StringStreamer;
// Use one ParserHandle per entire CSV file or string
function ParserHandle(_config)
{
// One goal is to minimize the use of regular expressions...
var FLOAT = /^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i;
var self = this;
var _stepCounter = 0; // Number of times step was called (number of rows parsed)
var _input; // The input being parsed
var _parser; // The core parser being used
var _paused = false; // Whether we are paused or not
var _aborted = false; // Whether the parser has aborted or not
var _delimiterError; // Temporary state between delimiter detection and processing results
var _fields = []; // Fields are from the header row of the input, if there is one
var _results = { // The last results returned from the parser
data: [],
errors: [],
meta: {}
};
if (isFunction(_config.step))
{
var userStep = _config.step;
_config.step = function(results)
{
_results = results;
if (needsHeaderRow())
processResults();
else // only call user's step function after header row
{
processResults();
// It's possbile that this line was empty and there's no row here after all
if (_results.data.length == 0)
return;
_stepCounter += results.data.length;
if (_config.preview && _stepCounter > _config.preview)
_parser.abort();
else
userStep(_results, self);
}
};
}
/**
* Parses input. Most users won't need, and shouldn't mess with, the baseIndex
* and ignoreLastRow parameters. They are used by streamers (wrapper functions)
* when an input comes in multiple chunks, like from a file.
*/
this.parse = function(input, baseIndex, ignoreLastRow)
{
if (!_config.newline)
_config.newline = guessLineEndings(input);
_delimiterError = false;
if (!_config.delimiter)
{
var delimGuess = guessDelimiter(input);
if (delimGuess.successful)
_config.delimiter = delimGuess.bestDelimiter;
else
{
_delimiterError = true; // add error after parsing (otherwise it would be overwritten)
_config.delimiter = Papa.DefaultDelimiter;
}
_results.meta.delimiter = _config.delimiter;
}
var parserConfig = copy(_config);
if (_config.preview && _config.header)
parserConfig.preview++; // to compensate for header row
_input = input;
_parser = new Parser(parserConfig);
_results = _parser.parse(_input, baseIndex, ignoreLastRow);
processResults();
return _paused ? { meta: { paused: true } } : (_results || { meta: { paused: false } });
};
this.paused = function()
{
return _paused;
};
this.pause = function()
{
_paused = true;
_parser.abort();
_input = _input.substr(_parser.getCharIndex());
};
this.resume = function()
{
_paused = false;
self.streamer.parseChunk(_input);
};
this.aborted = function () {
return _aborted;
}
this.abort = function()
{
_aborted = true;
_parser.abort();
_results.meta.aborted = true;
if (isFunction(_config.complete))
_config.complete(_results);
_input = "";
};
function processResults()
{
if (_results && _delimiterError)
{
addError("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '"+Papa.DefaultDelimiter+"'");
_delimiterError = false;
}
if (_config.skipEmptyLines)
{
for (var i = 0; i < _results.data.length; i++)
if (_results.data[i].length == 1 && _results.data[i][0] == "")
_results.data.splice(i--, 1);
}
if (needsHeaderRow())
fillHeaderFields();
return applyHeaderAndDynamicTyping();
}
function needsHeaderRow()
{
return _config.header && _fields.length == 0;
}
function fillHeaderFields()
{
if (!_results)
return;
for (var i = 0; needsHeaderRow() && i < _results.data.length; i++)
for (var j = 0; j < _results.data[i].length; j++)
_fields.push(_results.data[i][j]);
_results.data.splice(0, 1);
}
function applyHeaderAndDynamicTyping()
{
if (!_results || (!_config.header && !_config.dynamicTyping))
return _results;
for (var i = 0; i < _results.data.length; i++)
{
var row = {};
for (var j = 0; j < _results.data[i].length; j++)
{
if (_config.dynamicTyping)
{
var value = _results.data[i][j];
if (value == "true" || value == "TRUE")
_results.data[i][j] = true;
else if (value == "false" || value == "FALSE")
_results.data[i][j] = false;
else
_results.data[i][j] = tryParseFloat(value);
}
if (_config.header)
{
if (j >= _fields.length)
{
if (!row["__parsed_extra"])
row["__parsed_extra"] = [];
row["__parsed_extra"].push(_results.data[i][j]);
}
else
row[_fields[j]] = _results.data[i][j];
}
}
if (_config.header)
{
_results.data[i] = row;
if (j > _fields.length)
addError("FieldMismatch", "TooManyFields", "Too many fields: expected " + _fields.length + " fields but parsed " + j, i);
else if (j < _fields.length)
addError("FieldMismatch", "TooFewFields", "Too few fields: expected " + _fields.length + " fields but parsed " + j, i);
}
}
if (_config.header && _results.meta)
_results.meta.fields = _fields;
return _results;
}
function guessDelimiter(input)
{
var delimChoices = [",", "\t", "|", ";", Papa.RECORD_SEP, Papa.UNIT_SEP];
var bestDelim, bestDelta, fieldCountPrevRow;
for (var i = 0; i < delimChoices.length; i++)
{
var delim = delimChoices[i];
var delta = 0, avgFieldCount = 0;
fieldCountPrevRow = undefined;
var preview = new Parser({
delimiter: delim,
preview: 10
}).parse(input);
for (var j = 0; j < preview.data.length; j++)
{
var fieldCount = preview.data[j].length;
avgFieldCount += fieldCount;
if (typeof fieldCountPrevRow === 'undefined')
{
fieldCountPrevRow = fieldCount;
continue;
}
else if (fieldCount > 1)
{
delta += Math.abs(fieldCount - fieldCountPrevRow);
fieldCountPrevRow = fieldCount;
}
}
if (preview.data.length > 0)
avgFieldCount /= preview.data.length;
if ((typeof bestDelta === 'undefined' || delta < bestDelta)
&& avgFieldCount > 1.99)
{
bestDelta = delta;
bestDelim = delim;
}
}
_config.delimiter = bestDelim;
return {
successful: !!bestDelim,
bestDelimiter: bestDelim
}
}
function guessLineEndings(input)
{
input = input.substr(0, 1024*1024); // max length 1 MB
var r = input.split('\r');
if (r.length == 1)
return '\n';
var numWithN = 0;
for (var i = 0; i < r.length; i++)
{
if (r[i][0] == '\n')
numWithN++;
}
return numWithN >= r.length / 2 ? '\r\n' : '\r';
}
function tryParseFloat(val)
{
var isNumber = FLOAT.test(val);
return isNumber ? parseFloat(val) : val;
}
function addError(type, code, msg, row)
{
_results.errors.push({
type: type,
code: code,
message: msg,
row: row
});
}
}
/** The core parser implements speedy and correct CSV parsing */
function Parser(config)
{
// Unpack the config object
config = config || {};
var delim = config.delimiter;
var newline = config.newline;
var comments = config.comments;
var step = config.step;
var preview = config.preview;
var fastMode = config.fastMode;
// Delimiter must be valid
if (typeof delim !== 'string'
|| Papa.BAD_DELIMITERS.indexOf(delim) > -1)
delim = ",";
// Comment character must be valid
if (comments === delim)
throw "Comment character same as delimiter";
else if (comments === true)
comments = "#";
else if (typeof comments !== 'string'
|| Papa.BAD_DELIMITERS.indexOf(comments) > -1)
comments = false;
// Newline must be valid: \r, \n, or \r\n
if (newline != '\n' && newline != '\r' && newline != '\r\n')
newline = '\n';
// We're gonna need these at the Parser scope
var cursor = 0;
var aborted = false;
this.parse = function(input, baseIndex, ignoreLastRow)
{
// For some reason, in Chrome, this speeds things up (!?)
if (typeof input !== 'string')
throw "Input must be a string";
// We don't need to compute some of these every time parse() is called,
// but having them in a more local scope seems to perform better
var inputLen = input.length,
delimLen = delim.length,
newlineLen = newline.length,
commentsLen = comments.length;
var stepIsFunction = typeof step === 'function';
// Establish starting state
cursor = 0;
var data = [], errors = [], row = [], lastCursor = 0;
if (!input)
return returnable();
if (fastMode || (fastMode !== false && input.indexOf('"') === -1))
{
var rows = input.split(newline);
for (var i = 0; i < rows.length; i++)
{
var row = rows[i];
cursor += row.length;
if (i !== rows.length - 1)
cursor += newline.length;
else if (ignoreLastRow)
return returnable();
if (comments && row.substr(0, commentsLen) == comments)
continue;
if (stepIsFunction)
{
data = [];
pushRow(row.split(delim));
doStep();
if (aborted)
return returnable();
}
else
pushRow(row.split(delim));
if (preview && i >= preview)
{
data = data.slice(0, preview);
return returnable(true);
}
}
return returnable();
}
var nextDelim = input.indexOf(delim, cursor);
var nextNewline = input.indexOf(newline, cursor);
// Parser loop
for (;;)
{
// Field has opening quote
if (input[cursor] == '"')
{
// Start our search for the closing quote where the cursor is
var quoteSearch = cursor;
// Skip the opening quote
cursor++;
for (;;)
{
// Find closing quote
var quoteSearch = input.indexOf('"', quoteSearch+1);
if (quoteSearch === -1)
{
if (!ignoreLastRow) {
// No closing quote... what a pity
errors.push({
type: "Quotes",
code: "MissingQuotes",
message: "Quoted field unterminated",
row: data.length, // row has yet to be inserted
index: cursor
});
}
return finish();
}
if (quoteSearch === inputLen-1)
{
// Closing quote at EOF
var value = input.substring(cursor, quoteSearch).replace(/""/g, '"');
return finish(value);
}
// If this quote is escaped, it's part of the data; skip it
if (input[quoteSearch+1] == '"')
{
quoteSearch++;
continue;
}
if (input[quoteSearch+1] == delim)
{
// Closing quote followed by delimiter
row.push(input.substring(cursor, quoteSearch).replace(/""/g, '"'));
cursor = quoteSearch + 1 + delimLen;
nextDelim = input.indexOf(delim, cursor);
nextNewline = input.indexOf(newline, cursor);
break;
}
if (input.substr(quoteSearch+1, newlineLen) === newline)
{
// Closing quote followed by newline
row.push(input.substring(cursor, quoteSearch).replace(/""/g, '"'));
saveRow(quoteSearch + 1 + newlineLen);
nextDelim = input.indexOf(delim, cursor); // because we may have skipped the nextDelim in the quoted field
if (stepIsFunction)
{
doStep();
if (aborted)
return returnable();
}
if (preview && data.length >= preview)
return returnable(true);
break;
}
}
continue;
}
// Comment found at start of new line
if (comments && row.length === 0 && input.substr(cursor, commentsLen) === comments)
{
if (nextNewline == -1) // Comment ends at EOF
return returnable();
cursor = nextNewline + newlineLen;
nextNewline = input.indexOf(newline, cursor);
nextDelim = input.indexOf(delim, cursor);
continue;
}
// Next delimiter comes before next newline, so we've reached end of field
if (nextDelim !== -1 && (nextDelim < nextNewline || nextNewline === -1))
{
row.push(input.substring(cursor, nextDelim));
cursor = nextDelim + delimLen;
nextDelim = input.indexOf(delim, cursor);
continue;
}
// End of row
if (nextNewline !== -1)
{
row.push(input.substring(cursor, nextNewline));
saveRow(nextNewline + newlineLen);
if (stepIsFunction)
{
doStep();
if (aborted)
return returnable();
}
if (preview && data.length >= preview)
return returnable(true);
continue;
}
break;
}
return finish();
function pushRow(row)
{
data.push(row);
lastCursor = cursor;
}
/**
* Appends the remaining input from cursor to the end into
* row, saves the row, calls step, and returns the results.
*/
function finish(value)
{
if (ignoreLastRow)
return returnable();
if (typeof value === 'undefined')
value = input.substr(cursor);
row.push(value);
cursor = inputLen; // important in case parsing is paused
pushRow(row);
if (stepIsFunction)
doStep();
return returnable();
}
/**
* Appends the current row to the results. It sets the cursor
* to newCursor and finds the nextNewline. The caller should
* take care to execute user's step function and check for
* preview and end parsing if necessary.
*/
function saveRow(newCursor)
{
cursor = newCursor;
pushRow(row);
row = [];
nextNewline = input.indexOf(newline, cursor);
}
/** Returns an object with the results, errors, and meta. */
function returnable(stopped)
{
return {
data: data,
errors: errors,
meta: {
delimiter: delim,
linebreak: newline,
aborted: aborted,
truncated: !!stopped,
cursor: lastCursor + (baseIndex || 0)
}
};
}
/** Executes the user's step function and resets data & errors. */
function doStep()
{
step(returnable());
data = [], errors = [];
}
};
/** Sets the abort flag */
this.abort = function()
{
aborted = true;
};
/** Gets the cursor position */
this.getCharIndex = function()
{
return cursor;
};
}
// If you need to load Papa Parse asynchronously and you also need worker threads, hard-code
// the script path here. See: https://github.com/mholt/PapaParse/issues/87#issuecomment-57885358
function getScriptPath()
{
var scripts = document.getElementsByTagName('script');
return scripts.length ? scripts[scripts.length - 1].src : '';
}
function newWorker()
{
if (!Papa.WORKERS_SUPPORTED)
return false;
if (!LOADED_SYNC && Papa.SCRIPT_PATH === null)
throw new Error(
'Script path cannot be determined automatically when Papa Parse is loaded asynchronously. ' +
'You need to set Papa.SCRIPT_PATH manually.'
);
var workerUrl = Papa.SCRIPT_PATH || AUTO_SCRIPT_PATH;
// Append "papaworker" to the search string to tell papaparse that this is our worker.
workerUrl += (workerUrl.indexOf('?') !== -1 ? '&' : '?') + 'papaworker';
var w = new global.Worker(workerUrl);
w.onmessage = mainThreadReceivedMessage;
w.id = workerIdCounter++;
workers[w.id] = w;
return w;
}
/** Callback when main thread receives a message */
function mainThreadReceivedMessage(e)
{
var msg = e.data;
var worker = workers[msg.workerId];
var aborted = false;
if (msg.error)
worker.userError(msg.error, msg.file);
else if (msg.results && msg.results.data)
{
var abort = function() {
aborted = true;
completeWorker(msg.workerId, { data: [], errors: [], meta: { aborted: true } });
};
var handle = {
abort: abort,
pause: notImplemented,
resume: notImplemented
};
if (isFunction(worker.userStep))
{
for (var i = 0; i < msg.results.data.length; i++)
{
worker.userStep({
data: [msg.results.data[i]],
errors: msg.results.errors,
meta: msg.results.meta
}, handle);
if (aborted)
break;
}
delete msg.results; // free memory ASAP
}
else if (isFunction(worker.userChunk))
{
worker.userChunk(msg.results, handle, msg.file);
delete msg.results;
}
}
if (msg.finished && !aborted)
completeWorker(msg.workerId, msg.results);
}
function completeWorker(workerId, results) {
var worker = workers[workerId];
if (isFunction(worker.userComplete))
worker.userComplete(results);
worker.terminate();
delete workers[workerId];
}
function notImplemented() {
throw "Not implemented.";
}
/** Callback when worker thread receives a message */
function workerThreadReceivedMessage(e)
{
var msg = e.data;
if (typeof Papa.WORKER_ID === 'undefined' && msg)
Papa.WORKER_ID = msg.workerId;
if (typeof msg.input === 'string')
{
global.postMessage({
workerId: Papa.WORKER_ID,
results: Papa.parse(msg.input, msg.config),
finished: true
});
}
else if ((global.File && msg.input instanceof File) || msg.input instanceof Object) // thank you, Safari (see issue #106)
{
var results = Papa.parse(msg.input, msg.config);
if (results)
global.postMessage({
workerId: Papa.WORKER_ID,
results: results,
finished: true
});
}
}
/** Makes a deep copy of an array or object (mostly) */
function copy(obj)
{
if (typeof obj !== 'object')
return obj;
var cpy = obj instanceof Array ? [] : {};
for (var key in obj)
cpy[key] = copy(obj[key]);
return cpy;
}
function bindFunction(f, self)
{
return function() { f.apply(self, arguments); };
}
function isFunction(func)
{
return typeof func === 'function';
}
})(typeof window !== 'undefined' ? window : this);
/* FileSaver.js
* A saveAs() FileSaver implementation.
* 1.1.20151003
*
* By Eli Grey, http://eligrey.com
* License: MIT
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
*/
/*global self */
/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var saveAs = saveAs || (function(view) {
"use strict";
// IE <10 is explicitly unsupported
if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
return;
}
var
doc = view.document
// only get URL when necessary in case Blob.js hasn't overridden it yet
, get_URL = function() {
return view.URL || view.webkitURL || view;
}
, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
, can_use_save_link = "download" in save_link
, click = function(node) {
var event = new MouseEvent("click");
node.dispatchEvent(event);
}
, is_safari = /Version\/[\d\.]+.*Safari/.test(navigator.userAgent)
, webkit_req_fs = view.webkitRequestFileSystem
, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
, throw_outside = function(ex) {
(view.setImmediate || view.setTimeout)(function() {
throw ex;
}, 0);
}
, force_saveable_type = "application/octet-stream"
, fs_min_size = 0
// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and
// https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
// for the reasoning behind the timeout and revocation flow
, arbitrary_revoke_timeout = 500 // in ms
, revoke = function(file) {
var revoker = function() {
if (typeof file === "string") { // file is an object URL
get_URL().revokeObjectURL(file);
} else { // file is a File
file.remove();
}
};
if (view.chrome) {
revoker();
} else {
setTimeout(revoker, arbitrary_revoke_timeout);
}
}
, dispatch = function(filesaver, event_types, event) {
event_types = [].concat(event_types);
var i = event_types.length;
while (i--) {
var listener = filesaver["on" + event_types[i]];
if (typeof listener === "function") {
try {
listener.call(filesaver, event || filesaver);
} catch (ex) {
throw_outside(ex);
}
}
}
}
, auto_bom = function(blob) {
// prepend BOM for UTF-8 XML and text/* types (including HTML)
if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
return new Blob(["\ufeff", blob], {type: blob.type});
}
return blob;
}
, FileSaver = function(blob, name, no_auto_bom) {
if (!no_auto_bom) {
blob = auto_bom(blob);
}
// First try a.download, then web filesystem, then object URLs
var
filesaver = this
, type = blob.type
, blob_changed = false
, object_url
, target_view
, dispatch_all = function() {
dispatch(filesaver, "writestart progress write writeend".split(" "));
}
// on any filesys errors revert to saving with object URLs
, fs_error = function() {
if (target_view && is_safari && typeof FileReader !== "undefined") {
// Safari doesn't allow downloading of blob urls
var reader = new FileReader();
reader.onloadend = function() {
var base64Data = reader.result;
target_view.location.href = "data:attachment/file" + base64Data.slice(base64Data.search(/[,;]/));
filesaver.readyState = filesaver.DONE;
dispatch_all();
};
reader.readAsDataURL(blob);
filesaver.readyState = filesaver.INIT;
return;
}
// don't create more object URLs than needed
if (blob_changed || !object_url) {
object_url = get_URL().createObjectURL(blob);
}
if (target_view) {
target_view.location.href = object_url;
} else {
var new_tab = view.open(object_url, "_blank");
if (new_tab == undefined && is_safari) {
//Apple do not allow window.open, see http://bit.ly/1kZffRI
view.location.href = object_url
}
}
filesaver.readyState = filesaver.DONE;
dispatch_all();
revoke(object_url);
}
, abortable = function(func) {
return function() {
if (filesaver.readyState !== filesaver.DONE) {
return func.apply(this, arguments);
}
};
}
, create_if_not_found = {create: true, exclusive: false}
, slice
;
filesaver.readyState = filesaver.INIT;
if (!name) {
name = "download";
}
if (can_use_save_link) {
object_url = get_URL().createObjectURL(blob);
setTimeout(function() {
save_link.href = object_url;
save_link.download = name;
click(save_link);
dispatch_all();
revoke(object_url);
filesaver.readyState = filesaver.DONE;
});
return;
}
// Object and web filesystem URLs have a problem saving in Google Chrome when
// viewed in a tab, so I force save with application/octet-stream
// http://code.google.com/p/chromium/issues/detail?id=91158
// Update: Google errantly closed 91158, I submitted it again:
// https://code.google.com/p/chromium/issues/detail?id=389642
if (view.chrome && type && type !== force_saveable_type) {
slice = blob.slice || blob.webkitSlice;
blob = slice.call(blob, 0, blob.size, force_saveable_type);
blob_changed = true;
}
// Since I can't be sure that the guessed media type will trigger a download
// in WebKit, I append .download to the filename.
// https://bugs.webkit.org/show_bug.cgi?id=65440
if (webkit_req_fs && name !== "download") {
name += ".download";
}
if (type === force_saveable_type || webkit_req_fs) {
target_view = view;
}
if (!req_fs) {
fs_error();
return;
}
fs_min_size += blob.size;
req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
var save = function() {
dir.getFile(name, create_if_not_found, abortable(function(file) {
file.createWriter(abortable(function(writer) {
writer.onwriteend = function(event) {
target_view.location.href = file.toURL();
filesaver.readyState = filesaver.DONE;
dispatch(filesaver, "writeend", event);
revoke(file);
};
writer.onerror = function() {
var error = writer.error;
if (error.code !== error.ABORT_ERR) {
fs_error();
}
};
"writestart progress write abort".split(" ").forEach(function(event) {
writer["on" + event] = filesaver["on" + event];
});
writer.write(blob);
filesaver.abort = function() {
writer.abort();
filesaver.readyState = filesaver.DONE;
};
filesaver.readyState = filesaver.WRITING;
}), fs_error);
}), fs_error);
};
dir.getFile(name, {create: false}, abortable(function(file) {
// delete file if it already exists
file.remove();
save();
}), abortable(function(ex) {
if (ex.code === ex.NOT_FOUND_ERR) {
save();
} else {
fs_error();
}
}));
}), fs_error);
}), fs_error);
}
, FS_proto = FileSaver.prototype
, saveAs = function(blob, name, no_auto_bom) {
return new FileSaver(blob, name, no_auto_bom);
}
;
// IE 10+ (native saveAs)
if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) {
return function(blob, name, no_auto_bom) {
if (!no_auto_bom) {
blob = auto_bom(blob);
}
return navigator.msSaveOrOpenBlob(blob, name || "download");
};
}
FS_proto.abort = function() {
var filesaver = this;
filesaver.readyState = filesaver.DONE;
dispatch(filesaver, "abort");
};
FS_proto.readyState = FS_proto.INIT = 0;
FS_proto.WRITING = 1;
FS_proto.DONE = 2;
FS_proto.error =
FS_proto.onwritestart =
FS_proto.onprogress =
FS_proto.onwrite =
FS_proto.onabort =
FS_proto.onerror =
FS_proto.onwriteend =
null;
return saveAs;
}(
typeof self !== "undefined" && self
|| typeof window !== "undefined" && window
|| this.content
));
// `self` is undefined in Firefox for Android content script context
// while `this` is nsIContentFrameMessageManager
// with an attribute `content` that corresponds to the window
if (typeof module !== "undefined" && module.exports) {
module.exports.saveAs = saveAs;
} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
define([], function() {
return saveAs;
});
}
/*
Copyright 2011-2013 Abdulla Abdurakhmanov
Original sources are available at https://code.google.com/p/x2js/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
(function (root, factory) {
if (typeof define === "function" && define.amd) {
define([], factory);
} else if (typeof exports === "object") {
module.exports = factory();
} else {
root.X2JS = factory();
}
}(this, function () {
return function (config) {
'use strict';
var VERSION = "1.2.0";
config = config || {};
initConfigDefaults();
initRequiredPolyfills();
function initConfigDefaults() {
if(config.escapeMode === undefined) {
config.escapeMode = true;
}
config.attributePrefix = config.attributePrefix || "_";
config.arrayAccessForm = config.arrayAccessForm || "none";
config.emptyNodeForm = config.emptyNodeForm || "text";
if(config.enableToStringFunc === undefined) {
config.enableToStringFunc = true;
}
config.arrayAccessFormPaths = config.arrayAccessFormPaths || [];
if(config.skipEmptyTextNodesForObj === undefined) {
config.skipEmptyTextNodesForObj = true;
}
if(config.stripWhitespaces === undefined) {
config.stripWhitespaces = true;
}
config.datetimeAccessFormPaths = config.datetimeAccessFormPaths || [];
if(config.useDoubleQuotes === undefined) {
config.useDoubleQuotes = false;
}
config.xmlElementsFilter = config.xmlElementsFilter || [];
config.jsonPropertiesFilter = config.jsonPropertiesFilter || [];
if(config.keepCData === undefined) {
config.keepCData = false;
}
}
var DOMNodeTypes = {
ELEMENT_NODE : 1,
TEXT_NODE : 3,
CDATA_SECTION_NODE : 4,
COMMENT_NODE : 8,
DOCUMENT_NODE : 9
};
function initRequiredPolyfills() {
}
function getNodeLocalName( node ) {
var nodeLocalName = node.localName;
if(nodeLocalName == null) // Yeah, this is IE!!
nodeLocalName = node.baseName;
if(nodeLocalName == null || nodeLocalName=="") // =="" is IE too
nodeLocalName = node.nodeName;
return nodeLocalName;
}
function getNodePrefix(node) {
return node.prefix;
}
function escapeXmlChars(str) {
if(typeof(str) == "string")
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
else
return str;
}
function unescapeXmlChars(str) {
return str.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, '&');
}
function checkInStdFiltersArrayForm(stdFiltersArrayForm, obj, name, path) {
var idx = 0;
for(; idx < stdFiltersArrayForm.length; idx++) {
var filterPath = stdFiltersArrayForm[idx];
if( typeof filterPath === "string" ) {
if(filterPath == path)
break;
}
else
if( filterPath instanceof RegExp) {
if(filterPath.test(path))
break;
}
else
if( typeof filterPath === "function") {
if(filterPath(obj, name, path))
break;
}
}
return idx!=stdFiltersArrayForm.length;
}
function toArrayAccessForm(obj, childName, path) {
switch(config.arrayAccessForm) {
case "property":
if(!(obj[childName] instanceof Array))
obj[childName+"_asArray"] = [obj[childName]];
else
obj[childName+"_asArray"] = obj[childName];
break;
/*case "none":
break;*/
}
if(!(obj[childName] instanceof Array) && config.arrayAccessFormPaths.length > 0) {
if(checkInStdFiltersArrayForm(config.arrayAccessFormPaths, obj, childName, path)) {
obj[childName] = [obj[childName]];
}
}
}
function fromXmlDateTime(prop) {
// Implementation based up on http://stackoverflow.com/questions/8178598/xml-datetime-to-javascript-date-object
// Improved to support full spec and optional parts
var bits = prop.split(/[-T:+Z]/g);
var d = new Date(bits[0], bits[1]-1, bits[2]);
var secondBits = bits[5].split("\.");
d.setHours(bits[3], bits[4], secondBits[0]);
if(secondBits.length>1)
d.setMilliseconds(secondBits[1]);
// Get supplied time zone offset in minutes
if(bits[6] && bits[7]) {
var offsetMinutes = bits[6] * 60 + Number(bits[7]);
var sign = /\d\d-\d\d:\d\d$/.test(prop)? '-' : '+';
// Apply the sign
offsetMinutes = 0 + (sign == '-'? -1 * offsetMinutes : offsetMinutes);
// Apply offset and local timezone
d.setMinutes(d.getMinutes() - offsetMinutes - d.getTimezoneOffset())
}
else
if(prop.indexOf("Z", prop.length - 1) !== -1) {
d = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()));
}
// d is now a local time equivalent to the supplied time
return d;
}
function checkFromXmlDateTimePaths(value, childName, fullPath) {
if(config.datetimeAccessFormPaths.length > 0) {
var path = fullPath.split("\.#")[0];
if(checkInStdFiltersArrayForm(config.datetimeAccessFormPaths, value, childName, path)) {
return fromXmlDateTime(value);
}
else
return value;
}
else
return value;
}
function checkXmlElementsFilter(obj, childType, childName, childPath) {
if( childType == DOMNodeTypes.ELEMENT_NODE && config.xmlElementsFilter.length > 0) {
return checkInStdFiltersArrayForm(config.xmlElementsFilter, obj, childName, childPath);
}
else
return true;
}
function parseDOMChildren( node, path ) {
if(node.nodeType == DOMNodeTypes.DOCUMENT_NODE) {
var result = new Object;
var nodeChildren = node.childNodes;
// Alternative for firstElementChild which is not supported in some environments
for(var cidx=0; cidx <nodeChildren.length; cidx++) {
var child = nodeChildren.item(cidx);
if(child.nodeType == DOMNodeTypes.ELEMENT_NODE) {
var childName = getNodeLocalName(child);
result[childName] = parseDOMChildren(child, childName);
}
}
return result;
}
else
if(node.nodeType == DOMNodeTypes.ELEMENT_NODE) {
var result = new Object;
result.__cnt=0;
var nodeChildren = node.childNodes;
// Children nodes
for(var cidx=0; cidx <nodeChildren.length; cidx++) {
var child = nodeChildren.item(cidx); // nodeChildren[cidx];
var childName = getNodeLocalName(child);
if(child.nodeType!= DOMNodeTypes.COMMENT_NODE) {
var childPath = path+"."+childName;
if (checkXmlElementsFilter(result,child.nodeType,childName,childPath)) {
result.__cnt++;
if(result[childName] == null) {
result[childName] = parseDOMChildren(child, childPath);
toArrayAccessForm(result, childName, childPath);
}
else {
if(result[childName] != null) {
if( !(result[childName] instanceof Array)) {
result[childName] = [result[childName]];
toArrayAccessForm(result, childName, childPath);
}
}
(result[childName])[result[childName].length] = parseDOMChildren(child, childPath);
}
}
}
}
// Attributes
for(var aidx=0; aidx <node.attributes.length; aidx++) {
var attr = node.attributes.item(aidx); // [aidx];
result.__cnt++;
result[config.attributePrefix+attr.name]=attr.value;
}
// Node namespace prefix
var nodePrefix = getNodePrefix(node);
if(nodePrefix!=null && nodePrefix!="") {
result.__cnt++;
result.__prefix=nodePrefix;
}
if(result["#text"]!=null) {
result.__text = result["#text"];
if(result.__text instanceof Array) {
result.__text = result.__text.join("\n");
}
//if(config.escapeMode)
// result.__text = unescapeXmlChars(result.__text);
if(config.stripWhitespaces)
result.__text = result.__text.trim();
delete result["#text"];
if(config.arrayAccessForm=="property")
delete result["#text_asArray"];
result.__text = checkFromXmlDateTimePaths(result.__text, childName, path+"."+childName);
}
if(result["#cdata-section"]!=null) {
result.__cdata = result["#cdata-section"];
delete result["#cdata-section"];
if(config.arrayAccessForm=="property")
delete result["#cdata-section_asArray"];
}
if( result.__cnt == 0 && config.emptyNodeForm=="text" ) {
result = '';
}
else
if( result.__cnt == 1 && result.__text!=null ) {
result = result.__text;
}
else
if( result.__cnt == 1 && result.__cdata!=null && !config.keepCData ) {
result = result.__cdata;
}
else
if ( result.__cnt > 1 && result.__text!=null && config.skipEmptyTextNodesForObj) {
if( (config.stripWhitespaces && result.__text=="") || (result.__text.trim()=="")) {
delete result.__text;
}
}
delete result.__cnt;
if( config.enableToStringFunc && (result.__text!=null || result.__cdata!=null )) {
result.toString = function() {
return (this.__text!=null? this.__text:'')+( this.__cdata!=null ? this.__cdata:'');
};
}
return result;
}
else
if(node.nodeType == DOMNodeTypes.TEXT_NODE || node.nodeType == DOMNodeTypes.CDATA_SECTION_NODE) {
return node.nodeValue;
}
}
function startTag(jsonObj, element, attrList, closed) {
var resultStr = "<"+ ( (jsonObj!=null && jsonObj.__prefix!=null)? (jsonObj.__prefix+":"):"") + element;
if(attrList!=null) {
for(var aidx = 0; aidx < attrList.length; aidx++) {
var attrName = attrList[aidx];
var attrVal = jsonObj[attrName];
if(config.escapeMode)
attrVal=escapeXmlChars(attrVal);
resultStr+=" "+attrName.substr(config.attributePrefix.length)+"=";
if(config.useDoubleQuotes)
resultStr+='"'+attrVal+'"';
else
resultStr+="'"+attrVal+"'";
}
}
if(!closed)
resultStr+=">";
else
resultStr+="/>";
return resultStr;
}
function endTag(jsonObj,elementName) {
return "</"+ (jsonObj.__prefix!=null? (jsonObj.__prefix+":"):"")+elementName+">";
}
function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
function jsonXmlSpecialElem ( jsonObj, jsonObjField ) {
if((config.arrayAccessForm=="property" && endsWith(jsonObjField.toString(),("_asArray")))
|| jsonObjField.toString().indexOf(config.attributePrefix)==0
|| jsonObjField.toString().indexOf("__")==0
|| (jsonObj[jsonObjField] instanceof Function) )
return true;
else
return false;
}
function jsonXmlElemCount ( jsonObj ) {
var elementsCnt = 0;
if(jsonObj instanceof Object ) {
for( var it in jsonObj ) {
if(jsonXmlSpecialElem ( jsonObj, it) )
continue;
elementsCnt++;
}
}
return elementsCnt;
}
function checkJsonObjPropertiesFilter(jsonObj, propertyName, jsonObjPath) {
return config.jsonPropertiesFilter.length == 0
|| jsonObjPath==""
|| checkInStdFiltersArrayForm(config.jsonPropertiesFilter, jsonObj, propertyName, jsonObjPath);
}
function parseJSONAttributes ( jsonObj ) {
var attrList = [];
if(jsonObj instanceof Object ) {
for( var ait in jsonObj ) {
if(ait.toString().indexOf("__")== -1 && ait.toString().indexOf(config.attributePrefix)==0) {
attrList.push(ait);
}
}
}
return attrList;
}
function parseJSONTextAttrs ( jsonTxtObj ) {
var result ="";
if(jsonTxtObj.__cdata!=null) {
result+="<![CDATA["+jsonTxtObj.__cdata+"]]>";
}
if(jsonTxtObj.__text!=null) {
if(config.escapeMode)
result+=escapeXmlChars(jsonTxtObj.__text);
else
result+=jsonTxtObj.__text;
}
return result;
}
function parseJSONTextObject ( jsonTxtObj ) {
var result ="";
if( jsonTxtObj instanceof Object ) {
result+=parseJSONTextAttrs ( jsonTxtObj );
}
else
if(jsonTxtObj!=null) {
if(config.escapeMode)
result+=escapeXmlChars(jsonTxtObj);
else
result+=jsonTxtObj;
}
return result;
}
function getJsonPropertyPath(jsonObjPath, jsonPropName) {
if (jsonObjPath==="") {
return jsonPropName;
}
else
return jsonObjPath+"."+jsonPropName;
}
function parseJSONArray ( jsonArrRoot, jsonArrObj, attrList, jsonObjPath ) {
var result = "";
if(jsonArrRoot.length == 0) {
result+=startTag(jsonArrRoot, jsonArrObj, attrList, true);
}
else {
for(var arIdx = 0; arIdx < jsonArrRoot.length; arIdx++) {
result+=startTag(jsonArrRoot[arIdx], jsonArrObj, parseJSONAttributes(jsonArrRoot[arIdx]), false);
result+=parseJSONObject(jsonArrRoot[arIdx], getJsonPropertyPath(jsonObjPath,jsonArrObj));
result+=endTag(jsonArrRoot[arIdx],jsonArrObj);
}
}
return result;
}
function parseJSONObject ( jsonObj, jsonObjPath ) {
var result = "";
var elementsCnt = jsonXmlElemCount ( jsonObj );
if(elementsCnt > 0) {
for( var it in jsonObj ) {
if(jsonXmlSpecialElem ( jsonObj, it) || (jsonObjPath!="" && !checkJsonObjPropertiesFilter(jsonObj, it, getJsonPropertyPath(jsonObjPath,it))) )
continue;
var subObj = jsonObj[it];
var attrList = parseJSONAttributes( subObj )
if(subObj == null || subObj == undefined) {
result+=startTag(subObj, it, attrList, true);
}
else
if(subObj instanceof Object) {
if(subObj instanceof Array) {
result+=parseJSONArray( subObj, it, attrList, jsonObjPath );
}
else if(subObj instanceof Date) {
result+=startTag(subObj, it, attrList, false);
result+=subObj.toISOString();
result+=endTag(subObj,it);
}
else {
var subObjElementsCnt = jsonXmlElemCount ( subObj );
if(subObjElementsCnt > 0 || subObj.__text!=null || subObj.__cdata!=null) {
result+=startTag(subObj, it, attrList, false);
result+=parseJSONObject(subObj, getJsonPropertyPath(jsonObjPath,it));
result+=endTag(subObj,it);
}
else {
result+=startTag(subObj, it, attrList, true);
}
}
}
else {
result+=startTag(subObj, it, attrList, false);
result+=parseJSONTextObject(subObj);
result+=endTag(subObj,it);
}
}
}
result+=parseJSONTextObject(jsonObj);
return result;
}
this.parseXmlString = function(xmlDocStr) {
var isIEParser = window.ActiveXObject || "ActiveXObject" in window;
if (xmlDocStr === undefined) {
return null;
}
var xmlDoc;
if (window.DOMParser) {
var parser=new window.DOMParser();
var parsererrorNS = null;
// IE9+ now is here
if(!isIEParser) {
try {
parsererrorNS = parser.parseFromString("INVALID", "text/xml").getElementsByTagName("parsererror")[0].namespaceURI;
}
catch(err) {
parsererrorNS = null;
}
}
try {
xmlDoc = parser.parseFromString( xmlDocStr, "text/xml" );
if( parsererrorNS!= null && xmlDoc.getElementsByTagNameNS(parsererrorNS, "parsererror").length > 0) {
//throw new Error('Error parsing XML: '+xmlDocStr);
xmlDoc = null;
}
}
catch(err) {
xmlDoc = null;
}
}
else {
// IE :(
if(xmlDocStr.indexOf("<?")==0) {
xmlDocStr = xmlDocStr.substr( xmlDocStr.indexOf("?>") + 2 );
}
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async="false";
xmlDoc.loadXML(xmlDocStr);
}
return xmlDoc;
};
this.asArray = function(prop) {
if (prop === undefined || prop == null)
return [];
else
if(prop instanceof Array)
return prop;
else
return [prop];
};
this.toXmlDateTime = function(dt) {
if(dt instanceof Date)
return dt.toISOString();
else
if(typeof(dt) === 'number' )
return new Date(dt).toISOString();
else
return null;
};
this.asDateTime = function(prop) {
if(typeof(prop) == "string") {
return fromXmlDateTime(prop);
}
else
return prop;
};
this.xml2json = function (xmlDoc) {
return parseDOMChildren ( xmlDoc );
};
this.xml_str2json = function (xmlDocStr) {
var xmlDoc = this.parseXmlString(xmlDocStr);
if(xmlDoc!=null)
return this.xml2json(xmlDoc);
else
return null;
};
this.json2xml_str = function (jsonObj) {
return parseJSONObject ( jsonObj, "" );
};
this.json2xml = function (jsonObj) {
var xmlDocStr = this.json2xml_str (jsonObj);
return this.parseXmlString(xmlDocStr);
};
this.getVersion = function () {
return VERSION;
};
}
}))/*
* base64-arraybuffer
* https://github.com/niklasvh/base64-arraybuffer
*
* Copyright (c) 2012 Niklas von Hertzen
* Licensed under the MIT license.
*/
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
// Use a lookup table to find the index.
var lookup = new Uint8Array(256);
for (var i = 0; i < chars.length; i++) {
lookup[chars.charCodeAt(i)] = i;
}
if (base64 === undefined)
var base64 = {};
base64.encode = function(arraybuffer) {
var bytes = new Uint8Array(arraybuffer),
i, len = bytes.length, base64 = "";
for (i = 0; i < len; i+=3) {
base64 += chars[bytes[i] >> 2];
base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];
base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];
base64 += chars[bytes[i + 2] & 63];
}
if ((len % 3) === 2) {
base64 = base64.substring(0, base64.length - 1) + "=";
} else if (len % 3 === 1) {
base64 = base64.substring(0, base64.length - 2) + "==";
}
return base64;
};
base64.decode = function(base64) {
var bufferLength = base64.length * 0.75,
len = base64.length, i, p = 0,
encoded1, encoded2, encoded3, encoded4;
if (base64[base64.length - 1] === "=") {
bufferLength--;
if (base64[base64.length - 2] === "=") {
bufferLength--;
}
}
var arraybuffer = new ArrayBuffer(bufferLength),
bytes = new Uint8Array(arraybuffer);
for (i = 0; i < len; i+=4) {
encoded1 = lookup[base64.charCodeAt(i)];
encoded2 = lookup[base64.charCodeAt(i+1)];
encoded3 = lookup[base64.charCodeAt(i+2)];
encoded4 = lookup[base64.charCodeAt(i+3)];
bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);
bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);
bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);
}
return arraybuffer;
};
// This is free and unencumbered software released into the public domain.
// See LICENSE.md for more information.
/**
* @fileoverview Global |this| required for resolving indexes in node.
* @suppress {globalThis}
*/
(function(global) {
'use strict';
// If we're in node require encoding-indexes and attach it to the global.
if (typeof module !== "undefined" && module.exports &&
!global["encoding-indexes"]) {
global["encoding-indexes"] =
require("./encoding-indexes.js")["encoding-indexes"];
}
//
// Utilities
//
/**
* @param {number} a The number to test.
* @param {number} min The minimum value in the range, inclusive.
* @param {number} max The maximum value in the range, inclusive.
* @return {boolean} True if a >= min and a <= max.
*/
function inRange(a, min, max) {
return min <= a && a <= max;
}
/**
* @param {!Array.<*>} array The array to check.
* @param {*} item The item to look for in the array.
* @return {boolean} True if the item appears in the array.
*/
function includes(array, item) {
return array.indexOf(item) !== -1;
}
var floor = Math.floor;
/**
* @param {*} o
* @return {Object}
*/
function ToDictionary(o) {
if (o === undefined) return {};
if (o === Object(o)) return o;
throw TypeError('Could not convert argument to dictionary');
}
/**
* @param {string} string Input string of UTF-16 code units.
* @return {!Array.<number>} Code points.
*/
function stringToCodePoints(string) {
// https://heycam.github.io/webidl/#dfn-obtain-unicode
// 1. Let S be the DOMString value.
var s = String(string);
// 2. Let n be the length of S.
var n = s.length;
// 3. Initialize i to 0.
var i = 0;
// 4. Initialize U to be an empty sequence of Unicode characters.
var u = [];
// 5. While i < n:
while (i < n) {
// 1. Let c be the code unit in S at index i.
var c = s.charCodeAt(i);
// 2. Depending on the value of c:
// c < 0xD800 or c > 0xDFFF
if (c < 0xD800 || c > 0xDFFF) {
// Append to U the Unicode character with code point c.
u.push(c);
}
// 0xDC00 ≤ c ≤ 0xDFFF
else if (0xDC00 <= c && c <= 0xDFFF) {
// Append to U a U+FFFD REPLACEMENT CHARACTER.
u.push(0xFFFD);
}
// 0xD800 ≤ c ≤ 0xDBFF
else if (0xD800 <= c && c <= 0xDBFF) {
// 1. If i = n−1, then append to U a U+FFFD REPLACEMENT
// CHARACTER.
if (i === n - 1) {
u.push(0xFFFD);
}
// 2. Otherwise, i < n−1:
else {
// 1. Let d be the code unit in S at index i+1.
var d = s.charCodeAt(i + 1);
// 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:
if (0xDC00 <= d && d <= 0xDFFF) {
// 1. Let a be c & 0x3FF.
var a = c & 0x3FF;
// 2. Let b be d & 0x3FF.
var b = d & 0x3FF;
// 3. Append to U the Unicode character with code point
// 2^16+2^10*a+b.
u.push(0x10000 + (a << 10) + b);
// 4. Set i to i+1.
i += 1;
}
// 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a
// U+FFFD REPLACEMENT CHARACTER.
else {
u.push(0xFFFD);
}
}
}
// 3. Set i to i+1.
i += 1;
}
// 6. Return U.
return u;
}
/**
* @param {!Array.<number>} code_points Array of code points.
* @return {string} string String of UTF-16 code units.
*/
function codePointsToString(code_points) {
var s = '';
for (var i = 0; i < code_points.length; ++i) {
var cp = code_points[i];
if (cp <= 0xFFFF) {
s += String.fromCharCode(cp);
} else {
cp -= 0x10000;
s += String.fromCharCode((cp >> 10) + 0xD800,
(cp & 0x3FF) + 0xDC00);
}
}
return s;
}
//
// Implementation of Encoding specification
// https://encoding.spec.whatwg.org/
//
//
// 4. Terminology
//
/**
* An ASCII byte is a byte in the range 0x00 to 0x7F, inclusive.
* @param {number} a The number to test.
* @return {boolean} True if a is in the range 0x00 to 0x7F, inclusive.
*/
function isASCIIByte(a) {
return 0x00 <= a && a <= 0x7F;
}
/**
* An ASCII code point is a code point in the range U+0000 to
* U+007F, inclusive.
*/
var isASCIICodePoint = isASCIIByte;
/**
* End-of-stream is a special token that signifies no more tokens
* are in the stream.
* @const
*/ var end_of_stream = -1;
/**
* A stream represents an ordered sequence of tokens.
*
* @constructor
* @param {!(Array.<number>|Uint8Array)} tokens Array of tokens that provide
* the stream.
*/
function Stream(tokens) {
/** @type {!Array.<number>} */
this.tokens = [].slice.call(tokens);
// Reversed as push/pop is more efficient than shift/unshift.
this.tokens.reverse();
}
Stream.prototype = {
/**
* @return {boolean} True if end-of-stream has been hit.
*/
endOfStream: function() {
return !this.tokens.length;
},
/**
* When a token is read from a stream, the first token in the
* stream must be returned and subsequently removed, and
* end-of-stream must be returned otherwise.
*
* @return {number} Get the next token from the stream, or
* end_of_stream.
*/
read: function() {
if (!this.tokens.length)
return end_of_stream;
return this.tokens.pop();
},
/**
* When one or more tokens are prepended to a stream, those tokens
* must be inserted, in given order, before the first token in the
* stream.
*
* @param {(number|!Array.<number>)} token The token(s) to prepend to the
* stream.
*/
prepend: function(token) {
if (Array.isArray(token)) {
var tokens = /**@type {!Array.<number>}*/(token);
while (tokens.length)
this.tokens.push(tokens.pop());
} else {
this.tokens.push(token);
}
},
/**
* When one or more tokens are pushed to a stream, those tokens
* must be inserted, in given order, after the last token in the
* stream.
*
* @param {(number|!Array.<number>)} token The tokens(s) to push to the
* stream.
*/
push: function(token) {
if (Array.isArray(token)) {
var tokens = /**@type {!Array.<number>}*/(token);
while (tokens.length)
this.tokens.unshift(tokens.shift());
} else {
this.tokens.unshift(token);
}
}
};
//
// 5. Encodings
//
// 5.1 Encoders and decoders
/** @const */
var finished = -1;
/**
* @param {boolean} fatal If true, decoding errors raise an exception.
* @param {number=} opt_code_point Override the standard fallback code point.
* @return {number} The code point to insert on a decoding error.
*/
function decoderError(fatal, opt_code_point) {
if (fatal)
throw TypeError('Decoder error');
return opt_code_point || 0xFFFD;
}
/**
* @param {number} code_point The code point that could not be encoded.
* @return {number} Always throws, no value is actually returned.
*/
function encoderError(code_point) {
throw TypeError('The code point ' + code_point + ' could not be encoded.');
}
/** @interface */
function Decoder() {}
Decoder.prototype = {
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point, or |finished|.
*/
handler: function(stream, bite) {}
};
/** @interface */
function Encoder() {}
Encoder.prototype = {
/**
* @param {Stream} stream The stream of code points being encoded.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit, or |finished|.
*/
handler: function(stream, code_point) {}
};
// 5.2 Names and labels
// TODO: Define @typedef for Encoding: {name:string,labels:Array.<string>}
// https://github.com/google/closure-compiler/issues/247
/**
* @param {string} label The encoding label.
* @return {?{name:string,labels:Array.<string>}}
*/
function getEncoding(label) {
// 1. Remove any leading and trailing ASCII whitespace from label.
label = String(label).trim().toLowerCase();
// 2. If label is an ASCII case-insensitive match for any of the
// labels listed in the table below, return the corresponding
// encoding, and failure otherwise.
if (Object.prototype.hasOwnProperty.call(label_to_encoding, label)) {
return label_to_encoding[label];
}
return null;
}
/**
* Encodings table: https://encoding.spec.whatwg.org/encodings.json
* @const
* @type {!Array.<{
* heading: string,
* encodings: Array.<{name:string,labels:Array.<string>}>
* }>}
*/
var encodings = [
{
"encodings": [
{
"labels": [
"unicode-1-1-utf-8",
"utf-8",
"utf8"
],
"name": "UTF-8"
}
],
"heading": "The Encoding"
},
{
"encodings": [
{
"labels": [
"866",
"cp866",
"csibm866",
"ibm866"
],
"name": "IBM866"
},
{
"labels": [
"csisolatin2",
"iso-8859-2",
"iso-ir-101",
"iso8859-2",
"iso88592",
"iso_8859-2",
"iso_8859-2:1987",
"l2",
"latin2"
],
"name": "ISO-8859-2"
},
{
"labels": [
"csisolatin3",
"iso-8859-3",
"iso-ir-109",
"iso8859-3",
"iso88593",
"iso_8859-3",
"iso_8859-3:1988",
"l3",
"latin3"
],
"name": "ISO-8859-3"
},
{
"labels": [
"csisolatin4",
"iso-8859-4",
"iso-ir-110",
"iso8859-4",
"iso88594",
"iso_8859-4",
"iso_8859-4:1988",
"l4",
"latin4"
],
"name": "ISO-8859-4"
},
{
"labels": [
"csisolatincyrillic",
"cyrillic",
"iso-8859-5",
"iso-ir-144",
"iso8859-5",
"iso88595",
"iso_8859-5",
"iso_8859-5:1988"
],
"name": "ISO-8859-5"
},
{
"labels": [
"arabic",
"asmo-708",
"csiso88596e",
"csiso88596i",
"csisolatinarabic",
"ecma-114",
"iso-8859-6",
"iso-8859-6-e",
"iso-8859-6-i",
"iso-ir-127",
"iso8859-6",
"iso88596",
"iso_8859-6",
"iso_8859-6:1987"
],
"name": "ISO-8859-6"
},
{
"labels": [
"csisolatingreek",
"ecma-118",
"elot_928",
"greek",
"greek8",
"iso-8859-7",
"iso-ir-126",
"iso8859-7",
"iso88597",
"iso_8859-7",
"iso_8859-7:1987",
"sun_eu_greek"
],
"name": "ISO-8859-7"
},
{
"labels": [
"csiso88598e",
"csisolatinhebrew",
"hebrew",
"iso-8859-8",
"iso-8859-8-e",
"iso-ir-138",
"iso8859-8",
"iso88598",
"iso_8859-8",
"iso_8859-8:1988",
"visual"
],
"name": "ISO-8859-8"
},
{
"labels": [
"csiso88598i",
"iso-8859-8-i",
"logical"
],
"name": "ISO-8859-8-I"
},
{
"labels": [
"csisolatin6",
"iso-8859-10",
"iso-ir-157",
"iso8859-10",
"iso885910",
"l6",
"latin6"
],
"name": "ISO-8859-10"
},
{
"labels": [
"iso-8859-13",
"iso8859-13",
"iso885913"
],
"name": "ISO-8859-13"
},
{
"labels": [
"iso-8859-14",
"iso8859-14",
"iso885914"
],
"name": "ISO-8859-14"
},
{
"labels": [
"csisolatin9",
"iso-8859-15",
"iso8859-15",
"iso885915",
"iso_8859-15",
"l9"
],
"name": "ISO-8859-15"
},
{
"labels": [
"iso-8859-16"
],
"name": "ISO-8859-16"
},
{
"labels": [
"cskoi8r",
"koi",
"koi8",
"koi8-r",
"koi8_r"
],
"name": "KOI8-R"
},
{
"labels": [
"koi8-ru",
"koi8-u"
],
"name": "KOI8-U"
},
{
"labels": [
"csmacintosh",
"mac",
"macintosh",
"x-mac-roman"
],
"name": "macintosh"
},
{
"labels": [
"dos-874",
"iso-8859-11",
"iso8859-11",
"iso885911",
"tis-620",
"windows-874"
],
"name": "windows-874"
},
{
"labels": [
"cp1250",
"windows-1250",
"x-cp1250"
],
"name": "windows-1250"
},
{
"labels": [
"cp1251",
"windows-1251",
"x-cp1251"
],
"name": "windows-1251"
},
{
"labels": [
"ansi_x3.4-1968",
"ascii",
"cp1252",
"cp819",
"csisolatin1",
"ibm819",
"iso-8859-1",
"iso-ir-100",
"iso8859-1",
"iso88591",
"iso_8859-1",
"iso_8859-1:1987",
"l1",
"latin1",
"us-ascii",
"windows-1252",
"x-cp1252"
],
"name": "windows-1252"
},
{
"labels": [
"cp1253",
"windows-1253",
"x-cp1253"
],
"name": "windows-1253"
},
{
"labels": [
"cp1254",
"csisolatin5",
"iso-8859-9",
"iso-ir-148",
"iso8859-9",
"iso88599",
"iso_8859-9",
"iso_8859-9:1989",
"l5",
"latin5",
"windows-1254",
"x-cp1254"
],
"name": "windows-1254"
},
{
"labels": [
"cp1255",
"windows-1255",
"x-cp1255"
],
"name": "windows-1255"
},
{
"labels": [
"cp1256",
"windows-1256",
"x-cp1256"
],
"name": "windows-1256"
},
{
"labels": [
"cp1257",
"windows-1257",
"x-cp1257"
],
"name": "windows-1257"
},
{
"labels": [
"cp1258",
"windows-1258",
"x-cp1258"
],
"name": "windows-1258"
},
{
"labels": [
"x-mac-cyrillic",
"x-mac-ukrainian"
],
"name": "x-mac-cyrillic"
}
],
"heading": "Legacy single-byte encodings"
},
{
"encodings": [
{
"labels": [
"chinese",
"csgb2312",
"csiso58gb231280",
"gb2312",
"gb_2312",
"gb_2312-80",
"gbk",
"iso-ir-58",
"x-gbk"
],
"name": "GBK"
},
{
"labels": [
"gb18030"
],
"name": "gb18030"
}
],
"heading": "Legacy multi-byte Chinese (simplified) encodings"
},
{
"encodings": [
{
"labels": [
"big5",
"big5-hkscs",
"cn-big5",
"csbig5",
"x-x-big5"
],
"name": "Big5"
}
],
"heading": "Legacy multi-byte Chinese (traditional) encodings"
},
{
"encodings": [
{
"labels": [
"cseucpkdfmtjapanese",
"euc-jp",
"x-euc-jp"
],
"name": "EUC-JP"
},
{
"labels": [
"csiso2022jp",
"iso-2022-jp"
],
"name": "ISO-2022-JP"
},
{
"labels": [
"csshiftjis",
"ms932",
"ms_kanji",
"shift-jis",
"shift_jis",
"sjis",
"windows-31j",
"x-sjis"
],
"name": "Shift_JIS"
}
],
"heading": "Legacy multi-byte Japanese encodings"
},
{
"encodings": [
{
"labels": [
"cseuckr",
"csksc56011987",
"euc-kr",
"iso-ir-149",
"korean",
"ks_c_5601-1987",
"ks_c_5601-1989",
"ksc5601",
"ksc_5601",
"windows-949"
],
"name": "EUC-KR"
}
],
"heading": "Legacy multi-byte Korean encodings"
},
{
"encodings": [
{
"labels": [
"csiso2022kr",
"hz-gb-2312",
"iso-2022-cn",
"iso-2022-cn-ext",
"iso-2022-kr"
],
"name": "replacement"
},
{
"labels": [
"utf-16be"
],
"name": "UTF-16BE"
},
{
"labels": [
"utf-16",
"utf-16le"
],
"name": "UTF-16LE"
},
{
"labels": [
"x-user-defined"
],
"name": "x-user-defined"
}
],
"heading": "Legacy miscellaneous encodings"
}
];
// Label to encoding registry.
/** @type {Object.<string,{name:string,labels:Array.<string>}>} */
var label_to_encoding = {};
encodings.forEach(function(category) {
category.encodings.forEach(function(encoding) {
encoding.labels.forEach(function(label) {
label_to_encoding[label] = encoding;
});
});
});
// Registry of of encoder/decoder factories, by encoding name.
/** @type {Object.<string, function({fatal:boolean}): Encoder>} */
var encoders = {};
/** @type {Object.<string, function({fatal:boolean}): Decoder>} */
var decoders = {};
//
// 6. Indexes
//
/**
* @param {number} pointer The |pointer| to search for.
* @param {(!Array.<?number>|undefined)} index The |index| to search within.
* @return {?number} The code point corresponding to |pointer| in |index|,
* or null if |code point| is not in |index|.
*/
function indexCodePointFor(pointer, index) {
if (!index) return null;
return index[pointer] || null;
}
/**
* @param {number} code_point The |code point| to search for.
* @param {!Array.<?number>} index The |index| to search within.
* @return {?number} The first pointer corresponding to |code point| in
* |index|, or null if |code point| is not in |index|.
*/
function indexPointerFor(code_point, index) {
var pointer = index.indexOf(code_point);
return pointer === -1 ? null : pointer;
}
/**
* @param {string} name Name of the index.
* @return {(!Array.<number>|!Array.<Array.<number>>)}
* */
function index(name) {
if (!('encoding-indexes' in global)) {
throw Error("Indexes missing." +
" Did you forget to include encoding-indexes.js first?");
}
return global['encoding-indexes'][name];
}
/**
* @param {number} pointer The |pointer| to search for in the gb18030 index.
* @return {?number} The code point corresponding to |pointer| in |index|,
* or null if |code point| is not in the gb18030 index.
*/
function indexGB18030RangesCodePointFor(pointer) {
// 1. If pointer is greater than 39419 and less than 189000, or
// pointer is greater than 1237575, return null.
if ((pointer > 39419 && pointer < 189000) || (pointer > 1237575))
return null;
// 2. If pointer is 7457, return code point U+E7C7.
if (pointer === 7457) return 0xE7C7;
// 3. Let offset be the last pointer in index gb18030 ranges that
// is equal to or less than pointer and let code point offset be
// its corresponding code point.
var offset = 0;
var code_point_offset = 0;
var idx = index('gb18030-ranges');
var i;
for (i = 0; i < idx.length; ++i) {
/** @type {!Array.<number>} */
var entry = idx[i];
if (entry[0] <= pointer) {
offset = entry[0];
code_point_offset = entry[1];
} else {
break;
}
}
// 4. Return a code point whose value is code point offset +
// pointer − offset.
return code_point_offset + pointer - offset;
}
/**
* @param {number} code_point The |code point| to locate in the gb18030 index.
* @return {number} The first pointer corresponding to |code point| in the
* gb18030 index.
*/
function indexGB18030RangesPointerFor(code_point) {
// 1. If code point is U+E7C7, return pointer 7457.
if (code_point === 0xE7C7) return 7457;
// 2. Let offset be the last code point in index gb18030 ranges
// that is equal to or less than code point and let pointer offset
// be its corresponding pointer.
var offset = 0;
var pointer_offset = 0;
var idx = index('gb18030-ranges');
var i;
for (i = 0; i < idx.length; ++i) {
/** @type {!Array.<number>} */
var entry = idx[i];
if (entry[1] <= code_point) {
offset = entry[1];
pointer_offset = entry[0];
} else {
break;
}
}
// 3. Return a pointer whose value is pointer offset + code point
// − offset.
return pointer_offset + code_point - offset;
}
/**
* @param {number} code_point The |code_point| to search for in the Shift_JIS
* index.
* @return {?number} The code point corresponding to |pointer| in |index|,
* or null if |code point| is not in the Shift_JIS index.
*/
function indexShiftJISPointerFor(code_point) {
// 1. Let index be index jis0208 excluding all entries whose
// pointer is in the range 8272 to 8835, inclusive.
shift_jis_index = shift_jis_index ||
index('jis0208').map(function(code_point, pointer) {
return inRange(pointer, 8272, 8835) ? null : code_point;
});
var index_ = shift_jis_index;
// 2. Return the index pointer for code point in index.
return index_.indexOf(code_point);
}
var shift_jis_index;
/**
* @param {number} code_point The |code_point| to search for in the big5
* index.
* @return {?number} The code point corresponding to |pointer| in |index|,
* or null if |code point| is not in the big5 index.
*/
function indexBig5PointerFor(code_point) {
// 1. Let index be index Big5 excluding all entries whose pointer
big5_index_no_hkscs = big5_index_no_hkscs ||
index('big5').map(function(code_point, pointer) {
return (pointer < (0xA1 - 0x81) * 157) ? null : code_point;
});
var index_ = big5_index_no_hkscs;
// 2. If code point is U+2550, U+255E, U+2561, U+256A, U+5341, or
// U+5345, return the last pointer corresponding to code point in
// index.
if (code_point === 0x2550 || code_point === 0x255E ||
code_point === 0x2561 || code_point === 0x256A ||
code_point === 0x5341 || code_point === 0x5345) {
return index_.lastIndexOf(code_point);
}
// 3. Return the index pointer for code point in index.
return indexPointerFor(code_point, index_);
}
var big5_index_no_hkscs;
//
// 8. API
//
/** @const */ var DEFAULT_ENCODING = 'utf-8';
// 8.1 Interface TextDecoder
/**
* @constructor
* @param {string=} label The label of the encoding;
* defaults to 'utf-8'.
* @param {Object=} options
*/
function TextDecoder(label, options) {
// Web IDL conventions
if (!(this instanceof TextDecoder))
throw TypeError('Called as a function. Did you forget \'new\'?');
label = label !== undefined ? String(label) : DEFAULT_ENCODING;
options = ToDictionary(options);
// A TextDecoder object has an associated encoding, decoder,
// stream, ignore BOM flag (initially unset), BOM seen flag
// (initially unset), error mode (initially replacement), and do
// not flush flag (initially unset).
/** @private */
this._encoding = null;
/** @private @type {?Decoder} */
this._decoder = null;
/** @private @type {boolean} */
this._ignoreBOM = false;
/** @private @type {boolean} */
this._BOMseen = false;
/** @private @type {string} */
this._error_mode = 'replacement';
/** @private @type {boolean} */
this._do_not_flush = false;
// 1. Let encoding be the result of getting an encoding from
// label.
var encoding = getEncoding(label);
// 2. If encoding is failure or replacement, throw a RangeError.
if (encoding === null || encoding.name === 'replacement')
throw RangeError('Unknown encoding: ' + label);
if (!decoders[encoding.name]) {
throw Error('Decoder not present.' +
' Did you forget to include encoding-indexes.js first?');
}
// 3. Let dec be a new TextDecoder object.
var dec = this;
// 4. Set dec's encoding to encoding.
dec._encoding = encoding;
// 5. If options's fatal member is true, set dec's error mode to
// fatal.
if (Boolean(options['fatal']))
dec._error_mode = 'fatal';
// 6. If options's ignoreBOM member is true, set dec's ignore BOM
// flag.
if (Boolean(options['ignoreBOM']))
dec._ignoreBOM = true;
// For pre-ES5 runtimes:
if (!Object.defineProperty) {
this.encoding = dec._encoding.name.toLowerCase();
this.fatal = dec._error_mode === 'fatal';
this.ignoreBOM = dec._ignoreBOM;
}
// 7. Return dec.
return dec;
}
if (Object.defineProperty) {
// The encoding attribute's getter must return encoding's name.
Object.defineProperty(TextDecoder.prototype, 'encoding', {
/** @this {TextDecoder} */
get: function() { return this._encoding.name.toLowerCase(); }
});
// The fatal attribute's getter must return true if error mode
// is fatal, and false otherwise.
Object.defineProperty(TextDecoder.prototype, 'fatal', {
/** @this {TextDecoder} */
get: function() { return this._error_mode === 'fatal'; }
});
// The ignoreBOM attribute's getter must return true if ignore
// BOM flag is set, and false otherwise.
Object.defineProperty(TextDecoder.prototype, 'ignoreBOM', {
/** @this {TextDecoder} */
get: function() { return this._ignoreBOM; }
});
}
/**
* @param {BufferSource=} input The buffer of bytes to decode.
* @param {Object=} options
* @return {string} The decoded string.
*/
TextDecoder.prototype.decode = function decode(input, options) {
var bytes;
if (typeof input === 'object' && input instanceof ArrayBuffer) {
bytes = new Uint8Array(input);
} else if (typeof input === 'object' && 'buffer' in input &&
input.buffer instanceof ArrayBuffer) {
bytes = new Uint8Array(input.buffer,
input.byteOffset,
input.byteLength);
} else {
bytes = new Uint8Array(0);
}
options = ToDictionary(options);
// 1. If the do not flush flag is unset, set decoder to a new
// encoding's decoder, set stream to a new stream, and unset the
// BOM seen flag.
if (!this._do_not_flush) {
this._decoder = decoders[this._encoding.name]({
fatal: this._error_mode === 'fatal'});
this._BOMseen = false;
}
// 2. If options's stream is true, set the do not flush flag, and
// unset the do not flush flag otherwise.
this._do_not_flush = Boolean(options['stream']);
// 3. If input is given, push a copy of input to stream.
// TODO: Align with spec algorithm - maintain stream on instance.
var input_stream = new Stream(bytes);
// 4. Let output be a new stream.
var output = [];
/** @type {?(number|!Array.<number>)} */
var result;
// 5. While true:
while (true) {
// 1. Let token be the result of reading from stream.
var token = input_stream.read();
// 2. If token is end-of-stream and the do not flush flag is
// set, return output, serialized.
// TODO: Align with spec algorithm.
if (token === end_of_stream)
break;
// 3. Otherwise, run these subsubsteps:
// 1. Let result be the result of processing token for decoder,
// stream, output, and error mode.
result = this._decoder.handler(input_stream, token);
// 2. If result is finished, return output, serialized.
if (result === finished)
break;
if (result !== null) {
if (Array.isArray(result))
output.push.apply(output, /**@type {!Array.<number>}*/(result));
else
output.push(result);
}
// 3. Otherwise, if result is error, throw a TypeError.
// (Thrown in handler)
// 4. Otherwise, do nothing.
}
// TODO: Align with spec algorithm.
if (!this._do_not_flush) {
do {
result = this._decoder.handler(input_stream, input_stream.read());
if (result === finished)
break;
if (result === null)
continue;
if (Array.isArray(result))
output.push.apply(output, /**@type {!Array.<number>}*/(result));
else
output.push(result);
} while (!input_stream.endOfStream());
this._decoder = null;
}
// A TextDecoder object also has an associated serialize stream
// algorithm...
/**
* @param {!Array.<number>} stream
* @return {string}
* @this {TextDecoder}
*/
function serializeStream(stream) {
// 1. Let token be the result of reading from stream.
// (Done in-place on array, rather than as a stream)
// 2. If encoding is UTF-8, UTF-16BE, or UTF-16LE, and ignore
// BOM flag and BOM seen flag are unset, run these subsubsteps:
if (includes(['UTF-8', 'UTF-16LE', 'UTF-16BE'], this._encoding.name) &&
!this._ignoreBOM && !this._BOMseen) {
if (stream.length > 0 && stream[0] === 0xFEFF) {
// 1. If token is U+FEFF, set BOM seen flag.
this._BOMseen = true;
stream.shift();
} else if (stream.length > 0) {
// 2. Otherwise, if token is not end-of-stream, set BOM seen
// flag and append token to stream.
this._BOMseen = true;
} else {
// 3. Otherwise, if token is not end-of-stream, append token
// to output.
// (no-op)
}
}
// 4. Otherwise, return output.
return codePointsToString(stream);
}
return serializeStream.call(this, output);
};
// 8.2 Interface TextEncoder
/**
* @constructor
* @param {string=} label The label of the encoding. NONSTANDARD.
* @param {Object=} options NONSTANDARD.
*/
function TextEncoder(label, options) {
// Web IDL conventions
if (!(this instanceof TextEncoder))
throw TypeError('Called as a function. Did you forget \'new\'?');
options = ToDictionary(options);
// A TextEncoder object has an associated encoding and encoder.
/** @private */
this._encoding = null;
/** @private @type {?Encoder} */
this._encoder = null;
// Non-standard
/** @private @type {boolean} */
this._do_not_flush = false;
/** @private @type {string} */
this._fatal = Boolean(options['fatal']) ? 'fatal' : 'replacement';
// 1. Let enc be a new TextEncoder object.
var enc = this;
// 2. Set enc's encoding to UTF-8's encoder.
if (Boolean(options['NONSTANDARD_allowLegacyEncoding'])) {
// NONSTANDARD behavior.
label = label !== undefined ? String(label) : DEFAULT_ENCODING;
var encoding = getEncoding(label);
if (encoding === null || encoding.name === 'replacement')
throw RangeError('Unknown encoding: ' + label);
if (!encoders[encoding.name]) {
throw Error('Encoder not present.' +
' Did you forget to include encoding-indexes.js first?');
}
enc._encoding = encoding;
} else {
// Standard behavior.
enc._encoding = getEncoding('utf-8');
if (label !== undefined && 'console' in global) {
console.warn('TextEncoder constructor called with encoding label, '
+ 'which is ignored.');
}
}
// For pre-ES5 runtimes:
if (!Object.defineProperty)
this.encoding = enc._encoding.name.toLowerCase();
// 3. Return enc.
return enc;
}
if (Object.defineProperty) {
// The encoding attribute's getter must return encoding's name.
Object.defineProperty(TextEncoder.prototype, 'encoding', {
/** @this {TextEncoder} */
get: function() { return this._encoding.name.toLowerCase(); }
});
}
/**
* @param {string=} opt_string The string to encode.
* @param {Object=} options
* @return {!Uint8Array} Encoded bytes, as a Uint8Array.
*/
TextEncoder.prototype.encode = function encode(opt_string, options) {
opt_string = opt_string === undefined ? '' : String(opt_string);
options = ToDictionary(options);
// NOTE: This option is nonstandard. None of the encodings
// permitted for encoding (i.e. UTF-8, UTF-16) are stateful when
// the input is a USVString so streaming is not necessary.
if (!this._do_not_flush)
this._encoder = encoders[this._encoding.name]({
fatal: this._fatal === 'fatal'});
this._do_not_flush = Boolean(options['stream']);
// 1. Convert input to a stream.
var input = new Stream(stringToCodePoints(opt_string));
// 2. Let output be a new stream
var output = [];
/** @type {?(number|!Array.<number>)} */
var result;
// 3. While true, run these substeps:
while (true) {
// 1. Let token be the result of reading from input.
var token = input.read();
if (token === end_of_stream)
break;
// 2. Let result be the result of processing token for encoder,
// input, output.
result = this._encoder.handler(input, token);
if (result === finished)
break;
if (Array.isArray(result))
output.push.apply(output, /**@type {!Array.<number>}*/(result));
else
output.push(result);
}
// TODO: Align with spec algorithm.
if (!this._do_not_flush) {
while (true) {
result = this._encoder.handler(input, input.read());
if (result === finished)
break;
if (Array.isArray(result))
output.push.apply(output, /**@type {!Array.<number>}*/(result));
else
output.push(result);
}
this._encoder = null;
}
// 3. If result is finished, convert output into a byte sequence,
// and then return a Uint8Array object wrapping an ArrayBuffer
// containing output.
return new Uint8Array(output);
};
//
// 9. The encoding
//
// 9.1 utf-8
// 9.1.1 utf-8 decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function UTF8Decoder(options) {
var fatal = options.fatal;
// utf-8's decoder's has an associated utf-8 code point, utf-8
// bytes seen, and utf-8 bytes needed (all initially 0), a utf-8
// lower boundary (initially 0x80), and a utf-8 upper boundary
// (initially 0xBF).
var /** @type {number} */ utf8_code_point = 0,
/** @type {number} */ utf8_bytes_seen = 0,
/** @type {number} */ utf8_bytes_needed = 0,
/** @type {number} */ utf8_lower_boundary = 0x80,
/** @type {number} */ utf8_upper_boundary = 0xBF;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream and utf-8 bytes needed is not 0,
// set utf-8 bytes needed to 0 and return error.
if (bite === end_of_stream && utf8_bytes_needed !== 0) {
utf8_bytes_needed = 0;
return decoderError(fatal);
}
// 2. If byte is end-of-stream, return finished.
if (bite === end_of_stream)
return finished;
// 3. If utf-8 bytes needed is 0, based on byte:
if (utf8_bytes_needed === 0) {
// 0x00 to 0x7F
if (inRange(bite, 0x00, 0x7F)) {
// Return a code point whose value is byte.
return bite;
}
// 0xC2 to 0xDF
else if (inRange(bite, 0xC2, 0xDF)) {
// 1. Set utf-8 bytes needed to 1.
utf8_bytes_needed = 1;
// 2. Set UTF-8 code point to byte & 0x1F.
utf8_code_point = bite & 0x1F;
}
// 0xE0 to 0xEF
else if (inRange(bite, 0xE0, 0xEF)) {
// 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.
if (bite === 0xE0)
utf8_lower_boundary = 0xA0;
// 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.
if (bite === 0xED)
utf8_upper_boundary = 0x9F;
// 3. Set utf-8 bytes needed to 2.
utf8_bytes_needed = 2;
// 4. Set UTF-8 code point to byte & 0xF.
utf8_code_point = bite & 0xF;
}
// 0xF0 to 0xF4
else if (inRange(bite, 0xF0, 0xF4)) {
// 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.
if (bite === 0xF0)
utf8_lower_boundary = 0x90;
// 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.
if (bite === 0xF4)
utf8_upper_boundary = 0x8F;
// 3. Set utf-8 bytes needed to 3.
utf8_bytes_needed = 3;
// 4. Set UTF-8 code point to byte & 0x7.
utf8_code_point = bite & 0x7;
}
// Otherwise
else {
// Return error.
return decoderError(fatal);
}
// Return continue.
return null;
}
// 4. If byte is not in the range utf-8 lower boundary to utf-8
// upper boundary, inclusive, run these substeps:
if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {
// 1. Set utf-8 code point, utf-8 bytes needed, and utf-8
// bytes seen to 0, set utf-8 lower boundary to 0x80, and set
// utf-8 upper boundary to 0xBF.
utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
utf8_lower_boundary = 0x80;
utf8_upper_boundary = 0xBF;
// 2. Prepend byte to stream.
stream.prepend(bite);
// 3. Return error.
return decoderError(fatal);
}
// 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary
// to 0xBF.
utf8_lower_boundary = 0x80;
utf8_upper_boundary = 0xBF;
// 6. Set UTF-8 code point to (UTF-8 code point << 6) | (byte &
// 0x3F)
utf8_code_point = (utf8_code_point << 6) | (bite & 0x3F);
// 7. Increase utf-8 bytes seen by one.
utf8_bytes_seen += 1;
// 8. If utf-8 bytes seen is not equal to utf-8 bytes needed,
// continue.
if (utf8_bytes_seen !== utf8_bytes_needed)
return null;
// 9. Let code point be utf-8 code point.
var code_point = utf8_code_point;
// 10. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes
// seen to 0.
utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
// 11. Return a code point whose value is code point.
return code_point;
};
}
// 9.1.2 utf-8 encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
*/
function UTF8Encoder(options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point, return a byte whose
// value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 3. Set count and offset based on the range code point is in:
var count, offset;
// U+0080 to U+07FF, inclusive:
if (inRange(code_point, 0x0080, 0x07FF)) {
// 1 and 0xC0
count = 1;
offset = 0xC0;
}
// U+0800 to U+FFFF, inclusive:
else if (inRange(code_point, 0x0800, 0xFFFF)) {
// 2 and 0xE0
count = 2;
offset = 0xE0;
}
// U+10000 to U+10FFFF, inclusive:
else if (inRange(code_point, 0x10000, 0x10FFFF)) {
// 3 and 0xF0
count = 3;
offset = 0xF0;
}
// 4. Let bytes be a byte sequence whose first byte is (code
// point >> (6 × count)) + offset.
var bytes = [(code_point >> (6 * count)) + offset];
// 5. Run these substeps while count is greater than 0:
while (count > 0) {
// 1. Set temp to code point >> (6 × (count − 1)).
var temp = code_point >> (6 * (count - 1));
// 2. Append to bytes 0x80 | (temp & 0x3F).
bytes.push(0x80 | (temp & 0x3F));
// 3. Decrease count by one.
count -= 1;
}
// 6. Return bytes bytes, in order.
return bytes;
};
}
/** @param {{fatal: boolean}} options */
encoders['UTF-8'] = function(options) {
return new UTF8Encoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['UTF-8'] = function(options) {
return new UTF8Decoder(options);
};
//
// 10. Legacy single-byte encodings
//
// 10.1 single-byte decoder
/**
* @constructor
* @implements {Decoder}
* @param {!Array.<number>} index The encoding index.
* @param {{fatal: boolean}} options
*/
function SingleByteDecoder(index, options) {
var fatal = options.fatal;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream, return finished.
if (bite === end_of_stream)
return finished;
// 2. If byte is an ASCII byte, return a code point whose value
// is byte.
if (isASCIIByte(bite))
return bite;
// 3. Let code point be the index code point for byte − 0x80 in
// index single-byte.
var code_point = index[bite - 0x80];
// 4. If code point is null, return error.
if (code_point === null)
return decoderError(fatal);
// 5. Return a code point whose value is code point.
return code_point;
};
}
// 10.2 single-byte encoder
/**
* @constructor
* @implements {Encoder}
* @param {!Array.<?number>} index The encoding index.
* @param {{fatal: boolean}} options
*/
function SingleByteEncoder(index, options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point, return a byte whose
// value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 3. Let pointer be the index pointer for code point in index
// single-byte.
var pointer = indexPointerFor(code_point, index);
// 4. If pointer is null, return error with code point.
if (pointer === null)
encoderError(code_point);
// 5. Return a byte whose value is pointer + 0x80.
return pointer + 0x80;
};
}
(function() {
if (!('encoding-indexes' in global))
return;
encodings.forEach(function(category) {
if (category.heading !== 'Legacy single-byte encodings')
return;
category.encodings.forEach(function(encoding) {
var name = encoding.name;
var idx = index(name.toLowerCase());
/** @param {{fatal: boolean}} options */
decoders[name] = function(options) {
return new SingleByteDecoder(idx, options);
};
/** @param {{fatal: boolean}} options */
encoders[name] = function(options) {
return new SingleByteEncoder(idx, options);
};
});
});
}());
//
// 11. Legacy multi-byte Chinese (simplified) encodings
//
// 11.1 gbk
// 11.1.1 gbk decoder
// gbk's decoder is gb18030's decoder.
/** @param {{fatal: boolean}} options */
decoders['GBK'] = function(options) {
return new GB18030Decoder(options);
};
// 11.1.2 gbk encoder
// gbk's encoder is gb18030's encoder with its gbk flag set.
/** @param {{fatal: boolean}} options */
encoders['GBK'] = function(options) {
return new GB18030Encoder(options, true);
};
// 11.2 gb18030
// 11.2.1 gb18030 decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function GB18030Decoder(options) {
var fatal = options.fatal;
// gb18030's decoder has an associated gb18030 first, gb18030
// second, and gb18030 third (all initially 0x00).
var /** @type {number} */ gb18030_first = 0x00,
/** @type {number} */ gb18030_second = 0x00,
/** @type {number} */ gb18030_third = 0x00;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream and gb18030 first, gb18030
// second, and gb18030 third are 0x00, return finished.
if (bite === end_of_stream && gb18030_first === 0x00 &&
gb18030_second === 0x00 && gb18030_third === 0x00) {
return finished;
}
// 2. If byte is end-of-stream, and gb18030 first, gb18030
// second, or gb18030 third is not 0x00, set gb18030 first,
// gb18030 second, and gb18030 third to 0x00, and return error.
if (bite === end_of_stream &&
(gb18030_first !== 0x00 || gb18030_second !== 0x00 ||
gb18030_third !== 0x00)) {
gb18030_first = 0x00;
gb18030_second = 0x00;
gb18030_third = 0x00;
decoderError(fatal);
}
var code_point;
// 3. If gb18030 third is not 0x00, run these substeps:
if (gb18030_third !== 0x00) {
// 1. Let code point be null.
code_point = null;
// 2. If byte is in the range 0x30 to 0x39, inclusive, set
// code point to the index gb18030 ranges code point for
// (((gb18030 first − 0x81) × 10 + gb18030 second − 0x30) ×
// 126 + gb18030 third − 0x81) × 10 + byte − 0x30.
if (inRange(bite, 0x30, 0x39)) {
code_point = indexGB18030RangesCodePointFor(
(((gb18030_first - 0x81) * 10 + gb18030_second - 0x30) * 126 +
gb18030_third - 0x81) * 10 + bite - 0x30);
}
// 3. Let buffer be a byte sequence consisting of gb18030
// second, gb18030 third, and byte, in order.
var buffer = [gb18030_second, gb18030_third, bite];
// 4. Set gb18030 first, gb18030 second, and gb18030 third to
// 0x00.
gb18030_first = 0x00;
gb18030_second = 0x00;
gb18030_third = 0x00;
// 5. If code point is null, prepend buffer to stream and
// return error.
if (code_point === null) {
stream.prepend(buffer);
return decoderError(fatal);
}
// 6. Return a code point whose value is code point.
return code_point;
}
// 4. If gb18030 second is not 0x00, run these substeps:
if (gb18030_second !== 0x00) {
// 1. If byte is in the range 0x81 to 0xFE, inclusive, set
// gb18030 third to byte and return continue.
if (inRange(bite, 0x81, 0xFE)) {
gb18030_third = bite;
return null;
}
// 2. Prepend gb18030 second followed by byte to stream, set
// gb18030 first and gb18030 second to 0x00, and return error.
stream.prepend([gb18030_second, bite]);
gb18030_first = 0x00;
gb18030_second = 0x00;
return decoderError(fatal);
}
// 5. If gb18030 first is not 0x00, run these substeps:
if (gb18030_first !== 0x00) {
// 1. If byte is in the range 0x30 to 0x39, inclusive, set
// gb18030 second to byte and return continue.
if (inRange(bite, 0x30, 0x39)) {
gb18030_second = bite;
return null;
}
// 2. Let lead be gb18030 first, let pointer be null, and set
// gb18030 first to 0x00.
var lead = gb18030_first;
var pointer = null;
gb18030_first = 0x00;
// 3. Let offset be 0x40 if byte is less than 0x7F and 0x41
// otherwise.
var offset = bite < 0x7F ? 0x40 : 0x41;
// 4. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
// to 0xFE, inclusive, set pointer to (lead − 0x81) × 190 +
// (byte − offset).
if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFE))
pointer = (lead - 0x81) * 190 + (bite - offset);
// 5. Let code point be null if pointer is null and the index
// code point for pointer in index gb18030 otherwise.
code_point = pointer === null ? null :
indexCodePointFor(pointer, index('gb18030'));
// 6. If code point is null and byte is an ASCII byte, prepend
// byte to stream.
if (code_point === null && isASCIIByte(bite))
stream.prepend(bite);
// 7. If code point is null, return error.
if (code_point === null)
return decoderError(fatal);
// 8. Return a code point whose value is code point.
return code_point;
}
// 6. If byte is an ASCII byte, return a code point whose value
// is byte.
if (isASCIIByte(bite))
return bite;
// 7. If byte is 0x80, return code point U+20AC.
if (bite === 0x80)
return 0x20AC;
// 8. If byte is in the range 0x81 to 0xFE, inclusive, set
// gb18030 first to byte and return continue.
if (inRange(bite, 0x81, 0xFE)) {
gb18030_first = bite;
return null;
}
// 9. Return error.
return decoderError(fatal);
};
}
// 11.2.2 gb18030 encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
* @param {boolean=} gbk_flag
*/
function GB18030Encoder(options, gbk_flag) {
var fatal = options.fatal;
// gb18030's decoder has an associated gbk flag (initially unset).
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point, return a byte whose
// value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 3. If code point is U+E5E5, return error with code point.
if (code_point === 0xE5E5)
return encoderError(code_point);
// 4. If the gbk flag is set and code point is U+20AC, return
// byte 0x80.
if (gbk_flag && code_point === 0x20AC)
return 0x80;
// 5. Let pointer be the index pointer for code point in index
// gb18030.
var pointer = indexPointerFor(code_point, index('gb18030'));
// 6. If pointer is not null, run these substeps:
if (pointer !== null) {
// 1. Let lead be floor(pointer / 190) + 0x81.
var lead = floor(pointer / 190) + 0x81;
// 2. Let trail be pointer % 190.
var trail = pointer % 190;
// 3. Let offset be 0x40 if trail is less than 0x3F and 0x41 otherwise.
var offset = trail < 0x3F ? 0x40 : 0x41;
// 4. Return two bytes whose values are lead and trail + offset.
return [lead, trail + offset];
}
// 7. If gbk flag is set, return error with code point.
if (gbk_flag)
return encoderError(code_point);
// 8. Set pointer to the index gb18030 ranges pointer for code
// point.
pointer = indexGB18030RangesPointerFor(code_point);
// 9. Let byte1 be floor(pointer / 10 / 126 / 10).
var byte1 = floor(pointer / 10 / 126 / 10);
// 10. Set pointer to pointer − byte1 × 10 × 126 × 10.
pointer = pointer - byte1 * 10 * 126 * 10;
// 11. Let byte2 be floor(pointer / 10 / 126).
var byte2 = floor(pointer / 10 / 126);
// 12. Set pointer to pointer − byte2 × 10 × 126.
pointer = pointer - byte2 * 10 * 126;
// 13. Let byte3 be floor(pointer / 10).
var byte3 = floor(pointer / 10);
// 14. Let byte4 be pointer − byte3 × 10.
var byte4 = pointer - byte3 * 10;
// 15. Return four bytes whose values are byte1 + 0x81, byte2 +
// 0x30, byte3 + 0x81, byte4 + 0x30.
return [byte1 + 0x81,
byte2 + 0x30,
byte3 + 0x81,
byte4 + 0x30];
};
}
/** @param {{fatal: boolean}} options */
encoders['gb18030'] = function(options) {
return new GB18030Encoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['gb18030'] = function(options) {
return new GB18030Decoder(options);
};
//
// 12. Legacy multi-byte Chinese (traditional) encodings
//
// 12.1 Big5
// 12.1.1 Big5 decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function Big5Decoder(options) {
var fatal = options.fatal;
// Big5's decoder has an associated Big5 lead (initially 0x00).
var /** @type {number} */ Big5_lead = 0x00;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream and Big5 lead is not 0x00, set
// Big5 lead to 0x00 and return error.
if (bite === end_of_stream && Big5_lead !== 0x00) {
Big5_lead = 0x00;
return decoderError(fatal);
}
// 2. If byte is end-of-stream and Big5 lead is 0x00, return
// finished.
if (bite === end_of_stream && Big5_lead === 0x00)
return finished;
// 3. If Big5 lead is not 0x00, let lead be Big5 lead, let
// pointer be null, set Big5 lead to 0x00, and then run these
// substeps:
if (Big5_lead !== 0x00) {
var lead = Big5_lead;
var pointer = null;
Big5_lead = 0x00;
// 1. Let offset be 0x40 if byte is less than 0x7F and 0x62
// otherwise.
var offset = bite < 0x7F ? 0x40 : 0x62;
// 2. If byte is in the range 0x40 to 0x7E, inclusive, or 0xA1
// to 0xFE, inclusive, set pointer to (lead − 0x81) × 157 +
// (byte − offset).
if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0xA1, 0xFE))
pointer = (lead - 0x81) * 157 + (bite - offset);
// 3. If there is a row in the table below whose first column
// is pointer, return the two code points listed in its second
// column
// Pointer | Code points
// --------+--------------
// 1133 | U+00CA U+0304
// 1135 | U+00CA U+030C
// 1164 | U+00EA U+0304
// 1166 | U+00EA U+030C
switch (pointer) {
case 1133: return [0x00CA, 0x0304];
case 1135: return [0x00CA, 0x030C];
case 1164: return [0x00EA, 0x0304];
case 1166: return [0x00EA, 0x030C];
}
// 4. Let code point be null if pointer is null and the index
// code point for pointer in index Big5 otherwise.
var code_point = (pointer === null) ? null :
indexCodePointFor(pointer, index('big5'));
// 5. If code point is null and byte is an ASCII byte, prepend
// byte to stream.
if (code_point === null && isASCIIByte(bite))
stream.prepend(bite);
// 6. If code point is null, return error.
if (code_point === null)
return decoderError(fatal);
// 7. Return a code point whose value is code point.
return code_point;
}
// 4. If byte is an ASCII byte, return a code point whose value
// is byte.
if (isASCIIByte(bite))
return bite;
// 5. If byte is in the range 0x81 to 0xFE, inclusive, set Big5
// lead to byte and return continue.
if (inRange(bite, 0x81, 0xFE)) {
Big5_lead = bite;
return null;
}
// 6. Return error.
return decoderError(fatal);
};
}
// 12.1.2 Big5 encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
*/
function Big5Encoder(options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point, return a byte whose
// value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 3. Let pointer be the index Big5 pointer for code point.
var pointer = indexBig5PointerFor(code_point);
// 4. If pointer is null, return error with code point.
if (pointer === null)
return encoderError(code_point);
// 5. Let lead be floor(pointer / 157) + 0x81.
var lead = floor(pointer / 157) + 0x81;
// 6. If lead is less than 0xA1, return error with code point.
if (lead < 0xA1)
return encoderError(code_point);
// 7. Let trail be pointer % 157.
var trail = pointer % 157;
// 8. Let offset be 0x40 if trail is less than 0x3F and 0x62
// otherwise.
var offset = trail < 0x3F ? 0x40 : 0x62;
// Return two bytes whose values are lead and trail + offset.
return [lead, trail + offset];
};
}
/** @param {{fatal: boolean}} options */
encoders['Big5'] = function(options) {
return new Big5Encoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['Big5'] = function(options) {
return new Big5Decoder(options);
};
//
// 13. Legacy multi-byte Japanese encodings
//
// 13.1 euc-jp
// 13.1.1 euc-jp decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function EUCJPDecoder(options) {
var fatal = options.fatal;
// euc-jp's decoder has an associated euc-jp jis0212 flag
// (initially unset) and euc-jp lead (initially 0x00).
var /** @type {boolean} */ eucjp_jis0212_flag = false,
/** @type {number} */ eucjp_lead = 0x00;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream and euc-jp lead is not 0x00, set
// euc-jp lead to 0x00, and return error.
if (bite === end_of_stream && eucjp_lead !== 0x00) {
eucjp_lead = 0x00;
return decoderError(fatal);
}
// 2. If byte is end-of-stream and euc-jp lead is 0x00, return
// finished.
if (bite === end_of_stream && eucjp_lead === 0x00)
return finished;
// 3. If euc-jp lead is 0x8E and byte is in the range 0xA1 to
// 0xDF, inclusive, set euc-jp lead to 0x00 and return a code
// point whose value is 0xFF61 − 0xA1 + byte.
if (eucjp_lead === 0x8E && inRange(bite, 0xA1, 0xDF)) {
eucjp_lead = 0x00;
return 0xFF61 - 0xA1 + bite;
}
// 4. If euc-jp lead is 0x8F and byte is in the range 0xA1 to
// 0xFE, inclusive, set the euc-jp jis0212 flag, set euc-jp lead
// to byte, and return continue.
if (eucjp_lead === 0x8F && inRange(bite, 0xA1, 0xFE)) {
eucjp_jis0212_flag = true;
eucjp_lead = bite;
return null;
}
// 5. If euc-jp lead is not 0x00, let lead be euc-jp lead, set
// euc-jp lead to 0x00, and run these substeps:
if (eucjp_lead !== 0x00) {
var lead = eucjp_lead;
eucjp_lead = 0x00;
// 1. Let code point be null.
var code_point = null;
// 2. If lead and byte are both in the range 0xA1 to 0xFE,
// inclusive, set code point to the index code point for (lead
// − 0xA1) × 94 + byte − 0xA1 in index jis0208 if the euc-jp
// jis0212 flag is unset and in index jis0212 otherwise.
if (inRange(lead, 0xA1, 0xFE) && inRange(bite, 0xA1, 0xFE)) {
code_point = indexCodePointFor(
(lead - 0xA1) * 94 + (bite - 0xA1),
index(!eucjp_jis0212_flag ? 'jis0208' : 'jis0212'));
}
// 3. Unset the euc-jp jis0212 flag.
eucjp_jis0212_flag = false;
// 4. If byte is not in the range 0xA1 to 0xFE, inclusive,
// prepend byte to stream.
if (!inRange(bite, 0xA1, 0xFE))
stream.prepend(bite);
// 5. If code point is null, return error.
if (code_point === null)
return decoderError(fatal);
// 6. Return a code point whose value is code point.
return code_point;
}
// 6. If byte is an ASCII byte, return a code point whose value
// is byte.
if (isASCIIByte(bite))
return bite;
// 7. If byte is 0x8E, 0x8F, or in the range 0xA1 to 0xFE,
// inclusive, set euc-jp lead to byte and return continue.
if (bite === 0x8E || bite === 0x8F || inRange(bite, 0xA1, 0xFE)) {
eucjp_lead = bite;
return null;
}
// 8. Return error.
return decoderError(fatal);
};
}
// 13.1.2 euc-jp encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
*/
function EUCJPEncoder(options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point, return a byte whose
// value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 3. If code point is U+00A5, return byte 0x5C.
if (code_point === 0x00A5)
return 0x5C;
// 4. If code point is U+203E, return byte 0x7E.
if (code_point === 0x203E)
return 0x7E;
// 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
// return two bytes whose values are 0x8E and code point −
// 0xFF61 + 0xA1.
if (inRange(code_point, 0xFF61, 0xFF9F))
return [0x8E, code_point - 0xFF61 + 0xA1];
// 6. If code point is U+2212, set it to U+FF0D.
if (code_point === 0x2212)
code_point = 0xFF0D;
// 7. Let pointer be the index pointer for code point in index
// jis0208.
var pointer = indexPointerFor(code_point, index('jis0208'));
// 8. If pointer is null, return error with code point.
if (pointer === null)
return encoderError(code_point);
// 9. Let lead be floor(pointer / 94) + 0xA1.
var lead = floor(pointer / 94) + 0xA1;
// 10. Let trail be pointer % 94 + 0xA1.
var trail = pointer % 94 + 0xA1;
// 11. Return two bytes whose values are lead and trail.
return [lead, trail];
};
}
/** @param {{fatal: boolean}} options */
encoders['EUC-JP'] = function(options) {
return new EUCJPEncoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['EUC-JP'] = function(options) {
return new EUCJPDecoder(options);
};
// 13.2 iso-2022-jp
// 13.2.1 iso-2022-jp decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function ISO2022JPDecoder(options) {
var fatal = options.fatal;
/** @enum */
var states = {
ASCII: 0,
Roman: 1,
Katakana: 2,
LeadByte: 3,
TrailByte: 4,
EscapeStart: 5,
Escape: 6
};
// iso-2022-jp's decoder has an associated iso-2022-jp decoder
// state (initially ASCII), iso-2022-jp decoder output state
// (initially ASCII), iso-2022-jp lead (initially 0x00), and
// iso-2022-jp output flag (initially unset).
var /** @type {number} */ iso2022jp_decoder_state = states.ASCII,
/** @type {number} */ iso2022jp_decoder_output_state = states.ASCII,
/** @type {number} */ iso2022jp_lead = 0x00,
/** @type {boolean} */ iso2022jp_output_flag = false;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// switching on iso-2022-jp decoder state:
switch (iso2022jp_decoder_state) {
default:
case states.ASCII:
// ASCII
// Based on byte:
// 0x1B
if (bite === 0x1B) {
// Set iso-2022-jp decoder state to escape start and return
// continue.
iso2022jp_decoder_state = states.EscapeStart;
return null;
}
// 0x00 to 0x7F, excluding 0x0E, 0x0F, and 0x1B
if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E
&& bite !== 0x0F && bite !== 0x1B) {
// Unset the iso-2022-jp output flag and return a code point
// whose value is byte.
iso2022jp_output_flag = false;
return bite;
}
// end-of-stream
if (bite === end_of_stream) {
// Return finished.
return finished;
}
// Otherwise
// Unset the iso-2022-jp output flag and return error.
iso2022jp_output_flag = false;
return decoderError(fatal);
case states.Roman:
// Roman
// Based on byte:
// 0x1B
if (bite === 0x1B) {
// Set iso-2022-jp decoder state to escape start and return
// continue.
iso2022jp_decoder_state = states.EscapeStart;
return null;
}
// 0x5C
if (bite === 0x5C) {
// Unset the iso-2022-jp output flag and return code point
// U+00A5.
iso2022jp_output_flag = false;
return 0x00A5;
}
// 0x7E
if (bite === 0x7E) {
// Unset the iso-2022-jp output flag and return code point
// U+203E.
iso2022jp_output_flag = false;
return 0x203E;
}
// 0x00 to 0x7F, excluding 0x0E, 0x0F, 0x1B, 0x5C, and 0x7E
if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E && bite !== 0x0F
&& bite !== 0x1B && bite !== 0x5C && bite !== 0x7E) {
// Unset the iso-2022-jp output flag and return a code point
// whose value is byte.
iso2022jp_output_flag = false;
return bite;
}
// end-of-stream
if (bite === end_of_stream) {
// Return finished.
return finished;
}
// Otherwise
// Unset the iso-2022-jp output flag and return error.
iso2022jp_output_flag = false;
return decoderError(fatal);
case states.Katakana:
// Katakana
// Based on byte:
// 0x1B
if (bite === 0x1B) {
// Set iso-2022-jp decoder state to escape start and return
// continue.
iso2022jp_decoder_state = states.EscapeStart;
return null;
}
// 0x21 to 0x5F
if (inRange(bite, 0x21, 0x5F)) {
// Unset the iso-2022-jp output flag and return a code point
// whose value is 0xFF61 − 0x21 + byte.
iso2022jp_output_flag = false;
return 0xFF61 - 0x21 + bite;
}
// end-of-stream
if (bite === end_of_stream) {
// Return finished.
return finished;
}
// Otherwise
// Unset the iso-2022-jp output flag and return error.
iso2022jp_output_flag = false;
return decoderError(fatal);
case states.LeadByte:
// Lead byte
// Based on byte:
// 0x1B
if (bite === 0x1B) {
// Set iso-2022-jp decoder state to escape start and return
// continue.
iso2022jp_decoder_state = states.EscapeStart;
return null;
}
// 0x21 to 0x7E
if (inRange(bite, 0x21, 0x7E)) {
// Unset the iso-2022-jp output flag, set iso-2022-jp lead
// to byte, iso-2022-jp decoder state to trail byte, and
// return continue.
iso2022jp_output_flag = false;
iso2022jp_lead = bite;
iso2022jp_decoder_state = states.TrailByte;
return null;
}
// end-of-stream
if (bite === end_of_stream) {
// Return finished.
return finished;
}
// Otherwise
// Unset the iso-2022-jp output flag and return error.
iso2022jp_output_flag = false;
return decoderError(fatal);
case states.TrailByte:
// Trail byte
// Based on byte:
// 0x1B
if (bite === 0x1B) {
// Set iso-2022-jp decoder state to escape start and return
// continue.
iso2022jp_decoder_state = states.EscapeStart;
return decoderError(fatal);
}
// 0x21 to 0x7E
if (inRange(bite, 0x21, 0x7E)) {
// 1. Set the iso-2022-jp decoder state to lead byte.
iso2022jp_decoder_state = states.LeadByte;
// 2. Let pointer be (iso-2022-jp lead − 0x21) × 94 + byte − 0x21.
var pointer = (iso2022jp_lead - 0x21) * 94 + bite - 0x21;
// 3. Let code point be the index code point for pointer in
// index jis0208.
var code_point = indexCodePointFor(pointer, index('jis0208'));
// 4. If code point is null, return error.
if (code_point === null)
return decoderError(fatal);
// 5. Return a code point whose value is code point.
return code_point;
}
// end-of-stream
if (bite === end_of_stream) {
// Set the iso-2022-jp decoder state to lead byte, prepend
// byte to stream, and return error.
iso2022jp_decoder_state = states.LeadByte;
stream.prepend(bite);
return decoderError(fatal);
}
// Otherwise
// Set iso-2022-jp decoder state to lead byte and return
// error.
iso2022jp_decoder_state = states.LeadByte;
return decoderError(fatal);
case states.EscapeStart:
// Escape start
// 1. If byte is either 0x24 or 0x28, set iso-2022-jp lead to
// byte, iso-2022-jp decoder state to escape, and return
// continue.
if (bite === 0x24 || bite === 0x28) {
iso2022jp_lead = bite;
iso2022jp_decoder_state = states.Escape;
return null;
}
// 2. Prepend byte to stream.
stream.prepend(bite);
// 3. Unset the iso-2022-jp output flag, set iso-2022-jp
// decoder state to iso-2022-jp decoder output state, and
// return error.
iso2022jp_output_flag = false;
iso2022jp_decoder_state = iso2022jp_decoder_output_state;
return decoderError(fatal);
case states.Escape:
// Escape
// 1. Let lead be iso-2022-jp lead and set iso-2022-jp lead to
// 0x00.
var lead = iso2022jp_lead;
iso2022jp_lead = 0x00;
// 2. Let state be null.
var state = null;
// 3. If lead is 0x28 and byte is 0x42, set state to ASCII.
if (lead === 0x28 && bite === 0x42)
state = states.ASCII;
// 4. If lead is 0x28 and byte is 0x4A, set state to Roman.
if (lead === 0x28 && bite === 0x4A)
state = states.Roman;
// 5. If lead is 0x28 and byte is 0x49, set state to Katakana.
if (lead === 0x28 && bite === 0x49)
state = states.Katakana;
// 6. If lead is 0x24 and byte is either 0x40 or 0x42, set
// state to lead byte.
if (lead === 0x24 && (bite === 0x40 || bite === 0x42))
state = states.LeadByte;
// 7. If state is non-null, run these substeps:
if (state !== null) {
// 1. Set iso-2022-jp decoder state and iso-2022-jp decoder
// output state to states.
iso2022jp_decoder_state = iso2022jp_decoder_state = state;
// 2. Let output flag be the iso-2022-jp output flag.
var output_flag = iso2022jp_output_flag;
// 3. Set the iso-2022-jp output flag.
iso2022jp_output_flag = true;
// 4. Return continue, if output flag is unset, and error
// otherwise.
return !output_flag ? null : decoderError(fatal);
}
// 8. Prepend lead and byte to stream.
stream.prepend([lead, bite]);
// 9. Unset the iso-2022-jp output flag, set iso-2022-jp
// decoder state to iso-2022-jp decoder output state and
// return error.
iso2022jp_output_flag = false;
iso2022jp_decoder_state = iso2022jp_decoder_output_state;
return decoderError(fatal);
}
};
}
// 13.2.2 iso-2022-jp encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
*/
function ISO2022JPEncoder(options) {
var fatal = options.fatal;
// iso-2022-jp's encoder has an associated iso-2022-jp encoder
// state which is one of ASCII, Roman, and jis0208 (initially
// ASCII).
/** @enum */
var states = {
ASCII: 0,
Roman: 1,
jis0208: 2
};
var /** @type {number} */ iso2022jp_state = states.ASCII;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream and iso-2022-jp encoder
// state is not ASCII, prepend code point to stream, set
// iso-2022-jp encoder state to ASCII, and return three bytes
// 0x1B 0x28 0x42.
if (code_point === end_of_stream &&
iso2022jp_state !== states.ASCII) {
stream.prepend(code_point);
iso2022jp_state = states.ASCII;
return [0x1B, 0x28, 0x42];
}
// 2. If code point is end-of-stream and iso-2022-jp encoder
// state is ASCII, return finished.
if (code_point === end_of_stream && iso2022jp_state === states.ASCII)
return finished;
// 3. If ISO-2022-JP encoder state is ASCII or Roman, and code
// point is U+000E, U+000F, or U+001B, return error with U+FFFD.
if ((iso2022jp_state === states.ASCII ||
iso2022jp_state === states.Roman) &&
(code_point === 0x000E || code_point === 0x000F ||
code_point === 0x001B)) {
return encoderError(0xFFFD);
}
// 4. If iso-2022-jp encoder state is ASCII and code point is an
// ASCII code point, return a byte whose value is code point.
if (iso2022jp_state === states.ASCII &&
isASCIICodePoint(code_point))
return code_point;
// 5. If iso-2022-jp encoder state is Roman and code point is an
// ASCII code point, excluding U+005C and U+007E, or is U+00A5
// or U+203E, run these substeps:
if (iso2022jp_state === states.Roman &&
((isASCIICodePoint(code_point) &&
code_point !== 0x005C && code_point !== 0x007E) ||
(code_point == 0x00A5 || code_point == 0x203E))) {
// 1. If code point is an ASCII code point, return a byte
// whose value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 2. If code point is U+00A5, return byte 0x5C.
if (code_point === 0x00A5)
return 0x5C;
// 3. If code point is U+203E, return byte 0x7E.
if (code_point === 0x203E)
return 0x7E;
}
// 6. If code point is an ASCII code point, and iso-2022-jp
// encoder state is not ASCII, prepend code point to stream, set
// iso-2022-jp encoder state to ASCII, and return three bytes
// 0x1B 0x28 0x42.
if (isASCIICodePoint(code_point) &&
iso2022jp_state !== states.ASCII) {
stream.prepend(code_point);
iso2022jp_state = states.ASCII;
return [0x1B, 0x28, 0x42];
}
// 7. If code point is either U+00A5 or U+203E, and iso-2022-jp
// encoder state is not Roman, prepend code point to stream, set
// iso-2022-jp encoder state to Roman, and return three bytes
// 0x1B 0x28 0x4A.
if ((code_point === 0x00A5 || code_point === 0x203E) &&
iso2022jp_state !== states.Roman) {
stream.prepend(code_point);
iso2022jp_state = states.Roman;
return [0x1B, 0x28, 0x4A];
}
// 8. If code point is U+2212, set it to U+FF0D.
if (code_point === 0x2212)
code_point = 0xFF0D;
// 9. Let pointer be the index pointer for code point in index
// jis0208.
var pointer = indexPointerFor(code_point, index('jis0208'));
// 10. If pointer is null, return error with code point.
if (pointer === null)
return encoderError(code_point);
// 11. If iso-2022-jp encoder state is not jis0208, prepend code
// point to stream, set iso-2022-jp encoder state to jis0208,
// and return three bytes 0x1B 0x24 0x42.
if (iso2022jp_state !== states.jis0208) {
stream.prepend(code_point);
iso2022jp_state = states.jis0208;
return [0x1B, 0x24, 0x42];
}
// 12. Let lead be floor(pointer / 94) + 0x21.
var lead = floor(pointer / 94) + 0x21;
// 13. Let trail be pointer % 94 + 0x21.
var trail = pointer % 94 + 0x21;
// 14. Return two bytes whose values are lead and trail.
return [lead, trail];
};
}
/** @param {{fatal: boolean}} options */
encoders['ISO-2022-JP'] = function(options) {
return new ISO2022JPEncoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['ISO-2022-JP'] = function(options) {
return new ISO2022JPDecoder(options);
};
// 13.3 Shift_JIS
// 13.3.1 Shift_JIS decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function ShiftJISDecoder(options) {
var fatal = options.fatal;
// Shift_JIS's decoder has an associated Shift_JIS lead (initially
// 0x00).
var /** @type {number} */ Shift_JIS_lead = 0x00;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream and Shift_JIS lead is not 0x00,
// set Shift_JIS lead to 0x00 and return error.
if (bite === end_of_stream && Shift_JIS_lead !== 0x00) {
Shift_JIS_lead = 0x00;
return decoderError(fatal);
}
// 2. If byte is end-of-stream and Shift_JIS lead is 0x00,
// return finished.
if (bite === end_of_stream && Shift_JIS_lead === 0x00)
return finished;
// 3. If Shift_JIS lead is not 0x00, let lead be Shift_JIS lead,
// let pointer be null, set Shift_JIS lead to 0x00, and then run
// these substeps:
if (Shift_JIS_lead !== 0x00) {
var lead = Shift_JIS_lead;
var pointer = null;
Shift_JIS_lead = 0x00;
// 1. Let offset be 0x40, if byte is less than 0x7F, and 0x41
// otherwise.
var offset = (bite < 0x7F) ? 0x40 : 0x41;
// 2. Let lead offset be 0x81, if lead is less than 0xA0, and
// 0xC1 otherwise.
var lead_offset = (lead < 0xA0) ? 0x81 : 0xC1;
// 3. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
// to 0xFC, inclusive, set pointer to (lead − lead offset) ×
// 188 + byte − offset.
if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFC))
pointer = (lead - lead_offset) * 188 + bite - offset;
// 4. If pointer is in the range 8836 to 10715, inclusive,
// return a code point whose value is 0xE000 − 8836 + pointer.
if (inRange(pointer, 8836, 10715))
return 0xE000 - 8836 + pointer;
// 5. Let code point be null, if pointer is null, and the
// index code point for pointer in index jis0208 otherwise.
var code_point = (pointer === null) ? null :
indexCodePointFor(pointer, index('jis0208'));
// 6. If code point is null and byte is an ASCII byte, prepend
// byte to stream.
if (code_point === null && isASCIIByte(bite))
stream.prepend(bite);
// 7. If code point is null, return error.
if (code_point === null)
return decoderError(fatal);
// 8. Return a code point whose value is code point.
return code_point;
}
// 4. If byte is an ASCII byte or 0x80, return a code point
// whose value is byte.
if (isASCIIByte(bite) || bite === 0x80)
return bite;
// 5. If byte is in the range 0xA1 to 0xDF, inclusive, return a
// code point whose value is 0xFF61 − 0xA1 + byte.
if (inRange(bite, 0xA1, 0xDF))
return 0xFF61 - 0xA1 + bite;
// 6. If byte is in the range 0x81 to 0x9F, inclusive, or 0xE0
// to 0xFC, inclusive, set Shift_JIS lead to byte and return
// continue.
if (inRange(bite, 0x81, 0x9F) || inRange(bite, 0xE0, 0xFC)) {
Shift_JIS_lead = bite;
return null;
}
// 7. Return error.
return decoderError(fatal);
};
}
// 13.3.2 Shift_JIS encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
*/
function ShiftJISEncoder(options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point or U+0080, return a
// byte whose value is code point.
if (isASCIICodePoint(code_point) || code_point === 0x0080)
return code_point;
// 3. If code point is U+00A5, return byte 0x5C.
if (code_point === 0x00A5)
return 0x5C;
// 4. If code point is U+203E, return byte 0x7E.
if (code_point === 0x203E)
return 0x7E;
// 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
// return a byte whose value is code point − 0xFF61 + 0xA1.
if (inRange(code_point, 0xFF61, 0xFF9F))
return code_point - 0xFF61 + 0xA1;
// 6. If code point is U+2212, set it to U+FF0D.
if (code_point === 0x2212)
code_point = 0xFF0D;
// 7. Let pointer be the index Shift_JIS pointer for code point.
var pointer = indexShiftJISPointerFor(code_point);
// 8. If pointer is null, return error with code point.
if (pointer === null)
return encoderError(code_point);
// 9. Let lead be floor(pointer / 188).
var lead = floor(pointer / 188);
// 10. Let lead offset be 0x81, if lead is less than 0x1F, and
// 0xC1 otherwise.
var lead_offset = (lead < 0x1F) ? 0x81 : 0xC1;
// 11. Let trail be pointer % 188.
var trail = pointer % 188;
// 12. Let offset be 0x40, if trail is less than 0x3F, and 0x41
// otherwise.
var offset = (trail < 0x3F) ? 0x40 : 0x41;
// 13. Return two bytes whose values are lead + lead offset and
// trail + offset.
return [lead + lead_offset, trail + offset];
};
}
/** @param {{fatal: boolean}} options */
encoders['Shift_JIS'] = function(options) {
return new ShiftJISEncoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['Shift_JIS'] = function(options) {
return new ShiftJISDecoder(options);
};
//
// 14. Legacy multi-byte Korean encodings
//
// 14.1 euc-kr
// 14.1.1 euc-kr decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function EUCKRDecoder(options) {
var fatal = options.fatal;
// euc-kr's decoder has an associated euc-kr lead (initially 0x00).
var /** @type {number} */ euckr_lead = 0x00;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream and euc-kr lead is not 0x00, set
// euc-kr lead to 0x00 and return error.
if (bite === end_of_stream && euckr_lead !== 0) {
euckr_lead = 0x00;
return decoderError(fatal);
}
// 2. If byte is end-of-stream and euc-kr lead is 0x00, return
// finished.
if (bite === end_of_stream && euckr_lead === 0)
return finished;
// 3. If euc-kr lead is not 0x00, let lead be euc-kr lead, let
// pointer be null, set euc-kr lead to 0x00, and then run these
// substeps:
if (euckr_lead !== 0x00) {
var lead = euckr_lead;
var pointer = null;
euckr_lead = 0x00;
// 1. If byte is in the range 0x41 to 0xFE, inclusive, set
// pointer to (lead − 0x81) × 190 + (byte − 0x41).
if (inRange(bite, 0x41, 0xFE))
pointer = (lead - 0x81) * 190 + (bite - 0x41);
// 2. Let code point be null, if pointer is null, and the
// index code point for pointer in index euc-kr otherwise.
var code_point = (pointer === null)
? null : indexCodePointFor(pointer, index('euc-kr'));
// 3. If code point is null and byte is an ASCII byte, prepend
// byte to stream.
if (pointer === null && isASCIIByte(bite))
stream.prepend(bite);
// 4. If code point is null, return error.
if (code_point === null)
return decoderError(fatal);
// 5. Return a code point whose value is code point.
return code_point;
}
// 4. If byte is an ASCII byte, return a code point whose value
// is byte.
if (isASCIIByte(bite))
return bite;
// 5. If byte is in the range 0x81 to 0xFE, inclusive, set
// euc-kr lead to byte and return continue.
if (inRange(bite, 0x81, 0xFE)) {
euckr_lead = bite;
return null;
}
// 6. Return error.
return decoderError(fatal);
};
}
// 14.1.2 euc-kr encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
*/
function EUCKREncoder(options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point, return a byte whose
// value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 3. Let pointer be the index pointer for code point in index
// euc-kr.
var pointer = indexPointerFor(code_point, index('euc-kr'));
// 4. If pointer is null, return error with code point.
if (pointer === null)
return encoderError(code_point);
// 5. Let lead be floor(pointer / 190) + 0x81.
var lead = floor(pointer / 190) + 0x81;
// 6. Let trail be pointer % 190 + 0x41.
var trail = (pointer % 190) + 0x41;
// 7. Return two bytes whose values are lead and trail.
return [lead, trail];
};
}
/** @param {{fatal: boolean}} options */
encoders['EUC-KR'] = function(options) {
return new EUCKREncoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['EUC-KR'] = function(options) {
return new EUCKRDecoder(options);
};
//
// 15. Legacy miscellaneous encodings
//
// 15.1 replacement
// Not needed - API throws RangeError
// 15.2 Common infrastructure for utf-16be and utf-16le
/**
* @param {number} code_unit
* @param {boolean} utf16be
* @return {!Array.<number>} bytes
*/
function convertCodeUnitToBytes(code_unit, utf16be) {
// 1. Let byte1 be code unit >> 8.
var byte1 = code_unit >> 8;
// 2. Let byte2 be code unit & 0x00FF.
var byte2 = code_unit & 0x00FF;
// 3. Then return the bytes in order:
// utf-16be flag is set: byte1, then byte2.
if (utf16be)
return [byte1, byte2];
// utf-16be flag is unset: byte2, then byte1.
return [byte2, byte1];
}
// 15.2.1 shared utf-16 decoder
/**
* @constructor
* @implements {Decoder}
* @param {boolean} utf16_be True if big-endian, false if little-endian.
* @param {{fatal: boolean}} options
*/
function UTF16Decoder(utf16_be, options) {
var fatal = options.fatal;
var /** @type {?number} */ utf16_lead_byte = null,
/** @type {?number} */ utf16_lead_surrogate = null;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream and either utf-16 lead byte or
// utf-16 lead surrogate is not null, set utf-16 lead byte and
// utf-16 lead surrogate to null, and return error.
if (bite === end_of_stream && (utf16_lead_byte !== null ||
utf16_lead_surrogate !== null)) {
return decoderError(fatal);
}
// 2. If byte is end-of-stream and utf-16 lead byte and utf-16
// lead surrogate are null, return finished.
if (bite === end_of_stream && utf16_lead_byte === null &&
utf16_lead_surrogate === null) {
return finished;
}
// 3. If utf-16 lead byte is null, set utf-16 lead byte to byte
// and return continue.
if (utf16_lead_byte === null) {
utf16_lead_byte = bite;
return null;
}
// 4. Let code unit be the result of:
var code_unit;
if (utf16_be) {
// utf-16be decoder flag is set
// (utf-16 lead byte << 8) + byte.
code_unit = (utf16_lead_byte << 8) + bite;
} else {
// utf-16be decoder flag is unset
// (byte << 8) + utf-16 lead byte.
code_unit = (bite << 8) + utf16_lead_byte;
}
// Then set utf-16 lead byte to null.
utf16_lead_byte = null;
// 5. If utf-16 lead surrogate is not null, let lead surrogate
// be utf-16 lead surrogate, set utf-16 lead surrogate to null,
// and then run these substeps:
if (utf16_lead_surrogate !== null) {
var lead_surrogate = utf16_lead_surrogate;
utf16_lead_surrogate = null;
// 1. If code unit is in the range U+DC00 to U+DFFF,
// inclusive, return a code point whose value is 0x10000 +
// ((lead surrogate − 0xD800) << 10) + (code unit − 0xDC00).
if (inRange(code_unit, 0xDC00, 0xDFFF)) {
return 0x10000 + (lead_surrogate - 0xD800) * 0x400 +
(code_unit - 0xDC00);
}
// 2. Prepend the sequence resulting of converting code unit
// to bytes using utf-16be decoder flag to stream and return
// error.
stream.prepend(convertCodeUnitToBytes(code_unit, utf16_be));
return decoderError(fatal);
}
// 6. If code unit is in the range U+D800 to U+DBFF, inclusive,
// set utf-16 lead surrogate to code unit and return continue.
if (inRange(code_unit, 0xD800, 0xDBFF)) {
utf16_lead_surrogate = code_unit;
return null;
}
// 7. If code unit is in the range U+DC00 to U+DFFF, inclusive,
// return error.
if (inRange(code_unit, 0xDC00, 0xDFFF))
return decoderError(fatal);
// 8. Return code point code unit.
return code_unit;
};
}
// 15.2.2 shared utf-16 encoder
/**
* @constructor
* @implements {Encoder}
* @param {boolean} utf16_be True if big-endian, false if little-endian.
* @param {{fatal: boolean}} options
*/
function UTF16Encoder(utf16_be, options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1. If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is in the range U+0000 to U+FFFF, inclusive,
// return the sequence resulting of converting code point to
// bytes using utf-16be encoder flag.
if (inRange(code_point, 0x0000, 0xFFFF))
return convertCodeUnitToBytes(code_point, utf16_be);
// 3. Let lead be ((code point − 0x10000) >> 10) + 0xD800,
// converted to bytes using utf-16be encoder flag.
var lead = convertCodeUnitToBytes(
((code_point - 0x10000) >> 10) + 0xD800, utf16_be);
// 4. Let trail be ((code point − 0x10000) & 0x3FF) + 0xDC00,
// converted to bytes using utf-16be encoder flag.
var trail = convertCodeUnitToBytes(
((code_point - 0x10000) & 0x3FF) + 0xDC00, utf16_be);
// 5. Return a byte sequence of lead followed by trail.
return lead.concat(trail);
};
}
// 15.3 utf-16be
// 15.3.1 utf-16be decoder
/** @param {{fatal: boolean}} options */
encoders['UTF-16BE'] = function(options) {
return new UTF16Encoder(true, options);
};
// 15.3.2 utf-16be encoder
/** @param {{fatal: boolean}} options */
decoders['UTF-16BE'] = function(options) {
return new UTF16Decoder(true, options);
};
// 15.4 utf-16le
// 15.4.1 utf-16le decoder
/** @param {{fatal: boolean}} options */
encoders['UTF-16LE'] = function(options) {
return new UTF16Encoder(false, options);
};
// 15.4.2 utf-16le encoder
/** @param {{fatal: boolean}} options */
decoders['UTF-16LE'] = function(options) {
return new UTF16Decoder(false, options);
};
// 15.5 x-user-defined
// 15.5.1 x-user-defined decoder
/**
* @constructor
* @implements {Decoder}
* @param {{fatal: boolean}} options
*/
function XUserDefinedDecoder(options) {
var fatal = options.fatal;
/**
* @param {Stream} stream The stream of bytes being decoded.
* @param {number} bite The next byte read from the stream.
* @return {?(number|!Array.<number>)} The next code point(s)
* decoded, or null if not enough data exists in the input
* stream to decode a complete code point.
*/
this.handler = function(stream, bite) {
// 1. If byte is end-of-stream, return finished.
if (bite === end_of_stream)
return finished;
// 2. If byte is an ASCII byte, return a code point whose value
// is byte.
if (isASCIIByte(bite))
return bite;
// 3. Return a code point whose value is 0xF780 + byte − 0x80.
return 0xF780 + bite - 0x80;
};project
}
// 15.5.2 x-user-defined encoder
/**
* @constructor
* @implements {Encoder}
* @param {{fatal: boolean}} options
*/
function XUserDefinedEncoder(options) {
var fatal = options.fatal;
/**
* @param {Stream} stream Input stream.
* @param {number} code_point Next code point read from the stream.
* @return {(number|!Array.<number>)} Byte(s) to emit.
*/
this.handler = function(stream, code_point) {
// 1.If code point is end-of-stream, return finished.
if (code_point === end_of_stream)
return finished;
// 2. If code point is an ASCII code point, return a byte whose
// value is code point.
if (isASCIICodePoint(code_point))
return code_point;
// 3. If code point is in the range U+F780 to U+F7FF, inclusive,
// return a byte whose value is code point − 0xF780 + 0x80.
if (inRange(code_point, 0xF780, 0xF7FF))
return code_point - 0xF780 + 0x80;
// 4. Return error with code point.
return encoderError(code_point);
};
}
/** @param {{fatal: boolean}} options */
encoders['x-user-defined'] = function(options) {
return new XUserDefinedEncoder(options);
};
/** @param {{fatal: boolean}} options */
decoders['x-user-defined'] = function(options) {
return new XUserDefinedDecoder(options);
};
if (!global['TextEncoder'])
global['TextEncoder'] = TextEncoder;
if (!global['TextDecoder'])
global['TextDecoder'] = TextDecoder;
if (typeof module !== "undefined" && module.exports) {
module.exports = {
TextEncoder: global['TextEncoder'],
TextDecoder: global['TextDecoder'],
EncodingIndexes: global["encoding-indexes"]
};
}
// For strict environments where `this` inside the global scope
// is `undefined`, take a pure object instead
}(this || {}));(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
}
},{}],2:[function(require,module,exports){
module.exports = assert;
function assert(val, msg) {
if (!val)
throw new Error(msg || 'Assertion failed');
}
assert.equal = function assertEqual(l, r, msg) {
if (l != r)
throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
};
},{}],3:[function(require,module,exports){
var asn = require('asn1.js')
var crypto = require('crypto')
var BN = asn.bignum
var zero = new BN(0)
var one = new BN(1)
var two = new BN(2)
function rand(low, high) {
do {
var b = new BN(crypto.randomBytes(high.byteLength()))
} while(b.cmp(low) <= 0 || b.cmp(high) >= 0)
return b
}
function odd(n) {
if (n.cmp(zero) === 0) { return zero }
var r = n
while (r.isEven()) {
r = r.div(two)
}
return r
}
function rootOne(x, r, n) {
var i = x.toRed(BN.red(n)).redPow(r).fromRed()
var o = zero
while (i.cmp(one) !== 0) {
o = i
i = i.mul(i).mod(n)
}
if (o.cmp(n.sub(one)) === 0) {
return zero
}
return o
}
function factor(e, d, n) {
var k = e.mul(d).sub(one)
var r = odd(k)
do {
var y = rootOne(rand(two, n), r, n)
} while (y.cmp(zero) === 0)
var p = y.sub(one).gcd(n)
return {
p: p,
q: n.div(p)
}
}
module.exports = factor
},{"asn1.js":5,"crypto":74}],4:[function(require,module,exports){
(function (Buffer){
var asn = require('asn1.js')
var factor = require('./factor')
var one = new asn.bignum(1)
function urlize(base64) {
return base64.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=/g, '')
}
function hex2b64url(str) {
return urlize(Buffer(str, 'hex').toString('base64'))
}
function fromPEM(data) {
var text = data.toString().split(/(\r\n|\r|\n)+/g);
text = text.filter(function(line) {
return line.trim().length !== 0;
});
text = text.slice(1, -1).join('');
return new Buffer(text.replace(/[^\w\d\+\/=]+/g, ''), 'base64');
}
var RSAPublicKey = asn.define('RSAPublicKey', function () {
this.seq().obj(
this.key('n').int(),
this.key('e').int()
)
})
var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {
this.seq().obj(
this.key('algorithm').objid(),
this.key('parameters').optional().any()
)
})
var PublicKeyInfo = asn.define('PublicKeyInfo', function () {
this.seq().obj(
this.key('algorithm').use(AlgorithmIdentifier),
this.key('publicKey').bitstr()
)
})
var Version = asn.define('Version', function () {
this.int({
0: 'two-prime',
1: 'multi'
})
})
var OtherPrimeInfos = asn.define('OtherPrimeInfos', function () {
this.seq().obj(
this.key('ri').int(),
this.key('di').int(),
this.key('ti').int()
)
})
var RSAPrivateKey = asn.define('RSAPrivateKey', function () {
this.seq().obj(
this.key('version').use(Version),
this.key('n').int(),
this.key('e').int(),
this.key('d').int(),
this.key('p').int(),
this.key('q').int(),
this.key('dp').int(),
this.key('dq').int(),
this.key('qi').int(),
this.key('other').optional().use(OtherPrimeInfos)
)
})
var PrivateKeyInfo = asn.define('PrivateKeyInfo', function () {
this.seq().obj(
this.key('version').use(Version),
this.key('algorithm').use(AlgorithmIdentifier),
this.key('privateKey').bitstr()
)
})
const RSA_OID = '1.2.840.113549.1.1.1'
function addExtras(obj, extras) {
extras = extras || {}
Object.keys(extras).forEach(
function (key) {
obj[key] = extras[key]
}
)
return obj
}
function pad(hex) {
return (hex.length % 2 === 1) ? '0' + hex : hex
}
function decodeRsaPublic(buffer, extras) {
var key = RSAPublicKey.decode(buffer, 'der')
var e = pad(key.e.toString(16))
var jwk = {
kty: 'RSA',
n: bn2base64url(key.n),
e: hex2b64url(e)
}
return addExtras(jwk, extras)
}
function decodeRsaPrivate(buffer, extras) {
var key = RSAPrivateKey.decode(buffer, 'der')
var e = pad(key.e.toString(16))
var jwk = {
kty: 'RSA',
n: bn2base64url(key.n),
e: hex2b64url(e),
d: bn2base64url(key.d),
p: bn2base64url(key.p),
q: bn2base64url(key.q),
dp: bn2base64url(key.dp),
dq: bn2base64url(key.dq),
qi: bn2base64url(key.qi)
}
return addExtras(jwk, extras)
}
function decodePublic(buffer, extras) {
var info = PublicKeyInfo.decode(buffer, 'der')
return decodeRsaPublic(info.publicKey.data, extras)
}
function decodePrivate(buffer, extras) {
var info = PrivateKeyInfo.decode(buffer, 'der')
return decodeRsaPrivate(info.privateKey.data, extras)
}
function getDecoder(header) {
var match = /^-----BEGIN (RSA )?(PUBLIC|PRIVATE) KEY-----$/.exec(header)
if (!match) { return null }
var isRSA = !!(match[1])
var isPrivate = (match[2] === 'PRIVATE')
if (isPrivate) {
return isRSA ? decodeRsaPrivate : decodePrivate
}
else {
return isRSA ? decodeRsaPublic : decodePublic
}
}
function pem2jwk(pem, extras) {
var text = pem.toString().split(/(\r\n|\r|\n)+/g)
text = text.filter(function(line) {
return line.trim().length !== 0
});
var decoder = getDecoder(text[0])
text = text.slice(1, -1).join('')
return decoder(new Buffer(text.replace(/[^\w\d\+\/=]+/g, ''), 'base64'), extras)
}
function recomputePrimes(jwk) {
var pq = factor(jwk.e, jwk.d, jwk.n)
var p = pq.p
var q = pq.q
var dp = jwk.d.mod(p.sub(one))
var dq = jwk.d.mod(q.sub(one))
var qi = q.invm(p)
return {
n: jwk.n,
e: jwk.e,
d: jwk.d,
p: p,
q: q,
dp: dp,
dq: dq,
qi: qi
}
}
function parse(jwk) {
return {
n: string2bn(jwk.n),
e: string2bn(jwk.e),
d: jwk.d && string2bn(jwk.d),
p: jwk.p && string2bn(jwk.p),
q: jwk.q && string2bn(jwk.q),
dp: jwk.dp && string2bn(jwk.dp),
dq: jwk.dq && string2bn(jwk.dq),
qi: jwk.qi && string2bn(jwk.qi)
}
}
function jwk2pem(json) {
var jwk = parse(json)
var isPrivate = !!(jwk.d)
var t = isPrivate ? 'PRIVATE' : 'PUBLIC'
var header = '-----BEGIN RSA ' + t + ' KEY-----\n'
var footer = '\n-----END RSA ' + t + ' KEY-----\n'
var data = Buffer(0)
if (isPrivate) {
if (!jwk.p) {
jwk = recomputePrimes(jwk)
}
jwk.version = 'two-prime'
data = RSAPrivateKey.encode(jwk, 'der')
}
else {
data = RSAPublicKey.encode(jwk, 'der')
}
var body = data.toString('base64').match(/.{1,64}/g).join('\n')
return header + body + footer
}
function bn2base64url(bn) {
return hex2b64url(pad(bn.toString(16)))
}
function base64url2bn(str) {
return new asn.bignum(Buffer(str, 'base64'))
}
function string2bn(str) {
if (/^[0-9]+$/.test(str)) {
return new asn.bignum(str, 10)
}
return base64url2bn(str)
}
module.exports = {
pem2jwk: pem2jwk,
jwk2pem: jwk2pem,
BN: asn.bignum
}
}).call(this,require("buffer").Buffer)
},{"./factor":3,"asn1.js":5,"buffer":65}],5:[function(require,module,exports){
var asn1 = exports;
asn1.bignum = require('bn.js');
asn1.define = require('./asn1/api').define;
asn1.base = require('./asn1/base');
asn1.constants = require('./asn1/constants');
asn1.decoders = require('./asn1/decoders');
asn1.encoders = require('./asn1/encoders');
},{"./asn1/api":6,"./asn1/base":8,"./asn1/constants":12,"./asn1/decoders":14,"./asn1/encoders":16,"bn.js":17}],6:[function(require,module,exports){
var asn1 = require('../asn1');
var inherits = require('inherits');
var vm = require('vm');
var api = exports;
api.define = function define(name, body) {
return new Entity(name, body);
};
function Entity(name, body) {
this.name = name;
this.body = body;
this.decoders = {};
this.encoders = {};
};
Entity.prototype._createNamed = function createNamed(base) {
var named = vm.runInThisContext('(function ' + this.name + '(entity) {\n' +
' this._initNamed(entity);\n' +
'})');
inherits(named, base);
named.prototype._initNamed = function initnamed(entity) {
base.call(this, entity);
};
return new named(this);
};
Entity.prototype._getDecoder = function _getDecoder(enc) {
// Lazily create decoder
if (!this.decoders.hasOwnProperty(enc))
this.decoders[enc] = this._createNamed(asn1.decoders[enc]);
return this.decoders[enc];
};
Entity.prototype.decode = function decode(data, enc, options) {
return this._getDecoder(enc).decode(data, options);
};
Entity.prototype._getEncoder = function _getEncoder(enc) {
// Lazily create encoder
if (!this.encoders.hasOwnProperty(enc))
this.encoders[enc] = this._createNamed(asn1.encoders[enc]);
return this.encoders[enc];
};
Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
return this._getEncoder(enc).encode(data, reporter);
};
},{"../asn1":5,"inherits":1,"vm":172}],7:[function(require,module,exports){
var inherits = require('inherits');
var Reporter = require('../base').Reporter;
var Buffer = require('buffer').Buffer;
function DecoderBuffer(base, options) {
Reporter.call(this, options);
if (!Buffer.isBuffer(base)) {
this.error('Input not Buffer');
return;
}
this.base = base;
this.offset = 0;
this.length = base.length;
}
inherits(DecoderBuffer, Reporter);
exports.DecoderBuffer = DecoderBuffer;
DecoderBuffer.prototype.save = function save() {
return { offset: this.offset };
};
DecoderBuffer.prototype.restore = function restore(save) {
// Return skipped data
var res = new DecoderBuffer(this.base);
res.offset = save.offset;
res.length = this.offset;
this.offset = save.offset;
return res;
};
DecoderBuffer.prototype.isEmpty = function isEmpty() {
return this.offset === this.length;
};
DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
if (this.offset + 1 <= this.length)
return this.base.readUInt8(this.offset++, true);
else
return this.error(fail || 'DecoderBuffer overrun');
}
DecoderBuffer.prototype.skip = function skip(bytes, fail) {
if (!(this.offset + bytes <= this.length))
return this.error(fail || 'DecoderBuffer overrun');
var res = new DecoderBuffer(this.base);
// Share reporter state
res._reporterState = this._reporterState;
res.offset = this.offset;
res.length = this.offset + bytes;
this.offset += bytes;
return res;
}
DecoderBuffer.prototype.raw = function raw(save) {
return this.base.slice(save ? save.offset : this.offset, this.length);
}
function EncoderBuffer(value, reporter) {
if (Array.isArray(value)) {
this.length = 0;
this.value = value.map(function(item) {
if (!(item instanceof EncoderBuffer))
item = new EncoderBuffer(item, reporter);
this.length += item.length;
return item;
}, this);
} else if (typeof value === 'number') {
if (!(0 <= value && value <= 0xff))
return reporter.error('non-byte EncoderBuffer value');
this.value = value;
this.length = 1;
} else if (typeof value === 'string') {
this.value = value;
this.length = Buffer.byteLength(value);
} else if (Buffer.isBuffer(value)) {
this.value = value;
this.length = value.length;
} else {
return reporter.error('Unsupported type: ' + typeof value);
}
}
exports.EncoderBuffer = EncoderBuffer;
EncoderBuffer.prototype.join = function join(out, offset) {
if (!out)
out = new Buffer(this.length);
if (!offset)
offset = 0;
if (this.length === 0)
return out;
if (Array.isArray(this.value)) {
this.value.forEach(function(item) {
item.join(out, offset);
offset += item.length;
});
} else {
if (typeof this.value === 'number')
out[offset] = this.value;
else if (typeof this.value === 'string')
out.write(this.value, offset);
else if (Buffer.isBuffer(this.value))
this.value.copy(out, offset);
offset += this.length;
}
return out;
};
},{"../base":8,"buffer":65,"inherits":1}],8:[function(require,module,exports){
var base = exports;
base.Reporter = require('./reporter').Reporter;
base.DecoderBuffer = require('./buffer').DecoderBuffer;
base.EncoderBuffer = require('./buffer').EncoderBuffer;
base.Node = require('./node');
},{"./buffer":7,"./node":9,"./reporter":10}],9:[function(require,module,exports){
var Reporter = require('../base').Reporter;
var EncoderBuffer = require('../base').EncoderBuffer;
var assert = require('minimalistic-assert');
// Supported tags
var tags = [
'seq', 'seqof', 'set', 'setof', 'octstr', 'bitstr', 'objid', 'bool',
'gentime', 'utctime', 'null_', 'enum', 'int', 'ia5str'
];
// Public methods list
var methods = [
'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
'any'
].concat(tags);
// Overrided methods list
var overrided = [
'_peekTag', '_decodeTag', '_use',
'_decodeStr', '_decodeObjid', '_decodeTime',
'_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
'_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
'_encodeNull', '_encodeInt', '_encodeBool'
];
function Node(enc, parent) {
var state = {};
this._baseState = state;
state.enc = enc;
state.parent = parent || null;
state.children = null;
// State
state.tag = null;
state.args = null;
state.reverseArgs = null;
state.choice = null;
state.optional = false;
state.any = false;
state.obj = false;
state.use = null;
state.useDecoder = null;
state.key = null;
state['default'] = null;
state.explicit = null;
state.implicit = null;
// Should create new instance on each method
if (!state.parent) {
state.children = [];
this._wrap();
}
}
module.exports = Node;
var stateProps = [
'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
'implicit'
];
Node.prototype.clone = function clone() {
var state = this._baseState;
var cstate = {};
stateProps.forEach(function(prop) {
cstate[prop] = state[prop];
});
var res = new this.constructor(cstate.parent);
res._baseState = cstate;
return res;
};
Node.prototype._wrap = function wrap() {
var state = this._baseState;
methods.forEach(function(method) {
this[method] = function _wrappedMethod() {
var clone = new this.constructor(this);
state.children.push(clone);
return clone[method].apply(clone, arguments);
};
}, this);
};
Node.prototype._init = function init(body) {
var state = this._baseState;
assert(state.parent === null);
body.call(this);
// Filter children
state.children = state.children.filter(function(child) {
return child._baseState.parent === this;
}, this);
assert.equal(state.children.length, 1, 'Root node can have only one child');
};
Node.prototype._useArgs = function useArgs(args) {
var state = this._baseState;
// Filter children and args
var children = args.filter(function(arg) {
return arg instanceof this.constructor;
}, this);
args = args.filter(function(arg) {
return !(arg instanceof this.constructor);
}, this);
if (children.length !== 0) {
assert(state.children === null);
state.children = children;
// Replace parent to maintain backward link
children.forEach(function(child) {
child._baseState.parent = this;
}, this);
}
if (args.length !== 0) {
assert(state.args === null);
state.args = args;
state.reverseArgs = args.map(function(arg) {
if (typeof arg !== 'object' || arg.constructor !== Object)
return arg;
var res = {};
Object.keys(arg).forEach(function(key) {
if (key == (key | 0))
key |= 0;
var value = arg[key];
res[value] = key;
});
return res;
});
}
};
//
// Overrided methods
//
overrided.forEach(function(method) {
Node.prototype[method] = function _overrided() {
var state = this._baseState;
throw new Error(method + ' not implemented for encoding: ' + state.enc);
};
});
//
// Public methods
//
tags.forEach(function(tag) {
Node.prototype[tag] = function _tagMethod() {
var state = this._baseState;
var args = Array.prototype.slice.call(arguments);
assert(state.tag === null);
state.tag = tag;
this._useArgs(args);
return this;
};
});
Node.prototype.use = function use(item) {
var state = this._baseState;
assert(state.use === null);
state.use = item;
return this;
};
Node.prototype.optional = function optional() {
var state = this._baseState;
state.optional = true;
return this;
};
Node.prototype.def = function def(val) {
var state = this._baseState;
assert(state['default'] === null);
state['default'] = val;
state.optional = true;
return this;
};
Node.prototype.explicit = function explicit(num) {
var state = this._baseState;
assert(state.explicit === null && state.implicit === null);
state.explicit = num;
return this;
};
Node.prototype.implicit = function implicit(num) {
var state = this._baseState;
assert(state.explicit === null && state.implicit === null);
state.implicit = num;
return this;
};
Node.prototype.obj = function obj() {
var state = this._baseState;
var args = Array.prototype.slice.call(arguments);
state.obj = true;
if (args.length !== 0)
this._useArgs(args);
return this;
};
Node.prototype.key = function key(newKey) {
var state = this._baseState;
assert(state.key === null);
state.key = newKey;
return this;
};
Node.prototype.any = function any() {
var state = this._baseState;
state.any = true;
return this;
};
Node.prototype.choice = function choice(obj) {
var state = this._baseState;
assert(state.choice === null);
state.choice = obj;
this._useArgs(Object.keys(obj).map(function(key) {
return obj[key];
}));
return this;
};
//
// Decoding
//
Node.prototype._decode = function decode(input) {
var state = this._baseState;
// Decode root node
if (state.parent === null)
return input.wrapResult(state.children[0]._decode(input));
var result = state['default'];
var present = true;
var prevKey;
if (state.key !== null)
prevKey = input.enterKey(state.key);
// Check if tag is there
if (state.optional) {
present = this._peekTag(
input,
state.explicit !== null ? state.explicit :
state.implicit !== null ? state.implicit :
state.tag || 0
);
if (input.isError(present))
return present;
}
// Push object on stack
var prevObj;
if (state.obj && present)
prevObj = input.enterObject();
if (present) {
// Unwrap explicit values
if (state.explicit !== null) {
var explicit = this._decodeTag(input, state.explicit);
if (input.isError(explicit))
return explicit;
input = explicit;
}
// Unwrap implicit and normal values
if (state.use === null && state.choice === null) {
if (state.any)
var save = input.save();
var body = this._decodeTag(
input,
state.implicit !== null ? state.implicit : state.tag,
state.any
);
if (input.isError(body))
return body;
if (state.any)
result = input.raw(save);
else
input = body;
}
// Select proper method for tag
if (state.any)
result = result;
else if (state.choice === null)
result = this._decodeGeneric(state.tag, input);
else
result = this._decodeChoice(input);
if (input.isError(result))
return result;
// Decode children
if (!state.any && state.choice === null && state.children !== null) {
var fail = state.children.some(function decodeChildren(child) {
// NOTE: We are ignoring errors here, to let parser continue with other
// parts of encoded data
child._decode(input);
});
if (fail)
return err;
}
}
// Pop object
if (state.obj && present)
result = input.leaveObject(prevObj);
// Set key
if (state.key !== null && (result !== null || present === true))
input.leaveKey(prevKey, state.key, result);
return result;
};
Node.prototype._decodeGeneric = function decodeGeneric(tag, input) {
var state = this._baseState;
if (tag === 'seq' || tag === 'set')
return null;
if (tag === 'seqof' || tag === 'setof')
return this._decodeList(input, tag, state.args[0]);
else if (tag === 'octstr' || tag === 'bitstr' || tag === 'ia5str')
return this._decodeStr(input, tag);
else if (tag === 'objid' && state.args)
return this._decodeObjid(input, state.args[0], state.args[1]);
else if (tag === 'objid')
return this._decodeObjid(input, null, null);
else if (tag === 'gentime' || tag === 'utctime')
return this._decodeTime(input, tag);
else if (tag === 'null_')
return this._decodeNull(input);
else if (tag === 'bool')
return this._decodeBool(input);
else if (tag === 'int' || tag === 'enum')
return this._decodeInt(input, state.args && state.args[0]);
else if (state.use !== null)
return this._getUse(state.use, input._reporterState.obj)._decode(input);
else
return input.error('unknown tag: ' + tag);
return null;
};
Node.prototype._getUse = function _getUse(entity, obj) {
var state = this._baseState;
// Create altered use decoder if implicit is set
state.useDecoder = this._use(entity, obj);
assert(state.useDecoder._baseState.parent === null);
state.useDecoder = state.useDecoder._baseState.children[0];
if (state.implicit !== state.useDecoder._baseState.implicit) {
state.useDecoder = state.useDecoder.clone();
state.useDecoder._baseState.implicit = state.implicit;
}
return state.useDecoder;
};
Node.prototype._decodeChoice = function decodeChoice(input) {
var state = this._baseState;
var result = null;
var match = false;
Object.keys(state.choice).some(function(key) {
var save = input.save();
var node = state.choice[key];
try {
var value = node._decode(input);
if (input.isError(value))
return false;
result = { type: key, value: value };
match = true;
} catch (e) {
input.restore(save);
return false;
}
return true;
}, this);
if (!match)
return input.error('Choice not matched');
return result;
};
//
// Encoding
//
Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
return new EncoderBuffer(data, this.reporter);
};
Node.prototype._encode = function encode(data, reporter, parent) {
var state = this._baseState;
if (state['default'] !== null && state['default'] === data)
return;
var result = this._encodeValue(data, reporter, parent);
if (result === undefined)
return;
if (this._skipDefault(result, reporter, parent))
return;
return result;
};
Node.prototype._encodeValue = function encode(data, reporter, parent) {
var state = this._baseState;
// Decode root node
if (state.parent === null)
return state.children[0]._encode(data, reporter || new Reporter());
var result = null;
var present = true;
// Set reporter to share it with a child class
this.reporter = reporter;
// Check if data is there
if (state.optional && data === undefined) {
if (state['default'] !== null)
data = state['default']
else
return;
}
// For error reporting
var prevKey;
// Encode children first
var content = null;
var primitive = false;
if (state.any) {
// Anything that was given is translated to buffer
result = this._createEncoderBuffer(data);
} else if (state.choice) {
result = this._encodeChoice(data, reporter);
} else if (state.children) {
content = state.children.map(function(child) {
if (child._baseState.tag === 'null_')
return child._encode(null, reporter, data);
if (child._baseState.key === null)
return reporter.error('Child should have a key');
var prevKey = reporter.enterKey(child._baseState.key);
if (typeof data !== 'object')
return reporter.error('Child expected, but input is not object');
var res = child._encode(data[child._baseState.key], reporter, data);
reporter.leaveKey(prevKey);
return res;
}, this).filter(function(child) {
return child;
});
content = this._createEncoderBuffer(content);
} else {
if (state.tag === 'seqof' || state.tag === 'setof') {
// TODO(indutny): this should be thrown on DSL level
if (!(state.args && state.args.length === 1))
return reporter.error('Too many args for : ' + state.tag);
if (!Array.isArray(data))
return reporter.error('seqof/setof, but data is not Array');
var child = this.clone();
child._baseState.implicit = null;
content = this._createEncoderBuffer(data.map(function(item) {
var state = this._baseState;
return this._getUse(state.args[0], data)._encode(item, reporter);
}, child));
} else if (state.use !== null) {
result = this._getUse(state.use, parent)._encode(data, reporter);
} else {
content = this._encodePrimitive(state.tag, data);
primitive = true;
}
}
// Encode data itself
var result;
if (!state.any && state.choice === null) {
var tag = state.implicit !== null ? state.implicit : state.tag;
var cls = state.implicit === null ? 'universal' : 'context';
if (tag === null) {
if (state.use === null)
reporter.error('Tag could be ommited only for .use()');
} else {
if (state.use === null)
result = this._encodeComposite(tag, primitive, cls, content);
}
}
// Wrap in explicit
if (state.explicit !== null)
result = this._encodeComposite(state.explicit, false, 'context', result);
return result;
};
Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
var state = this._baseState;
var node = state.choice[data.type];
if (!node) {
assert(
false,
data.type + ' not found in ' +
JSON.stringify(Object.keys(state.choice)));
}
return node._encode(data.value, reporter);
};
Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
var state = this._baseState;
if (tag === 'octstr' || tag === 'bitstr' || tag === 'ia5str')
return this._encodeStr(data, tag);
else if (tag === 'objid' && state.args)
return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
else if (tag === 'objid')
return this._encodeObjid(data, null, null);
else if (tag === 'gentime' || tag === 'utctime')
return this._encodeTime(data, tag);
else if (tag === 'null_')
return this._encodeNull();
else if (tag === 'int' || tag === 'enum')
return this._encodeInt(data, state.args && state.reverseArgs[0]);
else if (tag === 'bool')
return this._encodeBool(data);
else
throw new Error('Unsupported tag: ' + tag);
};
},{"../base":8,"minimalistic-assert":2}],10:[function(require,module,exports){
var inherits = require('inherits');
function Reporter(options) {
this._reporterState = {
obj: null,
path: [],
options: options || {},
errors: []
};
}
exports.Reporter = Reporter;
Reporter.prototype.isError = function isError(obj) {
return obj instanceof ReporterError;
};
Reporter.prototype.enterKey = function enterKey(key) {
return this._reporterState.path.push(key);
};
Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
var state = this._reporterState;
state.path = state.path.slice(0, index - 1);
if (state.obj !== null)
state.obj[key] = value;
};
Reporter.prototype.enterObject = function enterObject() {
var state = this._reporterState;
var prev = state.obj;
state.obj = {};
return prev;
};
Reporter.prototype.leaveObject = function leaveObject(prev) {
var state = this._reporterState;
var now = state.obj;
state.obj = prev;
return now;
};
Reporter.prototype.error = function error(msg) {
var err;
var state = this._reporterState;
var inherited = msg instanceof ReporterError;
if (inherited) {
err = msg;
} else {
err = new ReporterError(state.path.map(function(elem) {
return '[' + JSON.stringify(elem) + ']';
}).join(''), msg.message || msg, msg.stack);
}
if (!state.options.partial)
throw err;
if (!inherited)
state.errors.push(err);
return err;
};
Reporter.prototype.wrapResult = function wrapResult(result) {
var state = this._reporterState;
if (!state.options.partial)
return result;
return {
result: this.isError(result) ? null : result,
errors: state.errors
};
};
function ReporterError(path, msg) {
this.path = path;
this.rethrow(msg);
};
inherits(ReporterError, Error);
ReporterError.prototype.rethrow = function rethrow(msg) {
this.message = msg + ' at: ' + (this.path || '(shallow)');
Error.captureStackTrace(this, ReporterError);
return this;
};
},{"inherits":1}],11:[function(require,module,exports){
var constants = require('../constants');
exports.tagClass = {
0: 'universal',
1: 'application',
2: 'context',
3: 'private'
};
exports.tagClassByName = constants._reverse(exports.tagClass);
exports.tag = {
0x00: 'end',
0x01: 'bool',
0x02: 'int',
0x03: 'bitstr',
0x04: 'octstr',
0x05: 'null_',
0x06: 'objid',
0x07: 'objDesc',
0x08: 'external',
0x09: 'real',
0x0a: 'enum',
0x0b: 'embed',
0x0c: 'utf8str',
0x0d: 'relativeOid',
0x10: 'seq',
0x11: 'set',
0x12: 'numstr',
0x13: 'printstr',
0x14: 't61str',
0x15: 'videostr',
0x16: 'ia5str',
0x17: 'utctime',
0x18: 'gentime',
0x19: 'graphstr',
0x1a: 'iso646str',
0x1b: 'genstr',
0x1c: 'unistr',
0x1d: 'charstr',
0x1e: 'bmpstr'
};
exports.tagByName = constants._reverse(exports.tag);
},{"../constants":12}],12:[function(require,module,exports){
var constants = exports;
// Helper
constants._reverse = function reverse(map) {
var res = {};
Object.keys(map).forEach(function(key) {
// Convert key to integer if it is stringified
if ((key | 0) == key)
key = key | 0;
var value = map[key];
res[value] = key;
});
return res;
};
constants.der = require('./der');
},{"./der":11}],13:[function(require,module,exports){
var inherits = require('inherits');
var asn1 = require('../../asn1');
var base = asn1.base;
var bignum = asn1.bignum;
// Import DER constants
var der = asn1.constants.der;
function DERDecoder(entity) {
this.enc = 'der';
this.name = entity.name;
this.entity = entity;
// Construct base tree
this.tree = new DERNode();
this.tree._init(entity.body);
};
module.exports = DERDecoder;
DERDecoder.prototype.decode = function decode(data, options) {
if (!(data instanceof base.DecoderBuffer))
data = new base.DecoderBuffer(data, options);
return this.tree._decode(data, options);
};
// Tree methods
function DERNode(parent) {
base.Node.call(this, 'der', parent);
}
inherits(DERNode, base.Node);
DERNode.prototype._peekTag = function peekTag(buffer, tag) {
if (buffer.isEmpty())
return false;
var state = buffer.save();
var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
if (buffer.isError(decodedTag))
return decodedTag;
buffer.restore(state);
return decodedTag.tag === tag || decodedTag.tagStr === tag;
};
DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
var decodedTag = derDecodeTag(buffer,
'Failed to decode tag of "' + tag + '"');
if (buffer.isError(decodedTag))
return decodedTag;
var len = derDecodeLen(buffer,
decodedTag.primitive,
'Failed to get length of "' + tag + '"');
// Failure
if (buffer.isError(len))
return len;
if (!any &&
decodedTag.tag !== tag &&
decodedTag.tagStr !== tag &&
decodedTag.tagStr + 'of' !== tag) {
return buffer.error('Failed to match tag: "' + tag + '"');
}
if (decodedTag.primitive || len !== null)
return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
// Indefinite length... find END tag
var state = buffer.start();
var res = this._skipUntilEnd(
buffer,
'Failed to skip indefinite length body: "' + this.tag + '"');
if (buffer.isError(res))
return res;
return buffer.cut(state);
};
DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
while (true) {
var tag = derDecodeTag(buffer, fail);
if (buffer.isError(tag))
return tag;
var len = derDecodeLen(buffer, tag.primitive, fail);
if (buffer.isError(len))
return len;
var res;
if (tag.primitive || len !== null)
res = buffer.skip(len)
else
res = this._skipUntilEnd(buffer, fail);
// Failure
if (buffer.isError(res))
return res;
if (tag.tagStr === 'end')
break;
}
};
DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder) {
var result = [];
while (!buffer.isEmpty()) {
var possibleEnd = this._peekTag(buffer, 'end');
if (buffer.isError(possibleEnd))
return possibleEnd;
var res = decoder.decode(buffer, 'der');
if (buffer.isError(res) && possibleEnd)
break;
result.push(res);
}
return result;
};
DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
if (tag === 'octstr') {
return buffer.raw();
} else if (tag === 'bitstr') {
var unused = buffer.readUInt8();
if (buffer.isError(unused))
return unused;
return { unused: unused, data: buffer.raw() };
} else if (tag === 'ia5str') {
return buffer.raw().toString();
} else {
return this.error('Decoding of string type: ' + tag + ' unsupported');
}
};
DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
var identifiers = [];
var ident = 0;
while (!buffer.isEmpty()) {
var subident = buffer.readUInt8();
ident <<= 7;
ident |= subident & 0x7f;
if ((subident & 0x80) === 0) {
identifiers.push(ident);
ident = 0;
}
}
if (subident & 0x80)
identifiers.push(ident);
var first = (identifiers[0] / 40) | 0;
var second = identifiers[0] % 40;
if (relative)
result = identifiers;
else
result = [first, second].concat(identifiers.slice(1));
if (values)
result = values[result.join(' ')];
return result;
};
DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
var str = buffer.raw().toString();
if (tag === 'gentime') {
var year = str.slice(0, 4) | 0;
var mon = str.slice(4, 6) | 0;
var day = str.slice(6, 8) | 0;
var hour = str.slice(8, 10) | 0;
var min = str.slice(10, 12) | 0;
var sec = str.slice(12, 14) | 0;
} else if (tag === 'utctime') {
var year = str.slice(0, 2) | 0;
var mon = str.slice(2, 4) | 0;
var day = str.slice(4, 6) | 0;
var hour = str.slice(6, 8) | 0;
var min = str.slice(8, 10) | 0;
var sec = str.slice(10, 12) | 0;
if (year < 70)
year = 2000 + year;
else
year = 1900 + year;
} else {
return this.error('Decoding ' + tag + ' time is not supported yet');
}
return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
};
DERNode.prototype._decodeNull = function decodeNull(buffer) {
return null;
};
DERNode.prototype._decodeBool = function decodeBool(buffer) {
var res = buffer.readUInt8();
if (buffer.isError(res))
return res;
else
return res !== 0;
};
DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
var res = 0;
// Bigint, return as it is (assume big endian)
var raw = buffer.raw();
if (raw.length > 3)
return new bignum(raw);
while (!buffer.isEmpty()) {
res <<= 8;
var i = buffer.readUInt8();
if (buffer.isError(i))
return i;
res |= i;
}
if (values)
res = values[res] || res;
return res;
};
DERNode.prototype._use = function use(entity, obj) {
if (typeof entity === 'function')
entity = entity(obj);
return entity._getDecoder('der').tree;
};
// Utility methods
function derDecodeTag(buf, fail) {
var tag = buf.readUInt8(fail);
if (buf.isError(tag))
return tag;
var cls = der.tagClass[tag >> 6];
var primitive = (tag & 0x20) === 0;
// Multi-octet tag - load
if ((tag & 0x1f) === 0x1f) {
var oct = tag;
tag = 0;
while ((oct & 0x80) === 0x80) {
oct = buf.readUInt8(fail);
if (buf.isError(oct))
return oct;
tag <<= 7;
tag |= oct & 0x7f;
}
} else {
tag &= 0x1f;
}
var tagStr = der.tag[tag];
return {
cls: cls,
primitive: primitive,
tag: tag,
tagStr: tagStr
};
}
function derDecodeLen(buf, primitive, fail) {
var len = buf.readUInt8(fail);
if (buf.isError(len))
return len;
// Indefinite form
if (!primitive && len === 0x80)
return null;
// Definite form
if ((len & 0x80) === 0) {
// Short form
return len;
}
// Long form
var num = len & 0x7f;
if (num >= 4)
return buf.error('length octect is too long');
len = 0;
for (var i = 0; i < num; i++) {
len <<= 8;
var j = buf.readUInt8(fail);
if (buf.isError(j))
return j;
len |= j;
}
return len;
}
},{"../../asn1":5,"inherits":1}],14:[function(require,module,exports){
var decoders = exports;
decoders.der = require('./der');
},{"./der":13}],15:[function(require,module,exports){
var inherits = require('inherits');
var Buffer = require('buffer').Buffer;
var asn1 = require('../../asn1');
var base = asn1.base;
var bignum = asn1.bignum;
// Import DER constants
var der = asn1.constants.der;
function DEREncoder(entity) {
this.enc = 'der';
this.name = entity.name;
this.entity = entity;
// Construct base tree
this.tree = new DERNode();
this.tree._init(entity.body);
};
module.exports = DEREncoder;
DEREncoder.prototype.encode = function encode(data, reporter) {
return this.tree._encode(data, reporter).join();
};
// Tree methods
function DERNode(parent) {
base.Node.call(this, 'der', parent);
}
inherits(DERNode, base.Node);
DERNode.prototype._encodeComposite = function encodeComposite(tag,
primitive,
cls,
content) {
var encodedTag = encodeTag(tag, primitive, cls, this.reporter);
// Short form
if (content.length < 0x80) {
var header = new Buffer(2);
header[0] = encodedTag;
header[1] = content.length;
return this._createEncoderBuffer([ header, content ]);
}
// Long form
// Count octets required to store length
var lenOctets = 1;
for (var i = content.length; i >= 0x100; i >>= 8)
lenOctets++;
var header = new Buffer(1 + 1 + lenOctets);
header[0] = encodedTag;
header[1] = 0x80 | lenOctets;
for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
header[i] = j & 0xff;
return this._createEncoderBuffer([ header, content ]);
};
DERNode.prototype._encodeStr = function encodeStr(str, tag) {
if (tag === 'octstr')
return this._createEncoderBuffer(str);
else if (tag === 'bitstr')
return this._createEncoderBuffer([ str.unused | 0, str.data ]);
else if (tag === 'ia5str')
return this._createEncoderBuffer(str);
return this.reporter.error('Encoding of string type: ' + tag +
' unsupported');
};
DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
if (typeof id === 'string') {
if (!values)
return this.reporter.error('string objid given, but no values map found');
if (!values.hasOwnProperty(id))
return this.reporter.error('objid not found in values map');
id = values[id].split(/\s+/g);
for (var i = 0; i < id.length; i++)
id[i] |= 0;
} else if (Array.isArray(id)) {
id = id.slice();
}
if (!Array.isArray(id)) {
return this.reporter.error('objid() should be either array or string, ' +
'got: ' + JSON.stringify(id));
}
if (!relative) {
if (id[1] >= 40)
return this.reporter.error('Second objid identifier OOB');
id.splice(0, 2, id[0] * 40 + id[1]);
}
// Count number of octets
var size = 0;
for (var i = 0; i < id.length; i++) {
var ident = id[i];
for (size++; ident >= 0x80; ident >>= 7)
size++;
}
var objid = new Buffer(size);
var offset = objid.length - 1;
for (var i = id.length - 1; i >= 0; i--) {
var ident = id[i];
objid[offset--] = ident & 0x7f;
while ((ident >>= 7) > 0)
objid[offset--] = 0x80 | (ident & 0x7f);
}
return this._createEncoderBuffer(objid);
};
function two(num) {
if (num <= 10)
return '0' + num;
else
return num;
}
DERNode.prototype._encodeTime = function encodeTime(time, tag) {
var str;
var date = new Date(time);
if (tag === 'gentime') {
str = [
date.getFullYear(),
two(date.getUTCMonth() + 1),
two(date.getUTCDate()),
two(date.getUTCHours()),
two(date.getUTCMinutes()),
two(date.getUTCSeconds()),
'Z'
].join('');
} else if (tag === 'utctime') {
str = [
date.getFullYear() % 100,
two(date.getUTCMonth() + 1),
two(date.getUTCDate()),
two(date.getUTCHours()),
two(date.getUTCMinutes()),
two(date.getUTCSeconds()),
'Z'
].join('');
} else {
this.reporter.error('Encoding ' + tag + ' time is not supported yet');
}
return this._encodeStr(str, 'octstr');
};
DERNode.prototype._encodeNull = function encodeNull() {
return this._createEncoderBuffer('');
};
DERNode.prototype._encodeInt = function encodeInt(num, values) {
if (typeof num === 'string') {
if (!values)
return this.reporter.error('String int or enum given, but no values map');
if (!values.hasOwnProperty(num)) {
return this.reporter.error('Values map doesn\'t contain: ' +
JSON.stringify(num));
}
num = values[num];
}
// Bignum, assume big endian
if (bignum !== null && num instanceof bignum) {
var numArray = num.toArray();
if(num.sign === false && numArray[0] & 0x80) {
numArray.unshift(0);
}
num = new Buffer(numArray);
}
if (Buffer.isBuffer(num)) {
var size = num.length;
if (num.length === 0)
size++;
var out = new Buffer(size);
num.copy(out);
if (num.length === 0)
out[0] = 0
return this._createEncoderBuffer(out);
}
if (num < 0x80)
return this._createEncoderBuffer(num);
if (num < 0x100)
return this._createEncoderBuffer([0, num]);
var size = 1;
for (var i = num; i >= 0x100; i >>= 8)
size++;
var out = new Array(size);
for (var i = out.length - 1; i >= 0; i--) {
out[i] = num & 0xff;
num >>= 8;
}
if(out[0] & 0x80) {
out.unshift(0);
}
return this._createEncoderBuffer(new Buffer(out));
};
DERNode.prototype._encodeBool = function encodeBool(value) {
return this._createEncoderBuffer(value ? 0xff : 0);
};
DERNode.prototype._use = function use(entity, obj) {
if (typeof entity === 'function')
entity = entity(obj);
return entity._getEncoder('der').tree;
};
DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
var state = this._baseState;
var i;
if (state['default'] === null)
return false;
var data = dataBuffer.join();
if (state.defaultBuffer === undefined)
state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
if (data.length !== state.defaultBuffer.length)
return false;
for (i=0; i < data.length; i++)
if (data[i] !== state.defaultBuffer[i])
return false;
return true;
};
// Utility methods
function encodeTag(tag, primitive, cls, reporter) {
var res;
if (tag === 'seqof')
tag = 'seq';
else if (tag === 'setof')
tag = 'set';
if (der.tagByName.hasOwnProperty(tag))
res = der.tagByName[tag];
else if (typeof tag === 'number' && (tag | 0) === tag)
res = tag;
else
return reporter.error('Unknown tag: ' + tag);
if (res >= 0x1f)
return reporter.error('Multi-octet tag encoding unsupported');
if (!primitive)
res |= 0x20;
res |= (der.tagClassByName[cls || 'universal'] << 6);
return res;
}
},{"../../asn1":5,"buffer":65,"inherits":1}],16:[function(require,module,exports){
var encoders = exports;
encoders.der = require('./der');
},{"./der":15}],17:[function(require,module,exports){
(function(module, exports) {
'use strict';
// Utils
function assert(val, msg) {
if (!val)
throw new Error(msg || 'Assertion failed');
}
// Could use `inherits` module, but don't want to move from single file
// architecture yet.
function inherits(ctor, superCtor) {
ctor.super_ = superCtor;
var TempCtor = function () {};
TempCtor.prototype = superCtor.prototype;
ctor.prototype = new TempCtor();
ctor.prototype.constructor = ctor;
}
// BN
function BN(number, base, endian) {
// May be `new BN(bn)` ?
if (number !== null &&
typeof number === 'object' &&
Array.isArray(number.words)) {
return number;
}
this.sign = false;
this.words = null;
this.length = 0;
// Reduction context
this.red = null;
if (base === 'le' || base === 'be') {
endian = base;
base = 10;
}
if (number !== null)
this._init(number || 0, base || 10, endian || 'be');
}
if (typeof module === 'object')
module.exports = BN;
else
exports.BN = BN;
BN.BN = BN;
BN.wordSize = 26;
BN.prototype._init = function init(number, base, endian) {
if (typeof number === 'number') {
if (number < 0) {
this.sign = true;
number = -number;
}
if (number < 0x4000000) {
this.words = [ number & 0x3ffffff ];
this.length = 1;
} else {
this.words = [
number & 0x3ffffff,
(number / 0x4000000) & 0x3ffffff
];
this.length = 2;
}
return;
} else if (typeof number === 'object') {
return this._initArray(number, base, endian);
}
if (base === 'hex')
base = 16;
assert(base === (base | 0) && base >= 2 && base <= 36);
number = number.toString().replace(/\s+/g, '');
var start = 0;
if (number[0] === '-')
start++;
if (base === 16)
this._parseHex(number, start);
else
this._parseBase(number, base, start);
if (number[0] === '-')
this.sign = true;
this.strip();
};
BN.prototype._initArray = function _initArray(number, base, endian) {
// Perhaps a Uint8Array
assert(typeof number.length === 'number');
this.length = Math.ceil(number.length / 3);
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++)
this.words[i] = 0;
var off = 0;
if (endian === 'be') {
for (var i = number.length - 1, j = 0; i >= 0; i -= 3) {
var w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
this.words[j] |= (w << off) & 0x3ffffff;
this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
off += 24;
if (off >= 26) {
off -= 26;
j++;
}
}
} else if (endian === 'le') {
for (var i = 0, j = 0; i < number.length; i += 3) {
var w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
this.words[j] |= (w << off) & 0x3ffffff;
this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
off += 24;
if (off >= 26) {
off -= 26;
j++;
}
}
}
return this.strip();
};
function parseHex(str, start, end) {
var r = 0;
var len = Math.min(str.length, end);
for (var i = start; i < len; i++) {
var c = str.charCodeAt(i) - 48;
r <<= 4;
// 'a' - 'f'
if (c >= 49 && c <= 54)
r |= c - 49 + 0xa;
// 'A' - 'F'
else if (c >= 17 && c <= 22)
r |= c - 17 + 0xa;
// '0' - '9'
else
r |= c & 0xf;
}
return r;
}
BN.prototype._parseHex = function _parseHex(number, start) {
// Create possibly bigger array to ensure that it fits the number
this.length = Math.ceil((number.length - start) / 6);
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++)
this.words[i] = 0;
// Scan 24-bit chunks and add them to the number
var off = 0;
for (var i = number.length - 6, j = 0; i >= start; i -= 6) {
var w = parseHex(number, i, i + 6);
this.words[j] |= (w << off) & 0x3ffffff;
this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
off += 24;
if (off >= 26) {
off -= 26;
j++;
}
}
if (i + 6 !== start) {
var w = parseHex(number, start, i + 6);
this.words[j] |= (w << off) & 0x3ffffff;
this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
}
this.strip();
};
function parseBase(str, start, end, mul) {
var r = 0;
var len = Math.min(str.length, end);
for (var i = start; i < len; i++) {
var c = str.charCodeAt(i) - 48;
r *= mul;
// 'a'
if (c >= 49)
r += c - 49 + 0xa;
// 'A'
else if (c >= 17)
r += c - 17 + 0xa;
// '0' - '9'
else
r += c;
}
return r;
}
BN.prototype._parseBase = function _parseBase(number, base, start) {
// Initialize as zero
this.words = [ 0 ];
this.length = 1;
// Find length of limb in base
for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base)
limbLen++;
limbLen--;
limbPow = (limbPow / base) | 0;
var total = number.length - start;
var mod = total % limbLen;
var end = Math.min(total, total - mod) + start;
var word = 0;
for (var i = start; i < end; i += limbLen) {
word = parseBase(number, i, i + limbLen, base);
this.imuln(limbPow);
if (this.words[0] + word < 0x4000000)
this.words[0] += word;
else
this._iaddn(word);
}
if (mod !== 0) {
var pow = 1;
var word = parseBase(number, i, number.length, base);
for (var i = 0; i < mod; i++)
pow *= base;
this.imuln(pow);
if (this.words[0] + word < 0x4000000)
this.words[0] += word;
else
this._iaddn(word);
}
};
BN.prototype.copy = function copy(dest) {
dest.words = new Array(this.length);
for (var i = 0; i < this.length; i++)
dest.words[i] = this.words[i];
dest.length = this.length;
dest.sign = this.sign;
dest.red = this.red;
};
BN.prototype.clone = function clone() {
var r = new BN(null);
this.copy(r);
return r;
};
// Remove leading `0` from `this`
BN.prototype.strip = function strip() {
while (this.length > 1 && this.words[this.length - 1] === 0)
this.length--;
return this._normSign();
};
BN.prototype._normSign = function _normSign() {
// -0 = 0
if (this.length === 1 && this.words[0] === 0)
this.sign = false;
return this;
};
BN.prototype.inspect = function inspect() {
return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
};
/*
var zeros = [];
var groupSizes = [];
var groupBases = [];
var s = '';
var i = -1;
while (++i < BN.wordSize) {
zeros[i] = s;
s += '0';
}
groupSizes[0] = 0;
groupSizes[1] = 0;
groupBases[0] = 0;
groupBases[1] = 0;
var base = 2 - 1;
while (++base < 36 + 1) {
var groupSize = 0;
var groupBase = 1;
while (groupBase < (1 << BN.wordSize) / base) {
groupBase *= base;
groupSize += 1;
}
groupSizes[base] = groupSize;
groupBases[base] = groupBase;
}
*/
var zeros = [
'',
'0',
'00',
'000',
'0000',
'00000',
'000000',
'0000000',
'00000000',
'000000000',
'0000000000',
'00000000000',
'000000000000',
'0000000000000',
'00000000000000',
'000000000000000',
'0000000000000000',
'00000000000000000',
'000000000000000000',
'0000000000000000000',
'00000000000000000000',
'000000000000000000000',
'0000000000000000000000',
'00000000000000000000000',
'000000000000000000000000',
'0000000000000000000000000'
];
var groupSizes = [
0, 0,
25, 16, 12, 11, 10, 9, 8,
8, 7, 7, 7, 7, 6, 6,
6, 6, 6, 6, 6, 5, 5,
5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5
];
var groupBases = [
0, 0,
33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
];
BN.prototype.toString = function toString(base, padding) {
base = base || 10;
if (base === 16 || base === 'hex') {
var out = '';
var off = 0;
var padding = padding | 0 || 1;
var carry = 0;
for (var i = 0; i < this.length; i++) {
var w = this.words[i];
var word = (((w << off) | carry) & 0xffffff).toString(16);
carry = (w >>> (24 - off)) & 0xffffff;
if (carry !== 0 || i !== this.length - 1)
out = zeros[6 - word.length] + word + out;
else
out = word + out;
off += 2;
if (off >= 26) {
off -= 26;
i--;
}
}
if (carry !== 0)
out = carry.toString(16) + out;
while (out.length % padding !== 0)
out = '0' + out;
if (this.sign)
out = '-' + out;
return out;
} else if (base === (base | 0) && base >= 2 && base <= 36) {
// var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
var groupSize = groupSizes[base];
// var groupBase = Math.pow(base, groupSize);
var groupBase = groupBases[base];
var out = '';
var c = this.clone();
c.sign = false;
while (c.cmpn(0) !== 0) {
var r = c.modn(groupBase).toString(base);
c = c.idivn(groupBase);
if (c.cmpn(0) !== 0)
out = zeros[groupSize - r.length] + r + out;
else
out = r + out;
}
if (this.cmpn(0) === 0)
out = '0' + out;
if (this.sign)
out = '-' + out;
return out;
} else {
assert(false, 'Base should be between 2 and 36');
}
};
BN.prototype.toJSON = function toJSON() {
return this.toString(16);
};
BN.prototype.toArray = function toArray() {
this.strip();
var res = new Array(this.byteLength());
res[0] = 0;
var q = this.clone();
for (var i = 0; q.cmpn(0) !== 0; i++) {
var b = q.andln(0xff);
q.ishrn(8);
// Assume big-endian
res[res.length - i - 1] = b;
}
return res;
};
/*
function genCountBits(bits) {
var arr = [];
for (var i = bits - 1; i >= 0; i--) {
var bit = '0x' + (1 << i).toString(16);
arr.push('w >= ' + bit + ' ? ' + (i + 1));
}
return new Function('w', 'return ' + arr.join(' :\n') + ' :\n0;');
};
BN.prototype._countBits = genCountBits(26);
*/
// Sadly chrome apps could not contain `new Function()` calls
BN.prototype._countBits = function _countBits(w) {
return w >= 0x2000000 ? 26 :
w >= 0x1000000 ? 25 :
w >= 0x800000 ? 24 :
w >= 0x400000 ? 23 :
w >= 0x200000 ? 22 :
w >= 0x100000 ? 21 :
w >= 0x80000 ? 20 :
w >= 0x40000 ? 19 :
w >= 0x20000 ? 18 :
w >= 0x10000 ? 17 :
w >= 0x8000 ? 16 :
w >= 0x4000 ? 15 :
w >= 0x2000 ? 14 :
w >= 0x1000 ? 13 :
w >= 0x800 ? 12 :
w >= 0x400 ? 11 :
w >= 0x200 ? 10 :
w >= 0x100 ? 9 :
w >= 0x80 ? 8 :
w >= 0x40 ? 7 :
w >= 0x20 ? 6 :
w >= 0x10 ? 5 :
w >= 0x8 ? 4 :
w >= 0x4 ? 3 :
w >= 0x2 ? 2 :
w >= 0x1 ? 1 :
0;
};
// Return number of used bits in a BN
BN.prototype.bitLength = function bitLength() {
var hi = 0;
var w = this.words[this.length - 1];
var hi = this._countBits(w);
return (this.length - 1) * 26 + hi;
};
BN.prototype.byteLength = function byteLength() {
return Math.ceil(this.bitLength() / 8);
};
// Return negative clone of `this`
BN.prototype.neg = function neg() {
if (this.cmpn(0) === 0)
return this.clone();
var r = this.clone();
r.sign = !this.sign;
return r;
};
// Or `num` with `this` in-place
BN.prototype.ior = function ior(num) {
this.sign = this.sign || num.sign;
while (this.length < num.length)
this.words[this.length++] = 0;
for (var i = 0; i < num.length; i++)
this.words[i] = this.words[i] | num.words[i];
return this.strip();
};
// Or `num` with `this`
BN.prototype.or = function or(num) {
if (this.length > num.length)
return this.clone().ior(num);
else
return num.clone().ior(this);
};
// And `num` with `this` in-place
BN.prototype.iand = function iand(num) {
this.sign = this.sign && num.sign;
// b = min-length(num, this)
var b;
if (this.length > num.length)
b = num;
else
b = this;
for (var i = 0; i < b.length; i++)
this.words[i] = this.words[i] & num.words[i];
this.length = b.length;
return this.strip();
};
// And `num` with `this`
BN.prototype.and = function and(num) {
if (this.length > num.length)
return this.clone().iand(num);
else
return num.clone().iand(this);
};
// Xor `num` with `this` in-place
BN.prototype.ixor = function ixor(num) {
this.sign = this.sign || num.sign;
// a.length > b.length
var a;
var b;
if (this.length > num.length) {
a = this;
b = num;
} else {
a = num;
b = this;
}
for (var i = 0; i < b.length; i++)
this.words[i] = a.words[i] ^ b.words[i];
if (this !== a)
for (; i < a.length; i++)
this.words[i] = a.words[i];
this.length = a.length;
return this.strip();
};
// Xor `num` with `this`
BN.prototype.xor = function xor(num) {
if (this.length > num.length)
return this.clone().ixor(num);
else
return num.clone().ixor(this);
};
// Set `bit` of `this`
BN.prototype.setn = function setn(bit, val) {
assert(typeof bit === 'number' && bit >= 0);
var off = (bit / 26) | 0;
var wbit = bit % 26;
while (this.length <= off)
this.words[this.length++] = 0;
if (val)
this.words[off] = this.words[off] | (1 << wbit);
else
this.words[off] = this.words[off] & ~(1 << wbit);
return this.strip();
};
// Add `num` to `this` in-place
BN.prototype.iadd = function iadd(num) {
// negative + positive
if (this.sign && !num.sign) {
this.sign = false;
var r = this.isub(num);
this.sign = !this.sign;
return this._normSign();
// positive + negative
} else if (!this.sign && num.sign) {
num.sign = false;
var r = this.isub(num);
num.sign = true;
return r._normSign();
}
// a.length > b.length
var a;
var b;
if (this.length > num.length) {
a = this;
b = num;
} else {
a = num;
b = this;
}
var carry = 0;
for (var i = 0; i < b.length; i++) {
var r = a.words[i] + b.words[i] + carry;
this.words[i] = r & 0x3ffffff;
carry = r >>> 26;
}
for (; carry !== 0 && i < a.length; i++) {
var r = a.words[i] + carry;
this.words[i] = r & 0x3ffffff;
carry = r >>> 26;
}
this.length = a.length;
if (carry !== 0) {
this.words[this.length] = carry;
this.length++;
// Copy the rest of the words
} else if (a !== this) {
for (; i < a.length; i++)
this.words[i] = a.words[i];
}
return this;
};
// Add `num` to `this`
BN.prototype.add = function add(num) {
if (num.sign && !this.sign) {
num.sign = false;
var res = this.sub(num);
num.sign = true;
return res;
} else if (!num.sign && this.sign) {
this.sign = false;
var res = num.sub(this);
this.sign = true;
return res;
}
if (this.length > num.length)
return this.clone().iadd(num);
else
return num.clone().iadd(this);
};
// Subtract `num` from `this` in-place
BN.prototype.isub = function isub(num) {
// this - (-num) = this + num
if (num.sign) {
num.sign = false;
var r = this.iadd(num);
num.sign = true;
return r._normSign();
// -this - num = -(this + num)
} else if (this.sign) {
this.sign = false;
this.iadd(num);
this.sign = true;
return this._normSign();
}
// At this point both numbers are positive
var cmp = this.cmp(num);
// Optimization - zeroify
if (cmp === 0) {
this.sign = false;
this.length = 1;
this.words[0] = 0;
return this;
}
// a > b
var a;
var b;
if (cmp > 0) {
a = this;
b = num;
} else {
a = num;
b = this;
}
var carry = 0;
for (var i = 0; i < b.length; i++) {
var r = a.words[i] - b.words[i] + carry;
carry = r >> 26;
this.words[i] = r & 0x3ffffff;
}
for (; carry !== 0 && i < a.length; i++) {
var r = a.words[i] + carry;
carry = r >> 26;
this.words[i] = r & 0x3ffffff;
}
// Copy rest of the words
if (carry === 0 && i < a.length && a !== this)
for (; i < a.length; i++)
this.words[i] = a.words[i];
this.length = Math.max(this.length, i);
if (a !== this)
this.sign = true;
return this.strip();
};
// Subtract `num` from `this`
BN.prototype.sub = function sub(num) {
return this.clone().isub(num);
};
/*
// NOTE: This could be potentionally used to generate loop-less multiplications
function _genCombMulTo(alen, blen) {
var len = alen + blen - 1;
var src = [
'var a = this.words, b = num.words, o = out.words, c = 0, w, ' +
'mask = 0x3ffffff, shift = 0x4000000;',
'out.length = ' + len + ';'
];
for (var k = 0; k < len; k++) {
var minJ = Math.max(0, k - alen + 1);
var maxJ = Math.min(k, blen - 1);
for (var j = minJ; j <= maxJ; j++) {
var i = k - j;
var mul = 'a[' + i + '] * b[' + j + ']';
if (j === minJ) {
src.push('w = ' + mul + ' + c;');
src.push('c = (w / shift) | 0;');
} else {
src.push('w += ' + mul + ';');
src.push('c += (w / shift) | 0;');
}
src.push('w &= mask;');
}
src.push('o[' + k + '] = w;');
}
src.push('if (c !== 0) {',
' o[' + k + '] = c;',
' out.length++;',
'}',
'return out;');
return src.join('\n');
}
*/
BN.prototype._smallMulTo = function _smallMulTo(num, out) {
out.sign = num.sign !== this.sign;
out.length = this.length + num.length;
var carry = 0;
for (var k = 0; k < out.length - 1; k++) {
// Sum all words with the same `i + j = k` and accumulate `ncarry`,
// note that ncarry could be >= 0x3ffffff
var ncarry = carry >>> 26;
var rword = carry & 0x3ffffff;
var maxJ = Math.min(k, num.length - 1);
for (var j = Math.max(0, k - this.length + 1); j <= maxJ; j++) {
var i = k - j;
var a = this.words[i] | 0;
var b = num.words[j] | 0;
var r = a * b;
var lo = r & 0x3ffffff;
ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
lo = (lo + rword) | 0;
rword = lo & 0x3ffffff;
ncarry = (ncarry + (lo >>> 26)) | 0;
}
out.words[k] = rword;
carry = ncarry;
}
if (carry !== 0) {
out.words[k] = carry;
} else {
out.length--;
}
return out.strip();
};
BN.prototype._bigMulTo = function _bigMulTo(num, out) {
out.sign = num.sign !== this.sign;
out.length = this.length + num.length;
var carry = 0;
var hncarry = 0;
for (var k = 0; k < out.length - 1; k++) {
// Sum all words with the same `i + j = k` and accumulate `ncarry`,
// note that ncarry could be >= 0x3ffffff
var ncarry = hncarry;
hncarry = 0;
var rword = carry & 0x3ffffff;
var maxJ = Math.min(k, num.length - 1);
for (var j = Math.max(0, k - this.length + 1); j <= maxJ; j++) {
var i = k - j;
var a = this.words[i] | 0;
var b = num.words[j] | 0;
var r = a * b;
var lo = r & 0x3ffffff;
ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
lo = (lo + rword) | 0;
rword = lo & 0x3ffffff;
ncarry = (ncarry + (lo >>> 26)) | 0;
hncarry += ncarry >>> 26;
ncarry &= 0x3ffffff;
}
out.words[k] = rword;
carry = ncarry;
ncarry = hncarry;
}
if (carry !== 0) {
out.words[k] = carry;
} else {
out.length--;
}
return out.strip();
};
BN.prototype.mulTo = function mulTo(num, out) {
var res;
if (this.length + num.length < 63)
res = this._smallMulTo(num, out);
else
res = this._bigMulTo(num, out);
return res;
};
// Multiply `this` by `num`
BN.prototype.mul = function mul(num) {
var out = new BN(null);
out.words = new Array(this.length + num.length);
return this.mulTo(num, out);
};
// In-place Multiplication
BN.prototype.imul = function imul(num) {
if (this.cmpn(0) === 0 || num.cmpn(0) === 0) {
this.words[0] = 0;
this.length = 1;
return this;
}
var tlen = this.length;
var nlen = num.length;
this.sign = num.sign !== this.sign;
this.length = this.length + num.length;
this.words[this.length - 1] = 0;
for (var k = this.length - 2; k >= 0; k--) {
// Sum all words with the same `i + j = k` and accumulate `carry`,
// note that carry could be >= 0x3ffffff
var carry = 0;
var rword = 0;
var maxJ = Math.min(k, nlen - 1);
for (var j = Math.max(0, k - tlen + 1); j <= maxJ; j++) {
var i = k - j;
var a = this.words[i];
var b = num.words[j];
var r = a * b;
var lo = r & 0x3ffffff;
carry += (r / 0x4000000) | 0;
lo += rword;
rword = lo & 0x3ffffff;
carry += lo >>> 26;
}
this.words[k] = rword;
this.words[k + 1] += carry;
carry = 0;
}
// Propagate overflows
var carry = 0;
for (var i = 1; i < this.length; i++) {
var w = this.words[i] + carry;
this.words[i] = w & 0x3ffffff;
carry = w >>> 26;
}
return this.strip();
};
BN.prototype.imuln = function imuln(num) {
assert(typeof num === 'number');
// Carry
var carry = 0;
for (var i = 0; i < this.length; i++) {
var w = this.words[i] * num;
var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
carry >>= 26;
carry += (w / 0x4000000) | 0;
// NOTE: lo is 27bit maximum
carry += lo >>> 26;
this.words[i] = lo & 0x3ffffff;
}
if (carry !== 0) {
this.words[i] = carry;
this.length++;
}
return this;
};
// `this` * `this`
BN.prototype.sqr = function sqr() {
return this.mul(this);
};
// `this` * `this` in-place
BN.prototype.isqr = function isqr() {
return this.mul(this);
};
// Shift-left in-place
BN.prototype.ishln = function ishln(bits) {
assert(typeof bits === 'number' && bits >= 0);
var r = bits % 26;
var s = (bits - r) / 26;
var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
if (r !== 0) {
var carry = 0;
for (var i = 0; i < this.length; i++) {
var newCarry = this.words[i] & carryMask;
var c = (this.words[i] - newCarry) << r;
this.words[i] = c | carry;
carry = newCarry >>> (26 - r);
}
if (carry) {
this.words[i] = carry;
this.length++;
}
}
if (s !== 0) {
for (var i = this.length - 1; i >= 0; i--)
this.words[i + s] = this.words[i];
for (var i = 0; i < s; i++)
this.words[i] = 0;
this.length += s;
}
return this.strip();
};
// Shift-right in-place
// NOTE: `hint` is a lowest bit before trailing zeroes
// NOTE: if `extended` is true - { lo: ..., hi: } object will be returned
BN.prototype.ishrn = function ishrn(bits, hint, extended) {
assert(typeof bits === 'number' && bits >= 0);
if (hint)
hint = (hint - (hint % 26)) / 26;
else
hint = 0;
var r = bits % 26;
var s = Math.min((bits - r) / 26, this.length);
var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
var maskedWords = extended;
hint -= s;
hint = Math.max(0, hint);
// Extended mode, copy masked part
if (maskedWords) {
for (var i = 0; i < s; i++)
maskedWords.words[i] = this.words[i];
maskedWords.length = s;
}
if (s === 0) {
// No-op, we should not move anything at all
} else if (this.length > s) {
this.length -= s;
for (var i = 0; i < this.length; i++)
this.words[i] = this.words[i + s];
} else {
this.words[0] = 0;
this.length = 1;
}
var carry = 0;
for (var i = this.length - 1; i >= 0 && (carry !== 0 || i >= hint); i--) {
var word = this.words[i];
this.words[i] = (carry << (26 - r)) | (word >>> r);
carry = word & mask;
}
// Push carried bits as a mask
if (maskedWords && carry !== 0)
maskedWords.words[maskedWords.length++] = carry;
if (this.length === 0) {
this.words[0] = 0;
this.length = 1;
}
this.strip();
if (extended)
return { hi: this, lo: maskedWords };
return this;
};
// Shift-left
BN.prototype.shln = function shln(bits) {
return this.clone().ishln(bits);
};
// Shift-right
BN.prototype.shrn = function shrn(bits) {
return this.clone().ishrn(bits);
};
// Test if n bit is set
BN.prototype.testn = function testn(bit) {
assert(typeof bit === 'number' && bit >= 0);
var r = bit % 26;
var s = (bit - r) / 26;
var q = 1 << r;
// Fast case: bit is much higher than all existing words
if (this.length <= s) {
return false;
}
// Check bit and return
var w = this.words[s];
return !!(w & q);
};
// Return only lowers bits of number (in-place)
BN.prototype.imaskn = function imaskn(bits) {
assert(typeof bits === 'number' && bits >= 0);
var r = bits % 26;
var s = (bits - r) / 26;
assert(!this.sign, 'imaskn works only with positive numbers');
if (r !== 0)
s++;
this.length = Math.min(s, this.length);
if (r !== 0) {
var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
this.words[this.length - 1] &= mask;
}
return this.strip();
};
// Return only lowers bits of number
BN.prototype.maskn = function maskn(bits) {
return this.clone().imaskn(bits);
};
// Add plain number `num` to `this`
BN.prototype.iaddn = function iaddn(num) {
assert(typeof num === 'number');
if (num < 0)
return this.isubn(-num);
// Possible sign change
if (this.sign) {
if (this.length === 1 && this.words[0] < num) {
this.words[0] = num - this.words[0];
this.sign = false;
return this;
}
this.sign = false;
this.isubn(num);
this.sign = true;
return this;
}
// Add without checks
return this._iaddn(num);
};
BN.prototype._iaddn = function _iaddn(num) {
this.words[0] += num;
// Carry
for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
this.words[i] -= 0x4000000;
if (i === this.length - 1)
this.words[i + 1] = 1;
else
this.words[i + 1]++;
}
this.length = Math.max(this.length, i + 1);
return this;
};
// Subtract plain number `num` from `this`
BN.prototype.isubn = function isubn(num) {
assert(typeof num === 'number');
if (num < 0)
return this.iaddn(-num);
if (this.sign) {
this.sign = false;
this.iaddn(num);
this.sign = true;
return this;
}
this.words[0] -= num;
// Carry
for (var i = 0; i < this.length && this.words[i] < 0; i++) {
this.words[i] += 0x4000000;
this.words[i + 1] -= 1;
}
return this.strip();
};
BN.prototype.addn = function addn(num) {
return this.clone().iaddn(num);
};
BN.prototype.subn = function subn(num) {
return this.clone().isubn(num);
};
BN.prototype.iabs = function iabs() {
this.sign = false;
return this;
};
BN.prototype.abs = function abs() {
return this.clone().iabs();
};
BN.prototype._ishlnsubmul = function _ishlnsubmul(num, mul, shift) {
// Bigger storage is needed
var len = num.length + shift;
var i;
if (this.words.length < len) {
var t = new Array(len);
for (var i = 0; i < this.length; i++)
t[i] = this.words[i];
this.words = t;
} else {
i = this.length;
}
// Zeroify rest
this.length = Math.max(this.length, len);
for (; i < this.length; i++)
this.words[i] = 0;
var carry = 0;
for (var i = 0; i < num.length; i++) {
var w = this.words[i + shift] + carry;
var right = num.words[i] * mul;
w -= right & 0x3ffffff;
carry = (w >> 26) - ((right / 0x4000000) | 0);
this.words[i + shift] = w & 0x3ffffff;
}
for (; i < this.length - shift; i++) {
var w = this.words[i + shift] + carry;
carry = w >> 26;
this.words[i + shift] = w & 0x3ffffff;
}
if (carry === 0)
return this.strip();
// Subtraction overflow
assert(carry === -1);
carry = 0;
for (var i = 0; i < this.length; i++) {
var w = -this.words[i] + carry;
carry = w >> 26;
this.words[i] = w & 0x3ffffff;
}
this.sign = true;
return this.strip();
};
BN.prototype._wordDiv = function _wordDiv(num, mode) {
var shift = this.length - num.length;
var a = this.clone();
var b = num;
// Normalize
var bhi = b.words[b.length - 1];
for (var shift = 0; bhi < 0x2000000; shift++)
bhi <<= 1;
if (shift !== 0) {
b = b.shln(shift);
a.ishln(shift);
bhi = b.words[b.length - 1];
}
// Initialize quotient
var m = a.length - b.length;
var q;
if (mode !== 'mod') {
q = new BN(null);
q.length = m + 1;
q.words = new Array(q.length);
for (var i = 0; i < q.length; i++)
q.words[i] = 0;
}
var diff = a.clone()._ishlnsubmul(b, 1, m);
if (!diff.sign) {
a = diff;
if (q)
q.words[m] = 1;
}
for (var j = m - 1; j >= 0; j--) {
var qj = a.words[b.length + j] * 0x4000000 + a.words[b.length + j - 1];
// NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
// (0x7ffffff)
qj = Math.min((qj / bhi) | 0, 0x3ffffff);
a._ishlnsubmul(b, qj, j);
while (a.sign) {
qj--;
a.sign = false;
a._ishlnsubmul(b, 1, j);
a.sign = !a.sign;
}
if (q)
q.words[j] = qj;
}
if (q)
q.strip();
a.strip();
// Denormalize
if (mode !== 'div' && shift !== 0)
a.ishrn(shift);
return { div: q ? q : null, mod: a };
};
BN.prototype.divmod = function divmod(num, mode) {
assert(num.cmpn(0) !== 0);
if (this.sign && !num.sign) {
var res = this.neg().divmod(num, mode);
var div;
var mod;
if (mode !== 'mod')
div = res.div.neg();
if (mode !== 'div')
mod = res.mod.cmpn(0) === 0 ? res.mod : num.sub(res.mod);
return {
div: div,
mod: mod
};
} else if (!this.sign && num.sign) {
var res = this.divmod(num.neg(), mode);
var div;
if (mode !== 'mod')
div = res.div.neg();
return { div: div, mod: res.mod };
} else if (this.sign && num.sign) {
return this.neg().divmod(num.neg(), mode);
}
// Both numbers are positive at this point
// Strip both numbers to approximate shift value
if (num.length > this.length || this.cmp(num) < 0)
return { div: new BN(0), mod: this };
// Very short reduction
if (num.length === 1) {
if (mode === 'div')
return { div: this.divn(num.words[0]), mod: null };
else if (mode === 'mod')
return { div: null, mod: new BN(this.modn(num.words[0])) };
return {
div: this.divn(num.words[0]),
mod: new BN(this.modn(num.words[0]))
};
}
return this._wordDiv(num, mode);
};
// Find `this` / `num`
BN.prototype.div = function div(num) {
return this.divmod(num, 'div').div;
};
// Find `this` % `num`
BN.prototype.mod = function mod(num) {
return this.divmod(num, 'mod').mod;
};
// Find Round(`this` / `num`)
BN.prototype.divRound = function divRound(num) {
var dm = this.divmod(num);
// Fast case - exact division
if (dm.mod.cmpn(0) === 0)
return dm.div;
var mod = dm.div.sign ? dm.mod.isub(num) : dm.mod;
var half = num.shrn(1);
var r2 = num.andln(1);
var cmp = mod.cmp(half);
// Round down
if (cmp < 0 || r2 === 1 && cmp === 0)
return dm.div;
// Round up
return dm.div.sign ? dm.div.isubn(1) : dm.div.iaddn(1);
};
BN.prototype.modn = function modn(num) {
assert(num <= 0x3ffffff);
var p = (1 << 26) % num;
var acc = 0;
for (var i = this.length - 1; i >= 0; i--)
acc = (p * acc + this.words[i]) % num;
return acc;
};
// In-place division by number
BN.prototype.idivn = function idivn(num) {
assert(num <= 0x3ffffff);
var carry = 0;
for (var i = this.length - 1; i >= 0; i--) {
var w = this.words[i] + carry * 0x4000000;
this.words[i] = (w / num) | 0;
carry = w % num;
}
return this.strip();
};
BN.prototype.divn = function divn(num) {
return this.clone().idivn(num);
};
BN.prototype._egcd = function _egcd(x1, p) {
assert(!p.sign);
assert(p.cmpn(0) !== 0);
var a = this;
var b = p.clone();
if (a.sign)
a = a.mod(p);
else
a = a.clone();
var x2 = new BN(0);
while (b.isEven())
b.ishrn(1);
var delta = b.clone();
while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
while (a.isEven()) {
a.ishrn(1);
if (x1.isEven())
x1.ishrn(1);
else
x1.iadd(delta).ishrn(1);
}
while (b.isEven()) {
b.ishrn(1);
if (x2.isEven())
x2.ishrn(1);
else
x2.iadd(delta).ishrn(1);
}
if (a.cmp(b) >= 0) {
a.isub(b);
x1.isub(x2);
} else {
b.isub(a);
x2.isub(x1);
}
}
if (a.cmpn(1) === 0)
return x1;
else
return x2;
};
BN.prototype.gcd = function gcd(num) {
if (this.cmpn(0) === 0)
return num.clone();
if (num.cmpn(0) === 0)
return this.clone();
var a = this.clone();
var b = num.clone();
a.sign = false;
b.sign = false;
// Remove common factor of two
for (var shift = 0; a.isEven() && b.isEven(); shift++) {
a.ishrn(1);
b.ishrn(1);
}
while (a.isEven())
a.ishrn(1);
do {
while (b.isEven())
b.ishrn(1);
// Swap `a` and `b` to make `a` always bigger than `b`
if (a.cmp(b) < 0) {
var t = a;
a = b;
b = t;
}
a.isub(a.div(b).mul(b));
} while (a.cmpn(0) !== 0 && b.cmpn(0) !== 0);
if (a.cmpn(0) === 0)
return b.ishln(shift);
else
return a.ishln(shift);
};
// Invert number in the field F(num)
BN.prototype.invm = function invm(num) {
return this._egcd(new BN(1), num).mod(num);
};
BN.prototype.isEven = function isEven() {
return (this.words[0] & 1) === 0;
};
BN.prototype.isOdd = function isOdd() {
return (this.words[0] & 1) === 1;
};
// And first word and num
BN.prototype.andln = function andln(num) {
return this.words[0] & num;
};
// Increment at the bit position in-line
BN.prototype.bincn = function bincn(bit) {
assert(typeof bit === 'number');
var r = bit % 26;
var s = (bit - r) / 26;
var q = 1 << r;
// Fast case: bit is much higher than all existing words
if (this.length <= s) {
for (var i = this.length; i < s + 1; i++)
this.words[i] = 0;
this.words[s] |= q;
this.length = s + 1;
return this;
}
// Add bit and propagate, if needed
var carry = q;
for (var i = s; carry !== 0 && i < this.length; i++) {
var w = this.words[i];
w += carry;
carry = w >>> 26;
w &= 0x3ffffff;
this.words[i] = w;
}
if (carry !== 0) {
this.words[i] = carry;
this.length++;
}
return this;
};
BN.prototype.cmpn = function cmpn(num) {
var sign = num < 0;
if (sign)
num = -num;
if (this.sign && !sign)
return -1;
else if (!this.sign && sign)
return 1;
num &= 0x3ffffff;
this.strip();
var res;
if (this.length > 1) {
res = 1;
} else {
var w = this.words[0];
res = w === num ? 0 : w < num ? -1 : 1;
}
if (this.sign)
res = -res;
return res;
};
// Compare two numbers and return:
// 1 - if `this` > `num`
// 0 - if `this` == `num`
// -1 - if `this` < `num`
BN.prototype.cmp = function cmp(num) {
if (this.sign && !num.sign)
return -1;
else if (!this.sign && num.sign)
return 1;
var res = this.ucmp(num);
if (this.sign)
return -res;
else
return res;
};
// Unsigned comparison
BN.prototype.ucmp = function ucmp(num) {
// At this point both numbers have the same sign
if (this.length > num.length)
return 1;
else if (this.length < num.length)
return -1;
var res = 0;
for (var i = this.length - 1; i >= 0; i--) {
var a = this.words[i];
var b = num.words[i];
if (a === b)
continue;
if (a < b)
res = -1;
else if (a > b)
res = 1;
break;
}
return res;
};
//
// A reduce context, could be using montgomery or something better, depending
// on the `m` itself.
//
BN.red = function red(num) {
return new Red(num);
};
BN.prototype.toRed = function toRed(ctx) {
assert(!this.red, 'Already a number in reduction context');
assert(!this.sign, 'red works only with positives');
return ctx.convertTo(this)._forceRed(ctx);
};
BN.prototype.fromRed = function fromRed() {
assert(this.red, 'fromRed works only with numbers in reduction context');
return this.red.convertFrom(this);
};
BN.prototype._forceRed = function _forceRed(ctx) {
this.red = ctx;
return this;
};
BN.prototype.forceRed = function forceRed(ctx) {
assert(!this.red, 'Already a number in reduction context');
return this._forceRed(ctx);
};
BN.prototype.redAdd = function redAdd(num) {
assert(this.red, 'redAdd works only with red numbers');
return this.red.add(this, num);
};
BN.prototype.redIAdd = function redIAdd(num) {
assert(this.red, 'redIAdd works only with red numbers');
return this.red.iadd(this, num);
};
BN.prototype.redSub = function redSub(num) {
assert(this.red, 'redSub works only with red numbers');
return this.red.sub(this, num);
};
BN.prototype.redISub = function redISub(num) {
assert(this.red, 'redISub works only with red numbers');
return this.red.isub(this, num);
};
BN.prototype.redShl = function redShl(num) {
assert(this.red, 'redShl works only with red numbers');
return this.red.shl(this, num);
};
BN.prototype.redMul = function redMul(num) {
assert(this.red, 'redMul works only with red numbers');
this.red._verify2(this, num);
return this.red.mul(this, num);
};
BN.prototype.redIMul = function redIMul(num) {
assert(this.red, 'redMul works only with red numbers');
this.red._verify2(this, num);
return this.red.imul(this, num);
};
BN.prototype.redSqr = function redSqr() {
assert(this.red, 'redSqr works only with red numbers');
this.red._verify1(this);
return this.red.sqr(this);
};
BN.prototype.redISqr = function redISqr() {
assert(this.red, 'redISqr works only with red numbers');
this.red._verify1(this);
return this.red.isqr(this);
};
// Square root over p
BN.prototype.redSqrt = function redSqrt() {
assert(this.red, 'redSqrt works only with red numbers');
this.red._verify1(this);
return this.red.sqrt(this);
};
BN.prototype.redInvm = function redInvm() {
assert(this.red, 'redInvm works only with red numbers');
this.red._verify1(this);
return this.red.invm(this);
};
// Return negative clone of `this` % `red modulo`
BN.prototype.redNeg = function redNeg() {
assert(this.red, 'redNeg works only with red numbers');
this.red._verify1(this);
return this.red.neg(this);
};
BN.prototype.redPow = function redPow(num) {
assert(this.red && !num.red, 'redPow(normalNum)');
this.red._verify1(this);
return this.red.pow(this, num);
};
// Prime numbers with efficient reduction
var primes = {
k256: null,
p224: null,
p192: null,
p25519: null
};
// Pseudo-Mersenne prime
function MPrime(name, p) {
// P = 2 ^ N - K
this.name = name;
this.p = new BN(p, 16);
this.n = this.p.bitLength();
this.k = new BN(1).ishln(this.n).isub(this.p);
this.tmp = this._tmp();
}
MPrime.prototype._tmp = function _tmp() {
var tmp = new BN(null);
tmp.words = new Array(Math.ceil(this.n / 13));
return tmp;
};
MPrime.prototype.ireduce = function ireduce(num) {
// Assumes that `num` is less than `P^2`
// num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
var r = num;
var rlen;
do {
var pair = r.ishrn(this.n, 0, this.tmp);
r = this.imulK(pair.hi);
r = r.iadd(pair.lo);
rlen = r.bitLength();
} while (rlen > this.n);
var cmp = rlen < this.n ? -1 : r.cmp(this.p);
if (cmp === 0) {
r.words[0] = 0;
r.length = 1;
} else if (cmp > 0) {
r.isub(this.p);
} else {
r.strip();
}
return r;
};
MPrime.prototype.imulK = function imulK(num) {
return num.imul(this.k);
};
function K256() {
MPrime.call(
this,
'k256',
'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
}
inherits(K256, MPrime);
K256.prototype.imulK = function imulK(num) {
// K = 0x1000003d1 = [ 0x40, 0x3d1 ]
num.words[num.length] = 0;
num.words[num.length + 1] = 0;
num.length += 2;
// bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
var hi;
var lo = 0;
for (var i = 0; i < num.length; i++) {
var w = num.words[i];
hi = w * 0x40;
lo += w * 0x3d1;
hi += (lo / 0x4000000) | 0;
lo &= 0x3ffffff;
num.words[i] = lo;
lo = hi;
}
// Fast length reduction
if (num.words[num.length - 1] === 0) {
num.length--;
if (num.words[num.length - 1] === 0)
num.length--;
}
return num;
};
function P224() {
MPrime.call(
this,
'p224',
'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
}
inherits(P224, MPrime);
function P192() {
MPrime.call(
this,
'p192',
'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
}
inherits(P192, MPrime);
function P25519() {
// 2 ^ 255 - 19
MPrime.call(
this,
'25519',
'7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
}
inherits(P25519, MPrime);
P25519.prototype.imulK = function imulK(num) {
// K = 0x13
var carry = 0;
for (var i = 0; i < num.length; i++) {
var hi = num.words[i] * 0x13 + carry;
var lo = hi & 0x3ffffff;
hi >>>= 26;
num.words[i] = lo;
carry = hi;
}
if (carry !== 0)
num.words[num.length++] = carry;
return num;
};
// Exported mostly for testing purposes, use plain name instead
BN._prime = function prime(name) {
// Cached version of prime
if (primes[name])
return primes[name];
var prime;
if (name === 'k256')
prime = new K256();
else if (name === 'p224')
prime = new P224();
else if (name === 'p192')
prime = new P192();
else if (name === 'p25519')
prime = new P25519();
else
throw new Error('Unknown prime ' + name);
primes[name] = prime;
return prime;
};
//
// Base reduction engine
//
function Red(m) {
if (typeof m === 'string') {
var prime = BN._prime(m);
this.m = prime.p;
this.prime = prime;
} else {
this.m = m;
this.prime = null;
}
}
Red.prototype._verify1 = function _verify1(a) {
assert(!a.sign, 'red works only with positives');
assert(a.red, 'red works only with red numbers');
};
Red.prototype._verify2 = function _verify2(a, b) {
assert(!a.sign && !b.sign, 'red works only with positives');
assert(a.red && a.red === b.red,
'red works only with red numbers');
};
Red.prototype.imod = function imod(a) {
if (this.prime)
return this.prime.ireduce(a)._forceRed(this);
return a.mod(this.m)._forceRed(this);
};
Red.prototype.neg = function neg(a) {
var r = a.clone();
r.sign = !r.sign;
return r.iadd(this.m)._forceRed(this);
};
Red.prototype.add = function add(a, b) {
this._verify2(a, b);
var res = a.add(b);
if (res.cmp(this.m) >= 0)
res.isub(this.m);
return res._forceRed(this);
};
Red.prototype.iadd = function iadd(a, b) {
this._verify2(a, b);
var res = a.iadd(b);
if (res.cmp(this.m) >= 0)
res.isub(this.m);
return res;
};
Red.prototype.sub = function sub(a, b) {
this._verify2(a, b);
var res = a.sub(b);
if (res.cmpn(0) < 0)
res.iadd(this.m);
return res._forceRed(this);
};
Red.prototype.isub = function isub(a, b) {
this._verify2(a, b);
var res = a.isub(b);
if (res.cmpn(0) < 0)
res.iadd(this.m);
return res;
};
Red.prototype.shl = function shl(a, num) {
this._verify1(a);
return this.imod(a.shln(num));
};
Red.prototype.imul = function imul(a, b) {
this._verify2(a, b);
return this.imod(a.imul(b));
};
Red.prototype.mul = function mul(a, b) {
this._verify2(a, b);
return this.imod(a.mul(b));
};
Red.prototype.isqr = function isqr(a) {
return this.imul(a, a);
};
Red.prototype.sqr = function sqr(a) {
return this.mul(a, a);
};
Red.prototype.sqrt = function sqrt(a) {
if (a.cmpn(0) === 0)
return a.clone();
var mod3 = this.m.andln(3);
assert(mod3 % 2 === 1);
// Fast case
if (mod3 === 3) {
var pow = this.m.add(new BN(1)).ishrn(2);
var r = this.pow(a, pow);
return r;
}
// Tonelli-Shanks algorithm (Totally unoptimized and slow)
//
// Find Q and S, that Q * 2 ^ S = (P - 1)
var q = this.m.subn(1);
var s = 0;
while (q.cmpn(0) !== 0 && q.andln(1) === 0) {
s++;
q.ishrn(1);
}
assert(q.cmpn(0) !== 0);
var one = new BN(1).toRed(this);
var nOne = one.redNeg();
// Find quadratic non-residue
// NOTE: Max is such because of generalized Riemann hypothesis.
var lpow = this.m.subn(1).ishrn(1);
var z = this.m.bitLength();
z = new BN(2 * z * z).toRed(this);
while (this.pow(z, lpow).cmp(nOne) !== 0)
z.redIAdd(nOne);
var c = this.pow(z, q);
var r = this.pow(a, q.addn(1).ishrn(1));
var t = this.pow(a, q);
var m = s;
while (t.cmp(one) !== 0) {
var tmp = t;
for (var i = 0; tmp.cmp(one) !== 0; i++)
tmp = tmp.redSqr();
assert(i < m);
var b = this.pow(c, new BN(1).ishln(m - i - 1));
r = r.redMul(b);
c = b.redSqr();
t = t.redMul(c);
m = i;
}
return r;
};
Red.prototype.invm = function invm(a) {
var inv = a._egcd(new BN(1), this.m);
if (inv.sign) {
inv.sign = false;
return this.imod(inv).redNeg();
} else {
return this.imod(inv);
}
};
Red.prototype.pow = function pow(a, num) {
var w = [];
var q = num.clone();
while (q.cmpn(0) !== 0) {
w.push(q.andln(1));
q.ishrn(1);
}
// Skip leading zeroes
var res = a;
for (var i = 0; i < w.length; i++, res = this.sqr(res))
if (w[i] !== 0)
break;
if (++i < w.length) {
for (var q = this.sqr(res); i < w.length; i++, q = this.sqr(q)) {
if (w[i] === 0)
continue;
res = this.mul(res, q);
}
}
return res;
};
Red.prototype.convertTo = function convertTo(num) {
return num.clone();
};
Red.prototype.convertFrom = function convertFrom(num) {
var res = num.clone();
res.red = null;
return res;
};
//
// Montgomery method engine
//
BN.mont = function mont(num) {
return new Mont(num);
};
function Mont(m) {
Red.call(this, m);
this.shift = this.m.bitLength();
if (this.shift % 26 !== 0)
this.shift += 26 - (this.shift % 26);
this.r = new BN(1).ishln(this.shift);
this.r2 = this.imod(this.r.sqr());
this.rinv = this.r.invm(this.m);
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
this.minv.sign = true;
this.minv = this.minv.mod(this.r);
}
inherits(Mont, Red);
Mont.prototype.convertTo = function convertTo(num) {
return this.imod(num.shln(this.shift));
};
Mont.prototype.convertFrom = function convertFrom(num) {
var r = this.imod(num.mul(this.rinv));
r.red = null;
return r;
};
Mont.prototype.imul = function imul(a, b) {
if (a.cmpn(0) === 0 || b.cmpn(0) === 0) {
a.words[0] = 0;
a.length = 1;
return a;
}
var t = a.imul(b);
var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
var u = t.isub(c).ishrn(this.shift);
var res = u;
if (u.cmp(this.m) >= 0)
res = u.isub(this.m);
else if (u.cmpn(0) < 0)
res = u.iadd(this.m);
return res._forceRed(this);
};
Mont.prototype.mul = function mul(a, b) {
if (a.cmpn(0) === 0 || b.cmpn(0) === 0)
return new BN(0)._forceRed(this);
var t = a.mul(b);
var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
var u = t.isub(c).ishrn(this.shift);
var res = u;
if (u.cmp(this.m) >= 0)
res = u.isub(this.m);
else if (u.cmpn(0) < 0)
res = u.iadd(this.m);
return res._forceRed(this);
};
Mont.prototype.invm = function invm(a) {
// (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
var res = this.imod(a.invm(this.m).mul(this.r2));
return res._forceRed(this);
};
})(typeof module === 'undefined' || module, this);
},{}],18:[function(require,module,exports){
window.pemJwk = require("pem-jwk");
//global.pem-jwk = window.pemJwk;
module.exports = window.pemJwk;
},{"pem-jwk":4}],19:[function(require,module,exports){
arguments[4][5][0].apply(exports,arguments)
},{"./asn1/api":20,"./asn1/base":22,"./asn1/constants":26,"./asn1/decoders":28,"./asn1/encoders":31,"bn.js":34,"dup":5}],20:[function(require,module,exports){
var asn1 = require('../asn1');
var inherits = require('inherits');
var api = exports;
api.define = function define(name, body) {
return new Entity(name, body);
};
function Entity(name, body) {
this.name = name;
this.body = body;
this.decoders = {};
this.encoders = {};
};
Entity.prototype._createNamed = function createNamed(base) {
var named;
try {
named = require('vm').runInThisContext(
'(function ' + this.name + '(entity) {\n' +
' this._initNamed(entity);\n' +
'})'
);
} catch (e) {
named = function (entity) {
this._initNamed(entity);
};
}
inherits(named, base);
named.prototype._initNamed = function initnamed(entity) {
base.call(this, entity);
};
return new named(this);
};
Entity.prototype._getDecoder = function _getDecoder(enc) {
enc = enc || 'der';
// Lazily create decoder
if (!this.decoders.hasOwnProperty(enc))
this.decoders[enc] = this._createNamed(asn1.decoders[enc]);
return this.decoders[enc];
};
Entity.prototype.decode = function decode(data, enc, options) {
return this._getDecoder(enc).decode(data, options);
};
Entity.prototype._getEncoder = function _getEncoder(enc) {
enc = enc || 'der';
// Lazily create encoder
if (!this.encoders.hasOwnProperty(enc))
this.encoders[enc] = this._createNamed(asn1.encoders[enc]);
return this.encoders[enc];
};
Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
return this._getEncoder(enc).encode(data, reporter);
};
},{"../asn1":19,"inherits":119,"vm":172}],21:[function(require,module,exports){
var inherits = require('inherits');
var Reporter = require('../base').Reporter;
var Buffer = require('buffer').Buffer;
function DecoderBuffer(base, options) {
Reporter.call(this, options);
if (!Buffer.isBuffer(base)) {
this.error('Input not Buffer');
return;
}
this.base = base;
this.offset = 0;
this.length = base.length;
}
inherits(DecoderBuffer, Reporter);
exports.DecoderBuffer = DecoderBuffer;
DecoderBuffer.prototype.save = function save() {
return { offset: this.offset, reporter: Reporter.prototype.save.call(this) };
};
DecoderBuffer.prototype.restore = function restore(save) {
// Return skipped data
var res = new DecoderBuffer(this.base);
res.offset = save.offset;
res.length = this.offset;
this.offset = save.offset;
Reporter.prototype.restore.call(this, save.reporter);
return res;
};
DecoderBuffer.prototype.isEmpty = function isEmpty() {
return this.offset === this.length;
};
DecoderBuffer.prototype.readUInt8 = function readUInt8(fail) {
if (this.offset + 1 <= this.length)
return this.base.readUInt8(this.offset++, true);
else
return this.error(fail || 'DecoderBuffer overrun');
}
DecoderBuffer.prototype.skip = function skip(bytes, fail) {
if (!(this.offset + bytes <= this.length))
return this.error(fail || 'DecoderBuffer overrun');
var res = new DecoderBuffer(this.base);
// Share reporter state
res._reporterState = this._reporterState;
res.offset = this.offset;
res.length = this.offset + bytes;
this.offset += bytes;
return res;
}
DecoderBuffer.prototype.raw = function raw(save) {
return this.base.slice(save ? save.offset : this.offset, this.length);
}
function EncoderBuffer(value, reporter) {
if (Array.isArray(value)) {
this.length = 0;
this.value = value.map(function(item) {
if (!(item instanceof EncoderBuffer))
item = new EncoderBuffer(item, reporter);
this.length += item.length;
return item;
}, this);
} else if (typeof value === 'number') {
if (!(0 <= value && value <= 0xff))
return reporter.error('non-byte EncoderBuffer value');
this.value = value;
this.length = 1;
} else if (typeof value === 'string') {
this.value = value;
this.length = Buffer.byteLength(value);
} else if (Buffer.isBuffer(value)) {
this.value = value;
this.length = value.length;
} else {
return reporter.error('Unsupported type: ' + typeof value);
}
}
exports.EncoderBuffer = EncoderBuffer;
EncoderBuffer.prototype.join = function join(out, offset) {
if (!out)
out = new Buffer(this.length);
if (!offset)
offset = 0;
if (this.length === 0)
return out;
if (Array.isArray(this.value)) {
this.value.forEach(function(item) {
item.join(out, offset);
offset += item.length;
});
} else {
if (typeof this.value === 'number')
out[offset] = this.value;
else if (typeof this.value === 'string')
out.write(this.value, offset);
else if (Buffer.isBuffer(this.value))
this.value.copy(out, offset);
offset += this.length;
}
return out;
};
},{"../base":22,"buffer":65,"inherits":119}],22:[function(require,module,exports){
arguments[4][8][0].apply(exports,arguments)
},{"./buffer":21,"./node":23,"./reporter":24,"dup":8}],23:[function(require,module,exports){
var Reporter = require('../base').Reporter;
var EncoderBuffer = require('../base').EncoderBuffer;
var DecoderBuffer = require('../base').DecoderBuffer;
var assert = require('minimalistic-assert');
// Supported tags
var tags = [
'seq', 'seqof', 'set', 'setof', 'objid', 'bool',
'gentime', 'utctime', 'null_', 'enum', 'int', 'objDesc',
'bitstr', 'bmpstr', 'charstr', 'genstr', 'graphstr', 'ia5str', 'iso646str',
'numstr', 'octstr', 'printstr', 't61str', 'unistr', 'utf8str', 'videostr'
];
// Public methods list
var methods = [
'key', 'obj', 'use', 'optional', 'explicit', 'implicit', 'def', 'choice',
'any', 'contains'
].concat(tags);
// Overrided methods list
var overrided = [
'_peekTag', '_decodeTag', '_use',
'_decodeStr', '_decodeObjid', '_decodeTime',
'_decodeNull', '_decodeInt', '_decodeBool', '_decodeList',
'_encodeComposite', '_encodeStr', '_encodeObjid', '_encodeTime',
'_encodeNull', '_encodeInt', '_encodeBool'
];
function Node(enc, parent) {
var state = {};
this._baseState = state;
state.enc = enc;
state.parent = parent || null;
state.children = null;
// State
state.tag = null;
state.args = null;
state.reverseArgs = null;
state.choice = null;
state.optional = false;
state.any = false;
state.obj = false;
state.use = null;
state.useDecoder = null;
state.key = null;
state['default'] = null;
state.explicit = null;
state.implicit = null;
state.contains = null;
// Should create new instance on each method
if (!state.parent) {
state.children = [];
this._wrap();
}
}
module.exports = Node;
var stateProps = [
'enc', 'parent', 'children', 'tag', 'args', 'reverseArgs', 'choice',
'optional', 'any', 'obj', 'use', 'alteredUse', 'key', 'default', 'explicit',
'implicit', 'contains'
];
Node.prototype.clone = function clone() {
var state = this._baseState;
var cstate = {};
stateProps.forEach(function(prop) {
cstate[prop] = state[prop];
});
var res = new this.constructor(cstate.parent);
res._baseState = cstate;
return res;
};
Node.prototype._wrap = function wrap() {
var state = this._baseState;
methods.forEach(function(method) {
this[method] = function _wrappedMethod() {
var clone = new this.constructor(this);
state.children.push(clone);
return clone[method].apply(clone, arguments);
};
}, this);
};
Node.prototype._init = function init(body) {
var state = this._baseState;
assert(state.parent === null);
body.call(this);
// Filter children
state.children = state.children.filter(function(child) {
return child._baseState.parent === this;
}, this);
assert.equal(state.children.length, 1, 'Root node can have only one child');
};
Node.prototype._useArgs = function useArgs(args) {
var state = this._baseState;
// Filter children and args
var children = args.filter(function(arg) {
return arg instanceof this.constructor;
}, this);
args = args.filter(function(arg) {
return !(arg instanceof this.constructor);
}, this);
if (children.length !== 0) {
assert(state.children === null);
state.children = children;
// Replace parent to maintain backward link
children.forEach(function(child) {
child._baseState.parent = this;
}, this);
}
if (args.length !== 0) {
assert(state.args === null);
state.args = args;
state.reverseArgs = args.map(function(arg) {
if (typeof arg !== 'object' || arg.constructor !== Object)
return arg;
var res = {};
Object.keys(arg).forEach(function(key) {
if (key == (key | 0))
key |= 0;
var value = arg[key];
res[value] = key;
});
return res;
});
}
};
//
// Overrided methods
//
overrided.forEach(function(method) {
Node.prototype[method] = function _overrided() {
var state = this._baseState;
throw new Error(method + ' not implemented for encoding: ' + state.enc);
};
});
//
// Public methods
//
tags.forEach(function(tag) {
Node.prototype[tag] = function _tagMethod() {
var state = this._baseState;
var args = Array.prototype.slice.call(arguments);
assert(state.tag === null);
state.tag = tag;
this._useArgs(args);
return this;
};
});
Node.prototype.use = function use(item) {
assert(item);
var state = this._baseState;
assert(state.use === null);
state.use = item;
return this;
};
Node.prototype.optional = function optional() {
var state = this._baseState;
state.optional = true;
return this;
};
Node.prototype.def = function def(val) {
var state = this._baseState;
assert(state['default'] === null);
state['default'] = val;
state.optional = true;
return this;
};
Node.prototype.explicit = function explicit(num) {
var state = this._baseState;
assert(state.explicit === null && state.implicit === null);
state.explicit = num;
return this;
};
Node.prototype.implicit = function implicit(num) {
var state = this._baseState;
assert(state.explicit === null && state.implicit === null);
state.implicit = num;
return this;
};
Node.prototype.obj = function obj() {
var state = this._baseState;
var args = Array.prototype.slice.call(arguments);
state.obj = true;
if (args.length !== 0)
this._useArgs(args);
return this;
};
Node.prototype.key = function key(newKey) {
var state = this._baseState;
assert(state.key === null);
state.key = newKey;
return this;
};
Node.prototype.any = function any() {
var state = this._baseState;
state.any = true;
return this;
};
Node.prototype.choice = function choice(obj) {
var state = this._baseState;
assert(state.choice === null);
state.choice = obj;
this._useArgs(Object.keys(obj).map(function(key) {
return obj[key];
}));
return this;
};
Node.prototype.contains = function contains(item) {
var state = this._baseState;
assert(state.use === null);
state.contains = item;
return this;
};
//
// Decoding
//
Node.prototype._decode = function decode(input, options) {
var state = this._baseState;
// Decode root node
if (state.parent === null)
return input.wrapResult(state.children[0]._decode(input, options));
var result = state['default'];
var present = true;
var prevKey = null;
if (state.key !== null)
prevKey = input.enterKey(state.key);
// Check if tag is there
if (state.optional) {
var tag = null;
if (state.explicit !== null)
tag = state.explicit;
else if (state.implicit !== null)
tag = state.implicit;
else if (state.tag !== null)
tag = state.tag;
if (tag === null && !state.any) {
// Trial and Error
var save = input.save();
try {
if (state.choice === null)
this._decodeGeneric(state.tag, input, options);
else
this._decodeChoice(input, options);
present = true;
} catch (e) {
present = false;
}
input.restore(save);
} else {
present = this._peekTag(input, tag, state.any);
if (input.isError(present))
return present;
}
}
// Push object on stack
var prevObj;
if (state.obj && present)
prevObj = input.enterObject();
if (present) {
// Unwrap explicit values
if (state.explicit !== null) {
var explicit = this._decodeTag(input, state.explicit);
if (input.isError(explicit))
return explicit;
input = explicit;
}
var start = input.offset;
// Unwrap implicit and normal values
if (state.use === null && state.choice === null) {
if (state.any)
var save = input.save();
var body = this._decodeTag(
input,
state.implicit !== null ? state.implicit : state.tag,
state.any
);
if (input.isError(body))
return body;
if (state.any)
result = input.raw(save);
else
input = body;
}
if (options && options.track && state.tag !== null)
options.track(input.path(), start, input.length, 'tagged');
if (options && options.track && state.tag !== null)
options.track(input.path(), input.offset, input.length, 'content');
// Select proper method for tag
if (state.any)
result = result;
else if (state.choice === null)
result = this._decodeGeneric(state.tag, input, options);
else
result = this._decodeChoice(input, options);
if (input.isError(result))
return result;
// Decode children
if (!state.any && state.choice === null && state.children !== null) {
state.children.forEach(function decodeChildren(child) {
// NOTE: We are ignoring errors here, to let parser continue with other
// parts of encoded data
child._decode(input, options);
});
}
// Decode contained/encoded by schema, only in bit or octet strings
if (state.contains && (state.tag === 'octstr' || state.tag === 'bitstr')) {
var data = new DecoderBuffer(result);
result = this._getUse(state.contains, input._reporterState.obj)
._decode(data, options);
}
}
// Pop object
if (state.obj && present)
result = input.leaveObject(prevObj);
// Set key
if (state.key !== null && (result !== null || present === true))
input.leaveKey(prevKey, state.key, result);
else if (prevKey !== null)
input.exitKey(prevKey);
return result;
};
Node.prototype._decodeGeneric = function decodeGeneric(tag, input, options) {
var state = this._baseState;
if (tag === 'seq' || tag === 'set')
return null;
if (tag === 'seqof' || tag === 'setof')
return this._decodeList(input, tag, state.args[0], options);
else if (/str$/.test(tag))
return this._decodeStr(input, tag, options);
else if (tag === 'objid' && state.args)
return this._decodeObjid(input, state.args[0], state.args[1], options);
else if (tag === 'objid')
return this._decodeObjid(input, null, null, options);
else if (tag === 'gentime' || tag === 'utctime')
return this._decodeTime(input, tag, options);
else if (tag === 'null_')
return this._decodeNull(input, options);
else if (tag === 'bool')
return this._decodeBool(input, options);
else if (tag === 'objDesc')
return this._decodeStr(input, tag, options);
else if (tag === 'int' || tag === 'enum')
return this._decodeInt(input, state.args && state.args[0], options);
if (state.use !== null) {
return this._getUse(state.use, input._reporterState.obj)
._decode(input, options);
} else {
return input.error('unknown tag: ' + tag);
}
};
Node.prototype._getUse = function _getUse(entity, obj) {
var state = this._baseState;
// Create altered use decoder if implicit is set
state.useDecoder = this._use(entity, obj);
assert(state.useDecoder._baseState.parent === null);
state.useDecoder = state.useDecoder._baseState.children[0];
if (state.implicit !== state.useDecoder._baseState.implicit) {
state.useDecoder = state.useDecoder.clone();
state.useDecoder._baseState.implicit = state.implicit;
}
return state.useDecoder;
};
Node.prototype._decodeChoice = function decodeChoice(input, options) {
var state = this._baseState;
var result = null;
var match = false;
Object.keys(state.choice).some(function(key) {
var save = input.save();
var node = state.choice[key];
try {
var value = node._decode(input, options);
if (input.isError(value))
return false;
result = { type: key, value: value };
match = true;
} catch (e) {
input.restore(save);
return false;
}
return true;
}, this);
if (!match)
return input.error('Choice not matched');
return result;
};
//
// Encoding
//
Node.prototype._createEncoderBuffer = function createEncoderBuffer(data) {
return new EncoderBuffer(data, this.reporter);
};
Node.prototype._encode = function encode(data, reporter, parent) {
var state = this._baseState;
if (state['default'] !== null && state['default'] === data)
return;
var result = this._encodeValue(data, reporter, parent);
if (result === undefined)
return;
if (this._skipDefault(result, reporter, parent))
return;
return result;
};
Node.prototype._encodeValue = function encode(data, reporter, parent) {
var state = this._baseState;
// Decode root node
if (state.parent === null)
return state.children[0]._encode(data, reporter || new Reporter());
var result = null;
// Set reporter to share it with a child class
this.reporter = reporter;
// Check if data is there
if (state.optional && data === undefined) {
if (state['default'] !== null)
data = state['default']
else
return;
}
// Encode children first
var content = null;
var primitive = false;
if (state.any) {
// Anything that was given is translated to buffer
result = this._createEncoderBuffer(data);
} else if (state.choice) {
result = this._encodeChoice(data, reporter);
} else if (state.contains) {
content = this._getUse(state.contains, parent)._encode(data, reporter);
primitive = true;
} else if (state.children) {
content = state.children.map(function(child) {
if (child._baseState.tag === 'null_')
return child._encode(null, reporter, data);
if (child._baseState.key === null)
return reporter.error('Child should have a key');
var prevKey = reporter.enterKey(child._baseState.key);
if (typeof data !== 'object')
return reporter.error('Child expected, but input is not object');
var res = child._encode(data[child._baseState.key], reporter, data);
reporter.leaveKey(prevKey);
return res;
}, this).filter(function(child) {
return child;
});
content = this._createEncoderBuffer(content);
} else {
if (state.tag === 'seqof' || state.tag === 'setof') {
// TODO(indutny): this should be thrown on DSL level
if (!(state.args && state.args.length === 1))
return reporter.error('Too many args for : ' + state.tag);
if (!Array.isArray(data))
return reporter.error('seqof/setof, but data is not Array');
var child = this.clone();
child._baseState.implicit = null;
content = this._createEncoderBuffer(data.map(function(item) {
var state = this._baseState;
return this._getUse(state.args[0], data)._encode(item, reporter);
}, child));
} else if (state.use !== null) {
result = this._getUse(state.use, parent)._encode(data, reporter);
} else {
content = this._encodePrimitive(state.tag, data);
primitive = true;
}
}
// Encode data itself
var result;
if (!state.any && state.choice === null) {
var tag = state.implicit !== null ? state.implicit : state.tag;
var cls = state.implicit === null ? 'universal' : 'context';
if (tag === null) {
if (state.use === null)
reporter.error('Tag could be ommited only for .use()');
} else {
if (state.use === null)
result = this._encodeComposite(tag, primitive, cls, content);
}
}
// Wrap in explicit
if (state.explicit !== null)
result = this._encodeComposite(state.explicit, false, 'context', result);
return result;
};
Node.prototype._encodeChoice = function encodeChoice(data, reporter) {
var state = this._baseState;
var node = state.choice[data.type];
if (!node) {
assert(
false,
data.type + ' not found in ' +
JSON.stringify(Object.keys(state.choice)));
}
return node._encode(data.value, reporter);
};
Node.prototype._encodePrimitive = function encodePrimitive(tag, data) {
var state = this._baseState;
if (/str$/.test(tag))
return this._encodeStr(data, tag);
else if (tag === 'objid' && state.args)
return this._encodeObjid(data, state.reverseArgs[0], state.args[1]);
else if (tag === 'objid')
return this._encodeObjid(data, null, null);
else if (tag === 'gentime' || tag === 'utctime')
return this._encodeTime(data, tag);
else if (tag === 'null_')
return this._encodeNull();
else if (tag === 'int' || tag === 'enum')
return this._encodeInt(data, state.args && state.reverseArgs[0]);
else if (tag === 'bool')
return this._encodeBool(data);
else if (tag === 'objDesc')
return this._encodeStr(data, tag);
else
throw new Error('Unsupported tag: ' + tag);
};
Node.prototype._isNumstr = function isNumstr(str) {
return /^[0-9 ]*$/.test(str);
};
Node.prototype._isPrintstr = function isPrintstr(str) {
return /^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str);
};
},{"../base":22,"minimalistic-assert":125}],24:[function(require,module,exports){
var inherits = require('inherits');
function Reporter(options) {
this._reporterState = {
obj: null,
path: [],
options: options || {},
errors: []
};
}
exports.Reporter = Reporter;
Reporter.prototype.isError = function isError(obj) {
return obj instanceof ReporterError;
};
Reporter.prototype.save = function save() {
var state = this._reporterState;
return { obj: state.obj, pathLen: state.path.length };
};
Reporter.prototype.restore = function restore(data) {
var state = this._reporterState;
state.obj = data.obj;
state.path = state.path.slice(0, data.pathLen);
};
Reporter.prototype.enterKey = function enterKey(key) {
return this._reporterState.path.push(key);
};
Reporter.prototype.exitKey = function exitKey(index) {
var state = this._reporterState;
state.path = state.path.slice(0, index - 1);
};
Reporter.prototype.leaveKey = function leaveKey(index, key, value) {
var state = this._reporterState;
this.exitKey(index);
if (state.obj !== null)
state.obj[key] = value;
};
Reporter.prototype.path = function path() {
return this._reporterState.path.join('/');
};
Reporter.prototype.enterObject = function enterObject() {
var state = this._reporterState;
var prev = state.obj;
state.obj = {};
return prev;
};
Reporter.prototype.leaveObject = function leaveObject(prev) {
var state = this._reporterState;
var now = state.obj;
state.obj = prev;
return now;
};
Reporter.prototype.error = function error(msg) {
var err;
var state = this._reporterState;
var inherited = msg instanceof ReporterError;
if (inherited) {
err = msg;
} else {
err = new ReporterError(state.path.map(function(elem) {
return '[' + JSON.stringify(elem) + ']';
}).join(''), msg.message || msg, msg.stack);
}
if (!state.options.partial)
throw err;
if (!inherited)
state.errors.push(err);
return err;
};
Reporter.prototype.wrapResult = function wrapResult(result) {
var state = this._reporterState;
if (!state.options.partial)
return result;
return {
result: this.isError(result) ? null : result,
errors: state.errors
};
};
function ReporterError(path, msg) {
this.path = path;
this.rethrow(msg);
};
inherits(ReporterError, Error);
ReporterError.prototype.rethrow = function rethrow(msg) {
this.message = msg + ' at: ' + (this.path || '(shallow)');
if (Error.captureStackTrace)
Error.captureStackTrace(this, ReporterError);
if (!this.stack) {
try {
// IE only adds stack when thrown
throw new Error(this.message);
} catch (e) {
this.stack = e.stack;
}
}
return this;
};
},{"inherits":119}],25:[function(require,module,exports){
arguments[4][11][0].apply(exports,arguments)
},{"../constants":26,"dup":11}],26:[function(require,module,exports){
arguments[4][12][0].apply(exports,arguments)
},{"./der":25,"dup":12}],27:[function(require,module,exports){
var inherits = require('inherits');
var asn1 = require('../../asn1');
var base = asn1.base;
var bignum = asn1.bignum;
// Import DER constants
var der = asn1.constants.der;
function DERDecoder(entity) {
this.enc = 'der';
this.name = entity.name;
this.entity = entity;
// Construct base tree
this.tree = new DERNode();
this.tree._init(entity.body);
};
module.exports = DERDecoder;
DERDecoder.prototype.decode = function decode(data, options) {
if (!(data instanceof base.DecoderBuffer))
data = new base.DecoderBuffer(data, options);
return this.tree._decode(data, options);
};
// Tree methods
function DERNode(parent) {
base.Node.call(this, 'der', parent);
}
inherits(DERNode, base.Node);
DERNode.prototype._peekTag = function peekTag(buffer, tag, any) {
if (buffer.isEmpty())
return false;
var state = buffer.save();
var decodedTag = derDecodeTag(buffer, 'Failed to peek tag: "' + tag + '"');
if (buffer.isError(decodedTag))
return decodedTag;
buffer.restore(state);
return decodedTag.tag === tag || decodedTag.tagStr === tag ||
(decodedTag.tagStr + 'of') === tag || any;
};
DERNode.prototype._decodeTag = function decodeTag(buffer, tag, any) {
var decodedTag = derDecodeTag(buffer,
'Failed to decode tag of "' + tag + '"');
if (buffer.isError(decodedTag))
return decodedTag;
var len = derDecodeLen(buffer,
decodedTag.primitive,
'Failed to get length of "' + tag + '"');
// Failure
if (buffer.isError(len))
return len;
if (!any &&
decodedTag.tag !== tag &&
decodedTag.tagStr !== tag &&
decodedTag.tagStr + 'of' !== tag) {
return buffer.error('Failed to match tag: "' + tag + '"');
}
if (decodedTag.primitive || len !== null)
return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
// Indefinite length... find END tag
var state = buffer.save();
var res = this._skipUntilEnd(
buffer,
'Failed to skip indefinite length body: "' + this.tag + '"');
if (buffer.isError(res))
return res;
len = buffer.offset - state.offset;
buffer.restore(state);
return buffer.skip(len, 'Failed to match body of: "' + tag + '"');
};
DERNode.prototype._skipUntilEnd = function skipUntilEnd(buffer, fail) {
while (true) {
var tag = derDecodeTag(buffer, fail);
if (buffer.isError(tag))
return tag;
var len = derDecodeLen(buffer, tag.primitive, fail);
if (buffer.isError(len))
return len;
var res;
if (tag.primitive || len !== null)
res = buffer.skip(len)
else
res = this._skipUntilEnd(buffer, fail);
// Failure
if (buffer.isError(res))
return res;
if (tag.tagStr === 'end')
break;
}
};
DERNode.prototype._decodeList = function decodeList(buffer, tag, decoder,
options) {
var result = [];
while (!buffer.isEmpty()) {
var possibleEnd = this._peekTag(buffer, 'end');
if (buffer.isError(possibleEnd))
return possibleEnd;
var res = decoder.decode(buffer, 'der', options);
if (buffer.isError(res) && possibleEnd)
break;
result.push(res);
}
return result;
};
DERNode.prototype._decodeStr = function decodeStr(buffer, tag) {
if (tag === 'bitstr') {
var unused = buffer.readUInt8();
if (buffer.isError(unused))
return unused;
return { unused: unused, data: buffer.raw() };
} else if (tag === 'bmpstr') {
var raw = buffer.raw();
if (raw.length % 2 === 1)
return buffer.error('Decoding of string type: bmpstr length mismatch');
var str = '';
for (var i = 0; i < raw.length / 2; i++) {
str += String.fromCharCode(raw.readUInt16BE(i * 2));
}
return str;
} else if (tag === 'numstr') {
var numstr = buffer.raw().toString('ascii');
if (!this._isNumstr(numstr)) {
return buffer.error('Decoding of string type: ' +
'numstr unsupported characters');
}
return numstr;
} else if (tag === 'octstr') {
return buffer.raw();
} else if (tag === 'objDesc') {
return buffer.raw();
} else if (tag === 'printstr') {
var printstr = buffer.raw().toString('ascii');
if (!this._isPrintstr(printstr)) {
return buffer.error('Decoding of string type: ' +
'printstr unsupported characters');
}
return printstr;
} else if (/str$/.test(tag)) {
return buffer.raw().toString();
} else {
return buffer.error('Decoding of string type: ' + tag + ' unsupported');
}
};
DERNode.prototype._decodeObjid = function decodeObjid(buffer, values, relative) {
var result;
var identifiers = [];
var ident = 0;
while (!buffer.isEmpty()) {
var subident = buffer.readUInt8();
ident <<= 7;
ident |= subident & 0x7f;
if ((subident & 0x80) === 0) {
identifiers.push(ident);
ident = 0;
}
}
if (subident & 0x80)
identifiers.push(ident);
var first = (identifiers[0] / 40) | 0;
var second = identifiers[0] % 40;
if (relative)
result = identifiers;
else
result = [first, second].concat(identifiers.slice(1));
if (values) {
var tmp = values[result.join(' ')];
if (tmp === undefined)
tmp = values[result.join('.')];
if (tmp !== undefined)
result = tmp;
}
return result;
};
DERNode.prototype._decodeTime = function decodeTime(buffer, tag) {
var str = buffer.raw().toString();
if (tag === 'gentime') {
var year = str.slice(0, 4) | 0;
var mon = str.slice(4, 6) | 0;
var day = str.slice(6, 8) | 0;
var hour = str.slice(8, 10) | 0;
var min = str.slice(10, 12) | 0;
var sec = str.slice(12, 14) | 0;
} else if (tag === 'utctime') {
var year = str.slice(0, 2) | 0;
var mon = str.slice(2, 4) | 0;
var day = str.slice(4, 6) | 0;
var hour = str.slice(6, 8) | 0;
var min = str.slice(8, 10) | 0;
var sec = str.slice(10, 12) | 0;
if (year < 70)
year = 2000 + year;
else
year = 1900 + year;
} else {
return buffer.error('Decoding ' + tag + ' time is not supported yet');
}
return Date.UTC(year, mon - 1, day, hour, min, sec, 0);
};
DERNode.prototype._decodeNull = function decodeNull(buffer) {
return null;
};
DERNode.prototype._decodeBool = function decodeBool(buffer) {
var res = buffer.readUInt8();
if (buffer.isError(res))
return res;
else
return res !== 0;
};
DERNode.prototype._decodeInt = function decodeInt(buffer, values) {
// Bigint, return as it is (assume big endian)
var raw = buffer.raw();
var res = new bignum(raw);
if (values)
res = values[res.toString(10)] || res;
return res;
};
DERNode.prototype._use = function use(entity, obj) {
if (typeof entity === 'function')
entity = entity(obj);
return entity._getDecoder('der').tree;
};
// Utility methods
function derDecodeTag(buf, fail) {
var tag = buf.readUInt8(fail);
if (buf.isError(tag))
return tag;
var cls = der.tagClass[tag >> 6];
var primitive = (tag & 0x20) === 0;
// Multi-octet tag - load
if ((tag & 0x1f) === 0x1f) {
var oct = tag;
tag = 0;
while ((oct & 0x80) === 0x80) {
oct = buf.readUInt8(fail);
if (buf.isError(oct))
return oct;
tag <<= 7;
tag |= oct & 0x7f;
}
} else {
tag &= 0x1f;
}
var tagStr = der.tag[tag];
return {
cls: cls,
primitive: primitive,
tag: tag,
tagStr: tagStr
};
}
function derDecodeLen(buf, primitive, fail) {
var len = buf.readUInt8(fail);
if (buf.isError(len))
return len;
// Indefinite form
if (!primitive && len === 0x80)
return null;
// Definite form
if ((len & 0x80) === 0) {
// Short form
return len;
}
// Long form
var num = len & 0x7f;
if (num > 4)
return buf.error('length octect is too long');
len = 0;
for (var i = 0; i < num; i++) {
len <<= 8;
var j = buf.readUInt8(fail);
if (buf.isError(j))
return j;
len |= j;
}
return len;
}
},{"../../asn1":19,"inherits":119}],28:[function(require,module,exports){
var decoders = exports;
decoders.der = require('./der');
decoders.pem = require('./pem');
},{"./der":27,"./pem":29}],29:[function(require,module,exports){
var inherits = require('inherits');
var Buffer = require('buffer').Buffer;
var DERDecoder = require('./der');
function PEMDecoder(entity) {
DERDecoder.call(this, entity);
this.enc = 'pem';
};
inherits(PEMDecoder, DERDecoder);
module.exports = PEMDecoder;
PEMDecoder.prototype.decode = function decode(data, options) {
var lines = data.toString().split(/[\r\n]+/g);
var label = options.label.toUpperCase();
var re = /^-----(BEGIN|END) ([^-]+)-----$/;
var start = -1;
var end = -1;
for (var i = 0; i < lines.length; i++) {
var match = lines[i].match(re);
if (match === null)
continue;
if (match[2] !== label)
continue;
if (start === -1) {
if (match[1] !== 'BEGIN')
break;
start = i;
} else {
if (match[1] !== 'END')
break;
end = i;
break;
}
}
if (start === -1 || end === -1)
throw new Error('PEM section not found for: ' + label);
var base64 = lines.slice(start + 1, end).join('');
// Remove excessive symbols
base64.replace(/[^a-z0-9\+\/=]+/gi, '');
var input = new Buffer(base64, 'base64');
return DERDecoder.prototype.decode.call(this, input, options);
};
},{"./der":27,"buffer":65,"inherits":119}],30:[function(require,module,exports){
var inherits = require('inherits');
var Buffer = require('buffer').Buffer;
var asn1 = require('../../asn1');
var base = asn1.base;
// Import DER constants
var der = asn1.constants.der;
function DEREncoder(entity) {
this.enc = 'der';
this.name = entity.name;
this.entity = entity;
// Construct base tree
this.tree = new DERNode();
this.tree._init(entity.body);
};
module.exports = DEREncoder;
DEREncoder.prototype.encode = function encode(data, reporter) {
return this.tree._encode(data, reporter).join();
};
// Tree methods
function DERNode(parent) {
base.Node.call(this, 'der', parent);
}
inherits(DERNode, base.Node);
DERNode.prototype._encodeComposite = function encodeComposite(tag,
primitive,
cls,
content) {
var encodedTag = encodeTag(tag, primitive, cls, this.reporter);
// Short form
if (content.length < 0x80) {
var header = new Buffer(2);
header[0] = encodedTag;
header[1] = content.length;
return this._createEncoderBuffer([ header, content ]);
}
// Long form
// Count octets required to store length
var lenOctets = 1;
for (var i = content.length; i >= 0x100; i >>= 8)
lenOctets++;
var header = new Buffer(1 + 1 + lenOctets);
header[0] = encodedTag;
header[1] = 0x80 | lenOctets;
for (var i = 1 + lenOctets, j = content.length; j > 0; i--, j >>= 8)
header[i] = j & 0xff;
return this._createEncoderBuffer([ header, content ]);
};
DERNode.prototype._encodeStr = function encodeStr(str, tag) {
if (tag === 'bitstr') {
return this._createEncoderBuffer([ str.unused | 0, str.data ]);
} else if (tag === 'bmpstr') {
var buf = new Buffer(str.length * 2);
for (var i = 0; i < str.length; i++) {
buf.writeUInt16BE(str.charCodeAt(i), i * 2);
}
return this._createEncoderBuffer(buf);
} else if (tag === 'numstr') {
if (!this._isNumstr(str)) {
return this.reporter.error('Encoding of string type: numstr supports ' +
'only digits and space');
}
return this._createEncoderBuffer(str);
} else if (tag === 'printstr') {
if (!this._isPrintstr(str)) {
return this.reporter.error('Encoding of string type: printstr supports ' +
'only latin upper and lower case letters, ' +
'digits, space, apostrophe, left and rigth ' +
'parenthesis, plus sign, comma, hyphen, ' +
'dot, slash, colon, equal sign, ' +
'question mark');
}
return this._createEncoderBuffer(str);
} else if (/str$/.test(tag)) {
return this._createEncoderBuffer(str);
} else if (tag === 'objDesc') {
return this._createEncoderBuffer(str);
} else {
return this.reporter.error('Encoding of string type: ' + tag +
' unsupported');
}
};
DERNode.prototype._encodeObjid = function encodeObjid(id, values, relative) {
if (typeof id === 'string') {
if (!values)
return this.reporter.error('string objid given, but no values map found');
if (!values.hasOwnProperty(id))
return this.reporter.error('objid not found in values map');
id = values[id].split(/[\s\.]+/g);
for (var i = 0; i < id.length; i++)
id[i] |= 0;
} else if (Array.isArray(id)) {
id = id.slice();
for (var i = 0; i < id.length; i++)
id[i] |= 0;
}
if (!Array.isArray(id)) {
return this.reporter.error('objid() should be either array or string, ' +
'got: ' + JSON.stringify(id));
}
if (!relative) {
if (id[1] >= 40)
return this.reporter.error('Second objid identifier OOB');
id.splice(0, 2, id[0] * 40 + id[1]);
}
// Count number of octets
var size = 0;
for (var i = 0; i < id.length; i++) {
var ident = id[i];
for (size++; ident >= 0x80; ident >>= 7)
size++;
}
var objid = new Buffer(size);
var offset = objid.length - 1;
for (var i = id.length - 1; i >= 0; i--) {
var ident = id[i];
objid[offset--] = ident & 0x7f;
while ((ident >>= 7) > 0)
objid[offset--] = 0x80 | (ident & 0x7f);
}
return this._createEncoderBuffer(objid);
};
function two(num) {
if (num < 10)
return '0' + num;
else
return num;
}
DERNode.prototype._encodeTime = function encodeTime(time, tag) {
var str;
var date = new Date(time);
if (tag === 'gentime') {
str = [
two(date.getFullYear()),
two(date.getUTCMonth() + 1),
two(date.getUTCDate()),
two(date.getUTCHours()),
two(date.getUTCMinutes()),
two(date.getUTCSeconds()),
'Z'
].join('');
} else if (tag === 'utctime') {
str = [
two(date.getFullYear() % 100),
two(date.getUTCMonth() + 1),
two(date.getUTCDate()),
two(date.getUTCHours()),
two(date.getUTCMinutes()),
two(date.getUTCSeconds()),
'Z'
].join('');
} else {
this.reporter.error('Encoding ' + tag + ' time is not supported yet');
}
return this._encodeStr(str, 'octstr');
};
DERNode.prototype._encodeNull = function encodeNull() {
return this._createEncoderBuffer('');
};
DERNode.prototype._encodeInt = function encodeInt(num, values) {
if (typeof num === 'string') {
if (!values)
return this.reporter.error('String int or enum given, but no values map');
if (!values.hasOwnProperty(num)) {
return this.reporter.error('Values map doesn\'t contain: ' +
JSON.stringify(num));
}
num = values[num];
}
// Bignum, assume big endian
if (typeof num !== 'number' && !Buffer.isBuffer(num)) {
var numArray = num.toArray();
if (!num.sign && numArray[0] & 0x80) {
numArray.unshift(0);
}
num = new Buffer(numArray);
}
if (Buffer.isBuffer(num)) {
var size = num.length;
if (num.length === 0)
size++;
var out = new Buffer(size);
num.copy(out);
if (num.length === 0)
out[0] = 0
return this._createEncoderBuffer(out);
}
if (num < 0x80)
return this._createEncoderBuffer(num);
if (num < 0x100)
return this._createEncoderBuffer([0, num]);
var size = 1;
for (var i = num; i >= 0x100; i >>= 8)
size++;
var out = new Array(size);
for (var i = out.length - 1; i >= 0; i--) {
out[i] = num & 0xff;
num >>= 8;
}
if(out[0] & 0x80) {
out.unshift(0);
}
return this._createEncoderBuffer(new Buffer(out));
};
DERNode.prototype._encodeBool = function encodeBool(value) {
return this._createEncoderBuffer(value ? 0xff : 0);
};
DERNode.prototype._use = function use(entity, obj) {
if (typeof entity === 'function')
entity = entity(obj);
return entity._getEncoder('der').tree;
};
DERNode.prototype._skipDefault = function skipDefault(dataBuffer, reporter, parent) {
var state = this._baseState;
var i;
if (state['default'] === null)
return false;
var data = dataBuffer.join();
if (state.defaultBuffer === undefined)
state.defaultBuffer = this._encodeValue(state['default'], reporter, parent).join();
if (data.length !== state.defaultBuffer.length)
return false;
for (i=0; i < data.length; i++)
if (data[i] !== state.defaultBuffer[i])
return false;
return true;
};
// Utility methods
function encodeTag(tag, primitive, cls, reporter) {
var res;
if (tag === 'seqof')
tag = 'seq';
else if (tag === 'setof')
tag = 'set';
if (der.tagByName.hasOwnProperty(tag))
res = der.tagByName[tag];
else if (typeof tag === 'number' && (tag | 0) === tag)
res = tag;
else
return reporter.error('Unknown tag: ' + tag);
if (res >= 0x1f)
return reporter.error('Multi-octet tag encoding unsupported');
if (!primitive)
res |= 0x20;
res |= (der.tagClassByName[cls || 'universal'] << 6);
return res;
}
},{"../../asn1":19,"buffer":65,"inherits":119}],31:[function(require,module,exports){
var encoders = exports;
encoders.der = require('./der');
encoders.pem = require('./pem');
},{"./der":30,"./pem":32}],32:[function(require,module,exports){
var inherits = require('inherits');
var DEREncoder = require('./der');
function PEMEncoder(entity) {
DEREncoder.call(this, entity);
this.enc = 'pem';
};
inherits(PEMEncoder, DEREncoder);
module.exports = PEMEncoder;
PEMEncoder.prototype.encode = function encode(data, options) {
var buf = DEREncoder.prototype.encode.call(this, data);
var p = buf.toString('base64');
var out = [ '-----BEGIN ' + options.label + '-----' ];
for (var i = 0; i < p.length; i += 64)
out.push(p.slice(i, i + 64));
out.push('-----END ' + options.label + '-----');
return out.join('\n');
};
},{"./der":30,"inherits":119}],33:[function(require,module,exports){
'use strict'
exports.byteLength = byteLength
exports.toByteArray = toByteArray
exports.fromByteArray = fromByteArray
var lookup = []
var revLookup = []
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i]
revLookup[code.charCodeAt(i)] = i
}
revLookup['-'.charCodeAt(0)] = 62
revLookup['_'.charCodeAt(0)] = 63
function placeHoldersCount (b64) {
var len = b64.length
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// the number of equal signs (place holders)
// if there are two placeholders, than the two characters before it
// represent one byte
// if there is only one, then the three characters before it represent 2 bytes
// this is just a cheap hack to not do indexOf twice
return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
}
function byteLength (b64) {
// base64 is 4/3 + up to two characters of the original data
return (b64.length * 3 / 4) - placeHoldersCount(b64)
}
function toByteArray (b64) {
var i, l, tmp, placeHolders, arr
var len = b64.length
placeHolders = placeHoldersCount(b64)
arr = new Arr((len * 3 / 4) - placeHolders)
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? len - 4 : len
var L = 0
for (i = 0; i < l; i += 4) {
tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
arr[L++] = (tmp >> 16) & 0xFF
arr[L++] = (tmp >> 8) & 0xFF
arr[L++] = tmp & 0xFF
}
if (placeHolders === 2) {
tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
arr[L++] = tmp & 0xFF
} else if (placeHolders === 1) {
tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
arr[L++] = (tmp >> 8) & 0xFF
arr[L++] = tmp & 0xFF
}
return arr
}
function tripletToBase64 (num) {
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp
var output = []
for (var i = start; i < end; i += 3) {
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
output.push(tripletToBase64(tmp))
}
return output.join('')
}
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var output = ''
var parts = []
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1]
output += lookup[tmp >> 2]
output += lookup[(tmp << 4) & 0x3F]
output += '=='
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
output += lookup[tmp >> 10]
output += lookup[(tmp >> 4) & 0x3F]
output += lookup[(tmp << 2) & 0x3F]
output += '='
}
parts.push(output)
return parts.join('')
}
},{}],34:[function(require,module,exports){
(function (module, exports) {
'use strict';
// Utils
function assert (val, msg) {
if (!val) throw new Error(msg || 'Assertion failed');
}
// Could use `inherits` module, but don't want to move from single file
// architecture yet.
function inherits (ctor, superCtor) {
ctor.super_ = superCtor;
var TempCtor = function () {};
TempCtor.prototype = superCtor.prototype;
ctor.prototype = new TempCtor();
ctor.prototype.constructor = ctor;
}
// BN
function BN (number, base, endian) {
if (BN.isBN(number)) {
return number;
}
this.negative = 0;
this.words = null;
this.length = 0;
// Reduction context
this.red = null;
if (number !== null) {
if (base === 'le' || base === 'be') {
endian = base;
base = 10;
}
this._init(number || 0, base || 10, endian || 'be');
}
}
if (typeof module === 'object') {
module.exports = BN;
} else {
exports.BN = BN;
}
BN.BN = BN;
BN.wordSize = 26;
var Buffer;
try {
Buffer = require('buffer').Buffer;
} catch (e) {
}
BN.isBN = function isBN (num) {
if (num instanceof BN) {
return true;
}
return num !== null && typeof num === 'object' &&
num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);
};
BN.max = function max (left, right) {
if (left.cmp(right) > 0) return left;
return right;
};
BN.min = function min (left, right) {
if (left.cmp(right) < 0) return left;
return right;
};
BN.prototype._init = function init (number, base, endian) {
if (typeof number === 'number') {
return this._initNumber(number, base, endian);
}
if (typeof number === 'object') {
return this._initArray(number, base, endian);
}
if (base === 'hex') {
base = 16;
}
assert(base === (base | 0) && base >= 2 && base <= 36);
number = number.toString().replace(/\s+/g, '');
var start = 0;
if (number[0] === '-') {
start++;
}
if (base === 16) {
this._parseHex(number, start);
} else {
this._parseBase(number, base, start);
}
if (number[0] === '-') {
this.negative = 1;
}
this.strip();
if (endian !== 'le') return;
this._initArray(this.toArray(), base, endian);
};
BN.prototype._initNumber = function _initNumber (number, base, endian) {
if (number < 0) {
this.negative = 1;
number = -number;
}
if (number < 0x4000000) {
this.words = [ number & 0x3ffffff ];
this.length = 1;
} else if (number < 0x10000000000000) {
this.words = [
number & 0x3ffffff,
(number / 0x4000000) & 0x3ffffff
];
this.length = 2;
} else {
assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)
this.words = [
number & 0x3ffffff,
(number / 0x4000000) & 0x3ffffff,
1
];
this.length = 3;
}
if (endian !== 'le') return;
// Reverse the bytes
this._initArray(this.toArray(), base, endian);
};
BN.prototype._initArray = function _initArray (number, base, endian) {
// Perhaps a Uint8Array
assert(typeof number.length === 'number');
if (number.length <= 0) {
this.words = [ 0 ];
this.length = 1;
return this;
}
this.length = Math.ceil(number.length / 3);
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++) {
this.words[i] = 0;
}
var j, w;
var off = 0;
if (endian === 'be') {
for (i = number.length - 1, j = 0; i >= 0; i -= 3) {
w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);
this.words[j] |= (w << off) & 0x3ffffff;
this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
off += 24;
if (off >= 26) {
off -= 26;
j++;
}
}
} else if (endian === 'le') {
for (i = 0, j = 0; i < number.length; i += 3) {
w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);
this.words[j] |= (w << off) & 0x3ffffff;
this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;
off += 24;
if (off >= 26) {
off -= 26;
j++;
}
}
}
return this.strip();
};
function parseHex (str, start, end) {
var r = 0;
var len = Math.min(str.length, end);
for (var i = start; i < len; i++) {
var c = str.charCodeAt(i) - 48;
r <<= 4;
// 'a' - 'f'
if (c >= 49 && c <= 54) {
r |= c - 49 + 0xa;
// 'A' - 'F'
} else if (c >= 17 && c <= 22) {
r |= c - 17 + 0xa;
// '0' - '9'
} else {
r |= c & 0xf;
}
}
return r;
}
BN.prototype._parseHex = function _parseHex (number, start) {
// Create possibly bigger array to ensure that it fits the number
this.length = Math.ceil((number.length - start) / 6);
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++) {
this.words[i] = 0;
}
var j, w;
// Scan 24-bit chunks and add them to the number
var off = 0;
for (i = number.length - 6, j = 0; i >= start; i -= 6) {
w = parseHex(number, i, i + 6);
this.words[j] |= (w << off) & 0x3ffffff;
// NOTE: `0x3fffff` is intentional here, 26bits max shift + 24bit hex limb
this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
off += 24;
if (off >= 26) {
off -= 26;
j++;
}
}
if (i + 6 !== start) {
w = parseHex(number, start, i + 6);
this.words[j] |= (w << off) & 0x3ffffff;
this.words[j + 1] |= w >>> (26 - off) & 0x3fffff;
}
this.strip();
};
function parseBase (str, start, end, mul) {
var r = 0;
var len = Math.min(str.length, end);
for (var i = start; i < len; i++) {
var c = str.charCodeAt(i) - 48;
r *= mul;
// 'a'
if (c >= 49) {
r += c - 49 + 0xa;
// 'A'
} else if (c >= 17) {
r += c - 17 + 0xa;
// '0' - '9'
} else {
r += c;
}
}
return r;
}
BN.prototype._parseBase = function _parseBase (number, base, start) {
// Initialize as zero
this.words = [ 0 ];
this.length = 1;
// Find length of limb in base
for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {
limbLen++;
}
limbLen--;
limbPow = (limbPow / base) | 0;
var total = number.length - start;
var mod = total % limbLen;
var end = Math.min(total, total - mod) + start;
var word = 0;
for (var i = start; i < end; i += limbLen) {
word = parseBase(number, i, i + limbLen, base);
this.imuln(limbPow);
if (this.words[0] + word < 0x4000000) {
this.words[0] += word;
} else {
this._iaddn(word);
}
}
if (mod !== 0) {
var pow = 1;
word = parseBase(number, i, number.length, base);
for (i = 0; i < mod; i++) {
pow *= base;
}
this.imuln(pow);
if (this.words[0] + word < 0x4000000) {
this.words[0] += word;
} else {
this._iaddn(word);
}
}
};
BN.prototype.copy = function copy (dest) {
dest.words = new Array(this.length);
for (var i = 0; i < this.length; i++) {
dest.words[i] = this.words[i];
}
dest.length = this.length;
dest.negative = this.negative;
dest.red = this.red;
};
BN.prototype.clone = function clone () {
var r = new BN(null);
this.copy(r);
return r;
};
BN.prototype._expand = function _expand (size) {
while (this.length < size) {
this.words[this.length++] = 0;
}
return this;
};
// Remove leading `0` from `this`
BN.prototype.strip = function strip () {
while (this.length > 1 && this.words[this.length - 1] === 0) {
this.length--;
}
return this._normSign();
};
BN.prototype._normSign = function _normSign () {
// -0 = 0
if (this.length === 1 && this.words[0] === 0) {
this.negative = 0;
}
return this;
};
BN.prototype.inspect = function inspect () {
return (this.red ? '<BN-R: ' : '<BN: ') + this.toString(16) + '>';
};
/*
var zeros = [];
var groupSizes = [];
var groupBases = [];
var s = '';
var i = -1;
while (++i < BN.wordSize) {
zeros[i] = s;
s += '0';
}
groupSizes[0] = 0;
groupSizes[1] = 0;
groupBases[0] = 0;
groupBases[1] = 0;
var base = 2 - 1;
while (++base < 36 + 1) {
var groupSize = 0;
var groupBase = 1;
while (groupBase < (1 << BN.wordSize) / base) {
groupBase *= base;
groupSize += 1;
}
groupSizes[base] = groupSize;
groupBases[base] = groupBase;
}
*/
var zeros = [
'',
'0',
'00',
'000',
'0000',
'00000',
'000000',
'0000000',
'00000000',
'000000000',
'0000000000',
'00000000000',
'000000000000',
'0000000000000',
'00000000000000',
'000000000000000',
'0000000000000000',
'00000000000000000',
'000000000000000000',
'0000000000000000000',
'00000000000000000000',
'000000000000000000000',
'0000000000000000000000',
'00000000000000000000000',
'000000000000000000000000',
'0000000000000000000000000'
];
var groupSizes = [
0, 0,
25, 16, 12, 11, 10, 9, 8,
8, 7, 7, 7, 7, 6, 6,
6, 6, 6, 6, 6, 5, 5,
5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5
];
var groupBases = [
0, 0,
33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,
43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,
16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,
6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176
];
BN.prototype.toString = function toString (base, padding) {
base = base || 10;
padding = padding | 0 || 1;
var out;
if (base === 16 || base === 'hex') {
out = '';
var off = 0;
var carry = 0;
for (var i = 0; i < this.length; i++) {
var w = this.words[i];
var word = (((w << off) | carry) & 0xffffff).toString(16);
carry = (w >>> (24 - off)) & 0xffffff;
if (carry !== 0 || i !== this.length - 1) {
out = zeros[6 - word.length] + word + out;
} else {
out = word + out;
}
off += 2;
if (off >= 26) {
off -= 26;
i--;
}
}
if (carry !== 0) {
out = carry.toString(16) + out;
}
while (out.length % padding !== 0) {
out = '0' + out;
}
if (this.negative !== 0) {
out = '-' + out;
}
return out;
}
if (base === (base | 0) && base >= 2 && base <= 36) {
// var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));
var groupSize = groupSizes[base];
// var groupBase = Math.pow(base, groupSize);
var groupBase = groupBases[base];
out = '';
var c = this.clone();
c.negative = 0;
while (!c.isZero()) {
var r = c.modn(groupBase).toString(base);
c = c.idivn(groupBase);
if (!c.isZero()) {
out = zeros[groupSize - r.length] + r + out;
} else {
out = r + out;
}
}
if (this.isZero()) {
out = '0' + out;
}
while (out.length % padding !== 0) {
out = '0' + out;
}
if (this.negative !== 0) {
out = '-' + out;
}
return out;
}
assert(false, 'Base should be between 2 and 36');
};
BN.prototype.toNumber = function toNumber () {
var ret = this.words[0];
if (this.length === 2) {
ret += this.words[1] * 0x4000000;
} else if (this.length === 3 && this.words[2] === 0x01) {
// NOTE: at this stage it is known that the top bit is set
ret += 0x10000000000000 + (this.words[1] * 0x4000000);
} else if (this.length > 2) {
assert(false, 'Number can only safely store up to 53 bits');
}
return (this.negative !== 0) ? -ret : ret;
};
BN.prototype.toJSON = function toJSON () {
return this.toString(16);
};
BN.prototype.toBuffer = function toBuffer (endian, length) {
assert(typeof Buffer !== 'undefined');
return this.toArrayLike(Buffer, endian, length);
};
BN.prototype.toArray = function toArray (endian, length) {
return this.toArrayLike(Array, endian, length);
};
BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {
var byteLength = this.byteLength();
var reqLength = length || Math.max(1, byteLength);
assert(byteLength <= reqLength, 'byte array longer than desired length');
assert(reqLength > 0, 'Requested array length <= 0');
this.strip();
var littleEndian = endian === 'le';
var res = new ArrayType(reqLength);
var b, i;
var q = this.clone();
if (!littleEndian) {
// Assume big-endian
for (i = 0; i < reqLength - byteLength; i++) {
res[i] = 0;
}
for (i = 0; !q.isZero(); i++) {
b = q.andln(0xff);
q.iushrn(8);
res[reqLength - i - 1] = b;
}
} else {
for (i = 0; !q.isZero(); i++) {
b = q.andln(0xff);
q.iushrn(8);
res[i] = b;
}
for (; i < reqLength; i++) {
res[i] = 0;
}
}
return res;
};
if (Math.clz32) {
BN.prototype._countBits = function _countBits (w) {
return 32 - Math.clz32(w);
};
} else {
BN.prototype._countBits = function _countBits (w) {
var t = w;
var r = 0;
if (t >= 0x1000) {
r += 13;
t >>>= 13;
}
if (t >= 0x40) {
r += 7;
t >>>= 7;
}
if (t >= 0x8) {
r += 4;
t >>>= 4;
}
if (t >= 0x02) {
r += 2;
t >>>= 2;
}
return r + t;
};
}
BN.prototype._zeroBits = function _zeroBits (w) {
// Short-cut
if (w === 0) return 26;
var t = w;
var r = 0;
if ((t & 0x1fff) === 0) {
r += 13;
t >>>= 13;
}
if ((t & 0x7f) === 0) {
r += 7;
t >>>= 7;
}
if ((t & 0xf) === 0) {
r += 4;
t >>>= 4;
}
if ((t & 0x3) === 0) {
r += 2;
t >>>= 2;
}
if ((t & 0x1) === 0) {
r++;
}
return r;
};
// Return number of used bits in a BN
BN.prototype.bitLength = function bitLength () {
var w = this.words[this.length - 1];
var hi = this._countBits(w);
return (this.length - 1) * 26 + hi;
};
function toBitArray (num) {
var w = new Array(num.bitLength());
for (var bit = 0; bit < w.length; bit++) {
var off = (bit / 26) | 0;
var wbit = bit % 26;
w[bit] = (num.words[off] & (1 << wbit)) >>> wbit;
}
return w;
}
// Number of trailing zero bits
BN.prototype.zeroBits = function zeroBits () {
if (this.isZero()) return 0;
var r = 0;
for (var i = 0; i < this.length; i++) {
var b = this._zeroBits(this.words[i]);
r += b;
if (b !== 26) break;
}
return r;
};
BN.prototype.byteLength = function byteLength () {
return Math.ceil(this.bitLength() / 8);
};
BN.prototype.toTwos = function toTwos (width) {
if (this.negative !== 0) {
return this.abs().inotn(width).iaddn(1);
}
return this.clone();
};
BN.prototype.fromTwos = function fromTwos (width) {
if (this.testn(width - 1)) {
return this.notn(width).iaddn(1).ineg();
}
return this.clone();
};
BN.prototype.isNeg = function isNeg () {
return this.negative !== 0;
};
// Return negative clone of `this`
BN.prototype.neg = function neg () {
return this.clone().ineg();
};
BN.prototype.ineg = function ineg () {
if (!this.isZero()) {
this.negative ^= 1;
}
return this;
};
// Or `num` with `this` in-place
BN.prototype.iuor = function iuor (num) {
while (this.length < num.length) {
this.words[this.length++] = 0;
}
for (var i = 0; i < num.length; i++) {
this.words[i] = this.words[i] | num.words[i];
}
return this.strip();
};
BN.prototype.ior = function ior (num) {
assert((this.negative | num.negative) === 0);
return this.iuor(num);
};
// Or `num` with `this`
BN.prototype.or = function or (num) {
if (this.length > num.length) return this.clone().ior(num);
return num.clone().ior(this);
};
BN.prototype.uor = function uor (num) {
if (this.length > num.length) return this.clone().iuor(num);
return num.clone().iuor(this);
};
// And `num` with `this` in-place
BN.prototype.iuand = function iuand (num) {
// b = min-length(num, this)
var b;
if (this.length > num.length) {
b = num;
} else {
b = this;
}
for (var i = 0; i < b.length; i++) {
this.words[i] = this.words[i] & num.words[i];
}
this.length = b.length;
return this.strip();
};
BN.prototype.iand = function iand (num) {
assert((this.negative | num.negative) === 0);
return this.iuand(num);
};
// And `num` with `this`
BN.prototype.and = function and (num) {
if (this.length > num.length) return this.clone().iand(num);
return num.clone().iand(this);
};
BN.prototype.uand = function uand (num) {
if (this.length > num.length) return this.clone().iuand(num);
return num.clone().iuand(this);
};
// Xor `num` with `this` in-place
BN.prototype.iuxor = function iuxor (num) {
// a.length > b.length
var a;
var b;
if (this.length > num.length) {
a = this;
b = num;
} else {
a = num;
b = this;
}
for (var i = 0; i < b.length; i++) {
this.words[i] = a.words[i] ^ b.words[i];
}
if (this !== a) {
for (; i < a.length; i++) {
this.words[i] = a.words[i];
}
}
this.length = a.length;
return this.strip();
};
BN.prototype.ixor = function ixor (num) {
assert((this.negative | num.negative) === 0);
return this.iuxor(num);
};
// Xor `num` with `this`
BN.prototype.xor = function xor (num) {
if (this.length > num.length) return this.clone().ixor(num);
return num.clone().ixor(this);
};
BN.prototype.uxor = function uxor (num) {
if (this.length > num.length) return this.clone().iuxor(num);
return num.clone().iuxor(this);
};
// Not ``this`` with ``width`` bitwidth
BN.prototype.inotn = function inotn (width) {
assert(typeof width === 'number' && width >= 0);
var bytesNeeded = Math.ceil(width / 26) | 0;
var bitsLeft = width % 26;
// Extend the buffer with leading zeroes
this._expand(bytesNeeded);
if (bitsLeft > 0) {
bytesNeeded--;
}
// Handle complete words
for (var i = 0; i < bytesNeeded; i++) {
this.words[i] = ~this.words[i] & 0x3ffffff;
}
// Handle the residue
if (bitsLeft > 0) {
this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));
}
// And remove leading zeroes
return this.strip();
};
BN.prototype.notn = function notn (width) {
return this.clone().inotn(width);
};
// Set `bit` of `this`
BN.prototype.setn = function setn (bit, val) {
assert(typeof bit === 'number' && bit >= 0);
var off = (bit / 26) | 0;
var wbit = bit % 26;
this._expand(off + 1);
if (val) {
this.words[off] = this.words[off] | (1 << wbit);
} else {
this.words[off] = this.words[off] & ~(1 << wbit);
}
return this.strip();
};
// Add `num` to `this` in-place
BN.prototype.iadd = function iadd (num) {
var r;
// negative + positive
if (this.negative !== 0 && num.negative === 0) {
this.negative = 0;
r = this.isub(num);
this.negative ^= 1;
return this._normSign();
// positive + negative
} else if (this.negative === 0 && num.negative !== 0) {
num.negative = 0;
r = this.isub(num);
num.negative = 1;
return r._normSign();
}
// a.length > b.length
var a, b;
if (this.length > num.length) {
a = this;
b = num;
} else {
a = num;
b = this;
}
var carry = 0;
for (var i = 0; i < b.length; i++) {
r = (a.words[i] | 0) + (b.words[i] | 0) + carry;
this.words[i] = r & 0x3ffffff;
carry = r >>> 26;
}
for (; carry !== 0 && i < a.length; i++) {
r = (a.words[i] | 0) + carry;
this.words[i] = r & 0x3ffffff;
carry = r >>> 26;
}
this.length = a.length;
if (carry !== 0) {
this.words[this.length] = carry;
this.length++;
// Copy the rest of the words
} else if (a !== this) {
for (; i < a.length; i++) {
this.words[i] = a.words[i];
}
}
return this;
};
// Add `num` to `this`
BN.prototype.add = function add (num) {
var res;
if (num.negative !== 0 && this.negative === 0) {
num.negative = 0;
res = this.sub(num);
num.negative ^= 1;
return res;
} else if (num.negative === 0 && this.negative !== 0) {
this.negative = 0;
res = num.sub(this);
this.negative = 1;
return res;
}
if (this.length > num.length) return this.clone().iadd(num);
return num.clone().iadd(this);
};
// Subtract `num` from `this` in-place
BN.prototype.isub = function isub (num) {
// this - (-num) = this + num
if (num.negative !== 0) {
num.negative = 0;
var r = this.iadd(num);
num.negative = 1;
return r._normSign();
// -this - num = -(this + num)
} else if (this.negative !== 0) {
this.negative = 0;
this.iadd(num);
this.negative = 1;
return this._normSign();
}
// At this point both numbers are positive
var cmp = this.cmp(num);
// Optimization - zeroify
if (cmp === 0) {
this.negative = 0;
this.length = 1;
this.words[0] = 0;
return this;
}
// a > b
var a, b;
if (cmp > 0) {
a = this;
b = num;
} else {
a = num;
b = this;
}
var carry = 0;
for (var i = 0; i < b.length; i++) {
r = (a.words[i] | 0) - (b.words[i] | 0) + carry;
carry = r >> 26;
this.words[i] = r & 0x3ffffff;
}
for (; carry !== 0 && i < a.length; i++) {
r = (a.words[i] | 0) + carry;
carry = r >> 26;
this.words[i] = r & 0x3ffffff;
}
// Copy rest of the words
if (carry === 0 && i < a.length && a !== this) {
for (; i < a.length; i++) {
this.words[i] = a.words[i];
}
}
this.length = Math.max(this.length, i);
if (a !== this) {
this.negative = 1;
}
return this.strip();
};
// Subtract `num` from `this`
BN.prototype.sub = function sub (num) {
return this.clone().isub(num);
};
function smallMulTo (self, num, out) {
out.negative = num.negative ^ self.negative;
var len = (self.length + num.length) | 0;
out.length = len;
len = (len - 1) | 0;
// Peel one iteration (compiler can't do it, because of code complexity)
var a = self.words[0] | 0;
var b = num.words[0] | 0;
var r = a * b;
var lo = r & 0x3ffffff;
var carry = (r / 0x4000000) | 0;
out.words[0] = lo;
for (var k = 1; k < len; k++) {
// Sum all words with the same `i + j = k` and accumulate `ncarry`,
// note that ncarry could be >= 0x3ffffff
var ncarry = carry >>> 26;
var rword = carry & 0x3ffffff;
var maxJ = Math.min(k, num.length - 1);
for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
var i = (k - j) | 0;
a = self.words[i] | 0;
b = num.words[j] | 0;
r = a * b + rword;
ncarry += (r / 0x4000000) | 0;
rword = r & 0x3ffffff;
}
out.words[k] = rword | 0;
carry = ncarry | 0;
}
if (carry !== 0) {
out.words[k] = carry | 0;
} else {
out.length--;
}
return out.strip();
}
// TODO(indutny): it may be reasonable to omit it for users who don't need
// to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit
// multiplication (like elliptic secp256k1).
var comb10MulTo = function comb10MulTo (self, num, out) {
var a = self.words;
var b = num.words;
var o = out.words;
var c = 0;
var lo;
var mid;
var hi;
var a0 = a[0] | 0;
var al0 = a0 & 0x1fff;
var ah0 = a0 >>> 13;
var a1 = a[1] | 0;
var al1 = a1 & 0x1fff;
var ah1 = a1 >>> 13;
var a2 = a[2] | 0;
var al2 = a2 & 0x1fff;
var ah2 = a2 >>> 13;
var a3 = a[3] | 0;
var al3 = a3 & 0x1fff;
var ah3 = a3 >>> 13;
var a4 = a[4] | 0;
var al4 = a4 & 0x1fff;
var ah4 = a4 >>> 13;
var a5 = a[5] | 0;
var al5 = a5 & 0x1fff;
var ah5 = a5 >>> 13;
var a6 = a[6] | 0;
var al6 = a6 & 0x1fff;
var ah6 = a6 >>> 13;
var a7 = a[7] | 0;
var al7 = a7 & 0x1fff;
var ah7 = a7 >>> 13;
var a8 = a[8] | 0;
var al8 = a8 & 0x1fff;
var ah8 = a8 >>> 13;
var a9 = a[9] | 0;
var al9 = a9 & 0x1fff;
var ah9 = a9 >>> 13;
var b0 = b[0] | 0;
var bl0 = b0 & 0x1fff;
var bh0 = b0 >>> 13;
var b1 = b[1] | 0;
var bl1 = b1 & 0x1fff;
var bh1 = b1 >>> 13;
var b2 = b[2] | 0;
var bl2 = b2 & 0x1fff;
var bh2 = b2 >>> 13;
var b3 = b[3] | 0;
var bl3 = b3 & 0x1fff;
var bh3 = b3 >>> 13;
var b4 = b[4] | 0;
var bl4 = b4 & 0x1fff;
var bh4 = b4 >>> 13;
var b5 = b[5] | 0;
var bl5 = b5 & 0x1fff;
var bh5 = b5 >>> 13;
var b6 = b[6] | 0;
var bl6 = b6 & 0x1fff;
var bh6 = b6 >>> 13;
var b7 = b[7] | 0;
var bl7 = b7 & 0x1fff;
var bh7 = b7 >>> 13;
var b8 = b[8] | 0;
var bl8 = b8 & 0x1fff;
var bh8 = b8 >>> 13;
var b9 = b[9] | 0;
var bl9 = b9 & 0x1fff;
var bh9 = b9 >>> 13;
out.negative = self.negative ^ num.negative;
out.length = 19;
/* k = 0 */
lo = Math.imul(al0, bl0);
mid = Math.imul(al0, bh0);
mid = (mid + Math.imul(ah0, bl0)) | 0;
hi = Math.imul(ah0, bh0);
var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;
w0 &= 0x3ffffff;
/* k = 1 */
lo = Math.imul(al1, bl0);
mid = Math.imul(al1, bh0);
mid = (mid + Math.imul(ah1, bl0)) | 0;
hi = Math.imul(ah1, bh0);
lo = (lo + Math.imul(al0, bl1)) | 0;
mid = (mid + Math.imul(al0, bh1)) | 0;
mid = (mid + Math.imul(ah0, bl1)) | 0;
hi = (hi + Math.imul(ah0, bh1)) | 0;
var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;
w1 &= 0x3ffffff;
/* k = 2 */
lo = Math.imul(al2, bl0);
mid = Math.imul(al2, bh0);
mid = (mid + Math.imul(ah2, bl0)) | 0;
hi = Math.imul(ah2, bh0);
lo = (lo + Math.imul(al1, bl1)) | 0;
mid = (mid + Math.imul(al1, bh1)) | 0;
mid = (mid + Math.imul(ah1, bl1)) | 0;
hi = (hi + Math.imul(ah1, bh1)) | 0;
lo = (lo + Math.imul(al0, bl2)) | 0;
mid = (mid + Math.imul(al0, bh2)) | 0;
mid = (mid + Math.imul(ah0, bl2)) | 0;
hi = (hi + Math.imul(ah0, bh2)) | 0;
var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;
w2 &= 0x3ffffff;
/* k = 3 */
lo = Math.imul(al3, bl0);
mid = Math.imul(al3, bh0);
mid = (mid + Math.imul(ah3, bl0)) | 0;
hi = Math.imul(ah3, bh0);
lo = (lo + Math.imul(al2, bl1)) | 0;
mid = (mid + Math.imul(al2, bh1)) | 0;
mid = (mid + Math.imul(ah2, bl1)) | 0;
hi = (hi + Math.imul(ah2, bh1)) | 0;
lo = (lo + Math.imul(al1, bl2)) | 0;
mid = (mid + Math.imul(al1, bh2)) | 0;
mid = (mid + Math.imul(ah1, bl2)) | 0;
hi = (hi + Math.imul(ah1, bh2)) | 0;
lo = (lo + Math.imul(al0, bl3)) | 0;
mid = (mid + Math.imul(al0, bh3)) | 0;
mid = (mid + Math.imul(ah0, bl3)) | 0;
hi = (hi + Math.imul(ah0, bh3)) | 0;
var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;
w3 &= 0x3ffffff;
/* k = 4 */
lo = Math.imul(al4, bl0);
mid = Math.imul(al4, bh0);
mid = (mid + Math.imul(ah4, bl0)) | 0;
hi = Math.imul(ah4, bh0);
lo = (lo + Math.imul(al3, bl1)) | 0;
mid = (mid + Math.imul(al3, bh1)) | 0;
mid = (mid + Math.imul(ah3, bl1)) | 0;
hi = (hi + Math.imul(ah3, bh1)) | 0;
lo = (lo + Math.imul(al2, bl2)) | 0;
mid = (mid + Math.imul(al2, bh2)) | 0;
mid = (mid + Math.imul(ah2, bl2)) | 0;
hi = (hi + Math.imul(ah2, bh2)) | 0;
lo = (lo + Math.imul(al1, bl3)) | 0;
mid = (mid + Math.imul(al1, bh3)) | 0;
mid = (mid + Math.imul(ah1, bl3)) | 0;
hi = (hi + Math.imul(ah1, bh3)) | 0;
lo = (lo + Math.imul(al0, bl4)) | 0;
mid = (mid + Math.imul(al0, bh4)) | 0;
mid = (mid + Math.imul(ah0, bl4)) | 0;
hi = (hi + Math.imul(ah0, bh4)) | 0;
var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;
w4 &= 0x3ffffff;
/* k = 5 */
lo = Math.imul(al5, bl0);
mid = Math.imul(al5, bh0);
mid = (mid + Math.imul(ah5, bl0)) | 0;
hi = Math.imul(ah5, bh0);
lo = (lo + Math.imul(al4, bl1)) | 0;
mid = (mid + Math.imul(al4, bh1)) | 0;
mid = (mid + Math.imul(ah4, bl1)) | 0;
hi = (hi + Math.imul(ah4, bh1)) | 0;
lo = (lo + Math.imul(al3, bl2)) | 0;
mid = (mid + Math.imul(al3, bh2)) | 0;
mid = (mid + Math.imul(ah3, bl2)) | 0;
hi = (hi + Math.imul(ah3, bh2)) | 0;
lo = (lo + Math.imul(al2, bl3)) | 0;
mid = (mid + Math.imul(al2, bh3)) | 0;
mid = (mid + Math.imul(ah2, bl3)) | 0;
hi = (hi + Math.imul(ah2, bh3)) | 0;
lo = (lo + Math.imul(al1, bl4)) | 0;
mid = (mid + Math.imul(al1, bh4)) | 0;
mid = (mid + Math.imul(ah1, bl4)) | 0;
hi = (hi + Math.imul(ah1, bh4)) | 0;
lo = (lo + Math.imul(al0, bl5)) | 0;
mid = (mid + Math.imul(al0, bh5)) | 0;
mid = (mid + Math.imul(ah0, bl5)) | 0;
hi = (hi + Math.imul(ah0, bh5)) | 0;
var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;
w5 &= 0x3ffffff;
/* k = 6 */
lo = Math.imul(al6, bl0);
mid = Math.imul(al6, bh0);
mid = (mid + Math.imul(ah6, bl0)) | 0;
hi = Math.imul(ah6, bh0);
lo = (lo + Math.imul(al5, bl1)) | 0;
mid = (mid + Math.imul(al5, bh1)) | 0;
mid = (mid + Math.imul(ah5, bl1)) | 0;
hi = (hi + Math.imul(ah5, bh1)) | 0;
lo = (lo + Math.imul(al4, bl2)) | 0;
mid = (mid + Math.imul(al4, bh2)) | 0;
mid = (mid + Math.imul(ah4, bl2)) | 0;
hi = (hi + Math.imul(ah4, bh2)) | 0;
lo = (lo + Math.imul(al3, bl3)) | 0;
mid = (mid + Math.imul(al3, bh3)) | 0;
mid = (mid + Math.imul(ah3, bl3)) | 0;
hi = (hi + Math.imul(ah3, bh3)) | 0;
lo = (lo + Math.imul(al2, bl4)) | 0;
mid = (mid + Math.imul(al2, bh4)) | 0;
mid = (mid + Math.imul(ah2, bl4)) | 0;
hi = (hi + Math.imul(ah2, bh4)) | 0;
lo = (lo + Math.imul(al1, bl5)) | 0;
mid = (mid + Math.imul(al1, bh5)) | 0;
mid = (mid + Math.imul(ah1, bl5)) | 0;
hi = (hi + Math.imul(ah1, bh5)) | 0;
lo = (lo + Math.imul(al0, bl6)) | 0;
mid = (mid + Math.imul(al0, bh6)) | 0;
mid = (mid + Math.imul(ah0, bl6)) | 0;
hi = (hi + Math.imul(ah0, bh6)) | 0;
var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;
w6 &= 0x3ffffff;
/* k = 7 */
lo = Math.imul(al7, bl0);
mid = Math.imul(al7, bh0);
mid = (mid + Math.imul(ah7, bl0)) | 0;
hi = Math.imul(ah7, bh0);
lo = (lo + Math.imul(al6, bl1)) | 0;
mid = (mid + Math.imul(al6, bh1)) | 0;
mid = (mid + Math.imul(ah6, bl1)) | 0;
hi = (hi + Math.imul(ah6, bh1)) | 0;
lo = (lo + Math.imul(al5, bl2)) | 0;
mid = (mid + Math.imul(al5, bh2)) | 0;
mid = (mid + Math.imul(ah5, bl2)) | 0;
hi = (hi + Math.imul(ah5, bh2)) | 0;
lo = (lo + Math.imul(al4, bl3)) | 0;
mid = (mid + Math.imul(al4, bh3)) | 0;
mid = (mid + Math.imul(ah4, bl3)) | 0;
hi = (hi + Math.imul(ah4, bh3)) | 0;
lo = (lo + Math.imul(al3, bl4)) | 0;
mid = (mid + Math.imul(al3, bh4)) | 0;
mid = (mid + Math.imul(ah3, bl4)) | 0;
hi = (hi + Math.imul(ah3, bh4)) | 0;
lo = (lo + Math.imul(al2, bl5)) | 0;
mid = (mid + Math.imul(al2, bh5)) | 0;
mid = (mid + Math.imul(ah2, bl5)) | 0;
hi = (hi + Math.imul(ah2, bh5)) | 0;
lo = (lo + Math.imul(al1, bl6)) | 0;
mid = (mid + Math.imul(al1, bh6)) | 0;
mid = (mid + Math.imul(ah1, bl6)) | 0;
hi = (hi + Math.imul(ah1, bh6)) | 0;
lo = (lo + Math.imul(al0, bl7)) | 0;
mid = (mid + Math.imul(al0, bh7)) | 0;
mid = (mid + Math.imul(ah0, bl7)) | 0;
hi = (hi + Math.imul(ah0, bh7)) | 0;
var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;
w7 &= 0x3ffffff;
/* k = 8 */
lo = Math.imul(al8, bl0);
mid = Math.imul(al8, bh0);
mid = (mid + Math.imul(ah8, bl0)) | 0;
hi = Math.imul(ah8, bh0);
lo = (lo + Math.imul(al7, bl1)) | 0;
mid = (mid + Math.imul(al7, bh1)) | 0;
mid = (mid + Math.imul(ah7, bl1)) | 0;
hi = (hi + Math.imul(ah7, bh1)) | 0;
lo = (lo + Math.imul(al6, bl2)) | 0;
mid = (mid + Math.imul(al6, bh2)) | 0;
mid = (mid + Math.imul(ah6, bl2)) | 0;
hi = (hi + Math.imul(ah6, bh2)) | 0;
lo = (lo + Math.imul(al5, bl3)) | 0;
mid = (mid + Math.imul(al5, bh3)) | 0;
mid = (mid + Math.imul(ah5, bl3)) | 0;
hi = (hi + Math.imul(ah5, bh3)) | 0;
lo = (lo + Math.imul(al4, bl4)) | 0;
mid = (mid + Math.imul(al4, bh4)) | 0;
mid = (mid + Math.imul(ah4, bl4)) | 0;
hi = (hi + Math.imul(ah4, bh4)) | 0;
lo = (lo + Math.imul(al3, bl5)) | 0;
mid = (mid + Math.imul(al3, bh5)) | 0;
mid = (mid + Math.imul(ah3, bl5)) | 0;
hi = (hi + Math.imul(ah3, bh5)) | 0;
lo = (lo + Math.imul(al2, bl6)) | 0;
mid = (mid + Math.imul(al2, bh6)) | 0;
mid = (mid + Math.imul(ah2, bl6)) | 0;
hi = (hi + Math.imul(ah2, bh6)) | 0;
lo = (lo + Math.imul(al1, bl7)) | 0;
mid = (mid + Math.imul(al1, bh7)) | 0;
mid = (mid + Math.imul(ah1, bl7)) | 0;
hi = (hi + Math.imul(ah1, bh7)) | 0;
lo = (lo + Math.imul(al0, bl8)) | 0;
mid = (mid + Math.imul(al0, bh8)) | 0;
mid = (mid + Math.imul(ah0, bl8)) | 0;
hi = (hi + Math.imul(ah0, bh8)) | 0;
var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;
w8 &= 0x3ffffff;
/* k = 9 */
lo = Math.imul(al9, bl0);
mid = Math.imul(al9, bh0);
mid = (mid + Math.imul(ah9, bl0)) | 0;
hi = Math.imul(ah9, bh0);
lo = (lo + Math.imul(al8, bl1)) | 0;
mid = (mid + Math.imul(al8, bh1)) | 0;
mid = (mid + Math.imul(ah8, bl1)) | 0;
hi = (hi + Math.imul(ah8, bh1)) | 0;
lo = (lo + Math.imul(al7, bl2)) | 0;
mid = (mid + Math.imul(al7, bh2)) | 0;
mid = (mid + Math.imul(ah7, bl2)) | 0;
hi = (hi + Math.imul(ah7, bh2)) | 0;
lo = (lo + Math.imul(al6, bl3)) | 0;
mid = (mid + Math.imul(al6, bh3)) | 0;
mid = (mid + Math.imul(ah6, bl3)) | 0;
hi = (hi + Math.imul(ah6, bh3)) | 0;
lo = (lo + Math.imul(al5, bl4)) | 0;
mid = (mid + Math.imul(al5, bh4)) | 0;
mid = (mid + Math.imul(ah5, bl4)) | 0;
hi = (hi + Math.imul(ah5, bh4)) | 0;
lo = (lo + Math.imul(al4, bl5)) | 0;
mid = (mid + Math.imul(al4, bh5)) | 0;
mid = (mid + Math.imul(ah4, bl5)) | 0;
hi = (hi + Math.imul(ah4, bh5)) | 0;
lo = (lo + Math.imul(al3, bl6)) | 0;
mid = (mid + Math.imul(al3, bh6)) | 0;
mid = (mid + Math.imul(ah3, bl6)) | 0;
hi = (hi + Math.imul(ah3, bh6)) | 0;
lo = (lo + Math.imul(al2, bl7)) | 0;
mid = (mid + Math.imul(al2, bh7)) | 0;
mid = (mid + Math.imul(ah2, bl7)) | 0;
hi = (hi + Math.imul(ah2, bh7)) | 0;
lo = (lo + Math.imul(al1, bl8)) | 0;
mid = (mid + Math.imul(al1, bh8)) | 0;
mid = (mid + Math.imul(ah1, bl8)) | 0;
hi = (hi + Math.imul(ah1, bh8)) | 0;
lo = (lo + Math.imul(al0, bl9)) | 0;
mid = (mid + Math.imul(al0, bh9)) | 0;
mid = (mid + Math.imul(ah0, bl9)) | 0;
hi = (hi + Math.imul(ah0, bh9)) | 0;
var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;
w9 &= 0x3ffffff;
/* k = 10 */
lo = Math.imul(al9, bl1);
mid = Math.imul(al9, bh1);
mid = (mid + Math.imul(ah9, bl1)) | 0;
hi = Math.imul(ah9, bh1);
lo = (lo + Math.imul(al8, bl2)) | 0;
mid = (mid + Math.imul(al8, bh2)) | 0;
mid = (mid + Math.imul(ah8, bl2)) | 0;
hi = (hi + Math.imul(ah8, bh2)) | 0;
lo = (lo + Math.imul(al7, bl3)) | 0;
mid = (mid + Math.imul(al7, bh3)) | 0;
mid = (mid + Math.imul(ah7, bl3)) | 0;
hi = (hi + Math.imul(ah7, bh3)) | 0;
lo = (lo + Math.imul(al6, bl4)) | 0;
mid = (mid + Math.imul(al6, bh4)) | 0;
mid = (mid + Math.imul(ah6, bl4)) | 0;
hi = (hi + Math.imul(ah6, bh4)) | 0;
lo = (lo + Math.imul(al5, bl5)) | 0;
mid = (mid + Math.imul(al5, bh5)) | 0;
mid = (mid + Math.imul(ah5, bl5)) | 0;
hi = (hi + Math.imul(ah5, bh5)) | 0;
lo = (lo + Math.imul(al4, bl6)) | 0;
mid = (mid + Math.imul(al4, bh6)) | 0;
mid = (mid + Math.imul(ah4, bl6)) | 0;
hi = (hi + Math.imul(ah4, bh6)) | 0;
lo = (lo + Math.imul(al3, bl7)) | 0;
mid = (mid + Math.imul(al3, bh7)) | 0;
mid = (mid + Math.imul(ah3, bl7)) | 0;
hi = (hi + Math.imul(ah3, bh7)) | 0;
lo = (lo + Math.imul(al2, bl8)) | 0;
mid = (mid + Math.imul(al2, bh8)) | 0;
mid = (mid + Math.imul(ah2, bl8)) | 0;
hi = (hi + Math.imul(ah2, bh8)) | 0;
lo = (lo + Math.imul(al1, bl9)) | 0;
mid = (mid + Math.imul(al1, bh9)) | 0;
mid = (mid + Math.imul(ah1, bl9)) | 0;
hi = (hi + Math.imul(ah1, bh9)) | 0;
var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;
w10 &= 0x3ffffff;
/* k = 11 */
lo = Math.imul(al9, bl2);
mid = Math.imul(al9, bh2);
mid = (mid + Math.imul(ah9, bl2)) | 0;
hi = Math.imul(ah9, bh2);
lo = (lo + Math.imul(al8, bl3)) | 0;
mid = (mid + Math.imul(al8, bh3)) | 0;
mid = (mid + Math.imul(ah8, bl3)) | 0;
hi = (hi + Math.imul(ah8, bh3)) | 0;
lo = (lo + Math.imul(al7, bl4)) | 0;
mid = (mid + Math.imul(al7, bh4)) | 0;
mid = (mid + Math.imul(ah7, bl4)) | 0;
hi = (hi + Math.imul(ah7, bh4)) | 0;
lo = (lo + Math.imul(al6, bl5)) | 0;
mid = (mid + Math.imul(al6, bh5)) | 0;
mid = (mid + Math.imul(ah6, bl5)) | 0;
hi = (hi + Math.imul(ah6, bh5)) | 0;
lo = (lo + Math.imul(al5, bl6)) | 0;
mid = (mid + Math.imul(al5, bh6)) | 0;
mid = (mid + Math.imul(ah5, bl6)) | 0;
hi = (hi + Math.imul(ah5, bh6)) | 0;
lo = (lo + Math.imul(al4, bl7)) | 0;
mid = (mid + Math.imul(al4, bh7)) | 0;
mid = (mid + Math.imul(ah4, bl7)) | 0;
hi = (hi + Math.imul(ah4, bh7)) | 0;
lo = (lo + Math.imul(al3, bl8)) | 0;
mid = (mid + Math.imul(al3, bh8)) | 0;
mid = (mid + Math.imul(ah3, bl8)) | 0;
hi = (hi + Math.imul(ah3, bh8)) | 0;
lo = (lo + Math.imul(al2, bl9)) | 0;
mid = (mid + Math.imul(al2, bh9)) | 0;
mid = (mid + Math.imul(ah2, bl9)) | 0;
hi = (hi + Math.imul(ah2, bh9)) | 0;
var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;
w11 &= 0x3ffffff;
/* k = 12 */
lo = Math.imul(al9, bl3);
mid = Math.imul(al9, bh3);
mid = (mid + Math.imul(ah9, bl3)) | 0;
hi = Math.imul(ah9, bh3);
lo = (lo + Math.imul(al8, bl4)) | 0;
mid = (mid + Math.imul(al8, bh4)) | 0;
mid = (mid + Math.imul(ah8, bl4)) | 0;
hi = (hi + Math.imul(ah8, bh4)) | 0;
lo = (lo + Math.imul(al7, bl5)) | 0;
mid = (mid + Math.imul(al7, bh5)) | 0;
mid = (mid + Math.imul(ah7, bl5)) | 0;
hi = (hi + Math.imul(ah7, bh5)) | 0;
lo = (lo + Math.imul(al6, bl6)) | 0;
mid = (mid + Math.imul(al6, bh6)) | 0;
mid = (mid + Math.imul(ah6, bl6)) | 0;
hi = (hi + Math.imul(ah6, bh6)) | 0;
lo = (lo + Math.imul(al5, bl7)) | 0;
mid = (mid + Math.imul(al5, bh7)) | 0;
mid = (mid + Math.imul(ah5, bl7)) | 0;
hi = (hi + Math.imul(ah5, bh7)) | 0;
lo = (lo + Math.imul(al4, bl8)) | 0;
mid = (mid + Math.imul(al4, bh8)) | 0;
mid = (mid + Math.imul(ah4, bl8)) | 0;
hi = (hi + Math.imul(ah4, bh8)) | 0;
lo = (lo + Math.imul(al3, bl9)) | 0;
mid = (mid + Math.imul(al3, bh9)) | 0;
mid = (mid + Math.imul(ah3, bl9)) | 0;
hi = (hi + Math.imul(ah3, bh9)) | 0;
var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;
w12 &= 0x3ffffff;
/* k = 13 */
lo = Math.imul(al9, bl4);
mid = Math.imul(al9, bh4);
mid = (mid + Math.imul(ah9, bl4)) | 0;
hi = Math.imul(ah9, bh4);
lo = (lo + Math.imul(al8, bl5)) | 0;
mid = (mid + Math.imul(al8, bh5)) | 0;
mid = (mid + Math.imul(ah8, bl5)) | 0;
hi = (hi + Math.imul(ah8, bh5)) | 0;
lo = (lo + Math.imul(al7, bl6)) | 0;
mid = (mid + Math.imul(al7, bh6)) | 0;
mid = (mid + Math.imul(ah7, bl6)) | 0;
hi = (hi + Math.imul(ah7, bh6)) | 0;
lo = (lo + Math.imul(al6, bl7)) | 0;
mid = (mid + Math.imul(al6, bh7)) | 0;
mid = (mid + Math.imul(ah6, bl7)) | 0;
hi = (hi + Math.imul(ah6, bh7)) | 0;
lo = (lo + Math.imul(al5, bl8)) | 0;
mid = (mid + Math.imul(al5, bh8)) | 0;
mid = (mid + Math.imul(ah5, bl8)) | 0;
hi = (hi + Math.imul(ah5, bh8)) | 0;
lo = (lo + Math.imul(al4, bl9)) | 0;
mid = (mid + Math.imul(al4, bh9)) | 0;
mid = (mid + Math.imul(ah4, bl9)) | 0;
hi = (hi + Math.imul(ah4, bh9)) | 0;
var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;
w13 &= 0x3ffffff;
/* k = 14 */
lo = Math.imul(al9, bl5);
mid = Math.imul(al9, bh5);
mid = (mid + Math.imul(ah9, bl5)) | 0;
hi = Math.imul(ah9, bh5);
lo = (lo + Math.imul(al8, bl6)) | 0;
mid = (mid + Math.imul(al8, bh6)) | 0;
mid = (mid + Math.imul(ah8, bl6)) | 0;
hi = (hi + Math.imul(ah8, bh6)) | 0;
lo = (lo + Math.imul(al7, bl7)) | 0;
mid = (mid + Math.imul(al7, bh7)) | 0;
mid = (mid + Math.imul(ah7, bl7)) | 0;
hi = (hi + Math.imul(ah7, bh7)) | 0;
lo = (lo + Math.imul(al6, bl8)) | 0;
mid = (mid + Math.imul(al6, bh8)) | 0;
mid = (mid + Math.imul(ah6, bl8)) | 0;
hi = (hi + Math.imul(ah6, bh8)) | 0;
lo = (lo + Math.imul(al5, bl9)) | 0;
mid = (mid + Math.imul(al5, bh9)) | 0;
mid = (mid + Math.imul(ah5, bl9)) | 0;
hi = (hi + Math.imul(ah5, bh9)) | 0;
var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;
w14 &= 0x3ffffff;
/* k = 15 */
lo = Math.imul(al9, bl6);
mid = Math.imul(al9, bh6);
mid = (mid + Math.imul(ah9, bl6)) | 0;
hi = Math.imul(ah9, bh6);
lo = (lo + Math.imul(al8, bl7)) | 0;
mid = (mid + Math.imul(al8, bh7)) | 0;
mid = (mid + Math.imul(ah8, bl7)) | 0;
hi = (hi + Math.imul(ah8, bh7)) | 0;
lo = (lo + Math.imul(al7, bl8)) | 0;
mid = (mid + Math.imul(al7, bh8)) | 0;
mid = (mid + Math.imul(ah7, bl8)) | 0;
hi = (hi + Math.imul(ah7, bh8)) | 0;
lo = (lo + Math.imul(al6, bl9)) | 0;
mid = (mid + Math.imul(al6, bh9)) | 0;
mid = (mid + Math.imul(ah6, bl9)) | 0;
hi = (hi + Math.imul(ah6, bh9)) | 0;
var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;
w15 &= 0x3ffffff;
/* k = 16 */
lo = Math.imul(al9, bl7);
mid = Math.imul(al9, bh7);
mid = (mid + Math.imul(ah9, bl7)) | 0;
hi = Math.imul(ah9, bh7);
lo = (lo + Math.imul(al8, bl8)) | 0;
mid = (mid + Math.imul(al8, bh8)) | 0;
mid = (mid + Math.imul(ah8, bl8)) | 0;
hi = (hi + Math.imul(ah8, bh8)) | 0;
lo = (lo + Math.imul(al7, bl9)) | 0;
mid = (mid + Math.imul(al7, bh9)) | 0;
mid = (mid + Math.imul(ah7, bl9)) | 0;
hi = (hi + Math.imul(ah7, bh9)) | 0;
var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;
w16 &= 0x3ffffff;
/* k = 17 */
lo = Math.imul(al9, bl8);
mid = Math.imul(al9, bh8);
mid = (mid + Math.imul(ah9, bl8)) | 0;
hi = Math.imul(ah9, bh8);
lo = (lo + Math.imul(al8, bl9)) | 0;
mid = (mid + Math.imul(al8, bh9)) | 0;
mid = (mid + Math.imul(ah8, bl9)) | 0;
hi = (hi + Math.imul(ah8, bh9)) | 0;
var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;
w17 &= 0x3ffffff;
/* k = 18 */
lo = Math.imul(al9, bl9);
mid = Math.imul(al9, bh9);
mid = (mid + Math.imul(ah9, bl9)) | 0;
hi = Math.imul(ah9, bh9);
var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;
c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;
w18 &= 0x3ffffff;
o[0] = w0;
o[1] = w1;
o[2] = w2;
o[3] = w3;
o[4] = w4;
o[5] = w5;
o[6] = w6;
o[7] = w7;
o[8] = w8;
o[9] = w9;
o[10] = w10;
o[11] = w11;
o[12] = w12;
o[13] = w13;
o[14] = w14;
o[15] = w15;
o[16] = w16;
o[17] = w17;
o[18] = w18;
if (c !== 0) {
o[19] = c;
out.length++;
}
return out;
};
// Polyfill comb
if (!Math.imul) {
comb10MulTo = smallMulTo;
}
function bigMulTo (self, num, out) {
out.negative = num.negative ^ self.negative;
out.length = self.length + num.length;
var carry = 0;
var hncarry = 0;
for (var k = 0; k < out.length - 1; k++) {
// Sum all words with the same `i + j = k` and accumulate `ncarry`,
// note that ncarry could be >= 0x3ffffff
var ncarry = hncarry;
hncarry = 0;
var rword = carry & 0x3ffffff;
var maxJ = Math.min(k, num.length - 1);
for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {
var i = k - j;
var a = self.words[i] | 0;
var b = num.words[j] | 0;
var r = a * b;
var lo = r & 0x3ffffff;
ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;
lo = (lo + rword) | 0;
rword = lo & 0x3ffffff;
ncarry = (ncarry + (lo >>> 26)) | 0;
hncarry += ncarry >>> 26;
ncarry &= 0x3ffffff;
}
out.words[k] = rword;
carry = ncarry;
ncarry = hncarry;
}
if (carry !== 0) {
out.words[k] = carry;
} else {
out.length--;
}
return out.strip();
}
function jumboMulTo (self, num, out) {
var fftm = new FFTM();
return fftm.mulp(self, num, out);
}
BN.prototype.mulTo = function mulTo (num, out) {
var res;
var len = this.length + num.length;
if (this.length === 10 && num.length === 10) {
res = comb10MulTo(this, num, out);
} else if (len < 63) {
res = smallMulTo(this, num, out);
} else if (len < 1024) {
res = bigMulTo(this, num, out);
} else {
res = jumboMulTo(this, num, out);
}
return res;
};
// Cooley-Tukey algorithm for FFT
// slightly revisited to rely on looping instead of recursion
function FFTM (x, y) {
this.x = x;
this.y = y;
}
FFTM.prototype.makeRBT = function makeRBT (N) {
var t = new Array(N);
var l = BN.prototype._countBits(N) - 1;
for (var i = 0; i < N; i++) {
t[i] = this.revBin(i, l, N);
}
return t;
};
// Returns binary-reversed representation of `x`
FFTM.prototype.revBin = function revBin (x, l, N) {
if (x === 0 || x === N - 1) return x;
var rb = 0;
for (var i = 0; i < l; i++) {
rb |= (x & 1) << (l - i - 1);
x >>= 1;
}
return rb;
};
// Performs "tweedling" phase, therefore 'emulating'
// behaviour of the recursive algorithm
FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {
for (var i = 0; i < N; i++) {
rtws[i] = rws[rbt[i]];
itws[i] = iws[rbt[i]];
}
};
FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {
this.permute(rbt, rws, iws, rtws, itws, N);
for (var s = 1; s < N; s <<= 1) {
var l = s << 1;
var rtwdf = Math.cos(2 * Math.PI / l);
var itwdf = Math.sin(2 * Math.PI / l);
for (var p = 0; p < N; p += l) {
var rtwdf_ = rtwdf;
var itwdf_ = itwdf;
for (var j = 0; j < s; j++) {
var re = rtws[p + j];
var ie = itws[p + j];
var ro = rtws[p + j + s];
var io = itws[p + j + s];
var rx = rtwdf_ * ro - itwdf_ * io;
io = rtwdf_ * io + itwdf_ * ro;
ro = rx;
rtws[p + j] = re + ro;
itws[p + j] = ie + io;
rtws[p + j + s] = re - ro;
itws[p + j + s] = ie - io;
/* jshint maxdepth : false */
if (j !== l) {
rx = rtwdf * rtwdf_ - itwdf * itwdf_;
itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;
rtwdf_ = rx;
}
}
}
}
};
FFTM.prototype.guessLen13b = function guessLen13b (n, m) {
var N = Math.max(m, n) | 1;
var odd = N & 1;
var i = 0;
for (N = N / 2 | 0; N; N = N >>> 1) {
i++;
}
return 1 << i + 1 + odd;
};
FFTM.prototype.conjugate = function conjugate (rws, iws, N) {
if (N <= 1) return;
for (var i = 0; i < N / 2; i++) {
var t = rws[i];
rws[i] = rws[N - i - 1];
rws[N - i - 1] = t;
t = iws[i];
iws[i] = -iws[N - i - 1];
iws[N - i - 1] = -t;
}
};
FFTM.prototype.normalize13b = function normalize13b (ws, N) {
var carry = 0;
for (var i = 0; i < N / 2; i++) {
var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +
Math.round(ws[2 * i] / N) +
carry;
ws[i] = w & 0x3ffffff;
if (w < 0x4000000) {
carry = 0;
} else {
carry = w / 0x4000000 | 0;
}
}
return ws;
};
FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {
var carry = 0;
for (var i = 0; i < len; i++) {
carry = carry + (ws[i] | 0);
rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;
rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;
}
// Pad with zeroes
for (i = 2 * len; i < N; ++i) {
rws[i] = 0;
}
assert(carry === 0);
assert((carry & ~0x1fff) === 0);
};
FFTM.prototype.stub = function stub (N) {
var ph = new Array(N);
for (var i = 0; i < N; i++) {
ph[i] = 0;
}
return ph;
};
FFTM.prototype.mulp = function mulp (x, y, out) {
var N = 2 * this.guessLen13b(x.length, y.length);
var rbt = this.makeRBT(N);
var _ = this.stub(N);
var rws = new Array(N);
var rwst = new Array(N);
var iwst = new Array(N);
var nrws = new Array(N);
var nrwst = new Array(N);
var niwst = new Array(N);
var rmws = out.words;
rmws.length = N;
this.convert13b(x.words, x.length, rws, N);
this.convert13b(y.words, y.length, nrws, N);
this.transform(rws, _, rwst, iwst, N, rbt);
this.transform(nrws, _, nrwst, niwst, N, rbt);
for (var i = 0; i < N; i++) {
var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];
iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];
rwst[i] = rx;
}
this.conjugate(rwst, iwst, N);
this.transform(rwst, iwst, rmws, _, N, rbt);
this.conjugate(rmws, _, N);
this.normalize13b(rmws, N);
out.negative = x.negative ^ y.negative;
out.length = x.length + y.length;
return out.strip();
};
// Multiply `this` by `num`
BN.prototype.mul = function mul (num) {
var out = new BN(null);
out.words = new Array(this.length + num.length);
return this.mulTo(num, out);
};
// Multiply employing FFT
BN.prototype.mulf = function mulf (num) {
var out = new BN(null);
out.words = new Array(this.length + num.length);
return jumboMulTo(this, num, out);
};
// In-place Multiplication
BN.prototype.imul = function imul (num) {
return this.clone().mulTo(num, this);
};
BN.prototype.imuln = function imuln (num) {
assert(typeof num === 'number');
assert(num < 0x4000000);
// Carry
var carry = 0;
for (var i = 0; i < this.length; i++) {
var w = (this.words[i] | 0) * num;
var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);
carry >>= 26;
carry += (w / 0x4000000) | 0;
// NOTE: lo is 27bit maximum
carry += lo >>> 26;
this.words[i] = lo & 0x3ffffff;
}
if (carry !== 0) {
this.words[i] = carry;
this.length++;
}
return this;
};
BN.prototype.muln = function muln (num) {
return this.clone().imuln(num);
};
// `this` * `this`
BN.prototype.sqr = function sqr () {
return this.mul(this);
};
// `this` * `this` in-place
BN.prototype.isqr = function isqr () {
return this.imul(this.clone());
};
// Math.pow(`this`, `num`)
BN.prototype.pow = function pow (num) {
var w = toBitArray(num);
if (w.length === 0) return new BN(1);
// Skip leading zeroes
var res = this;
for (var i = 0; i < w.length; i++, res = res.sqr()) {
if (w[i] !== 0) break;
}
if (++i < w.length) {
for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {
if (w[i] === 0) continue;
res = res.mul(q);
}
}
return res;
};
// Shift-left in-place
BN.prototype.iushln = function iushln (bits) {
assert(typeof bits === 'number' && bits >= 0);
var r = bits % 26;
var s = (bits - r) / 26;
var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);
var i;
if (r !== 0) {
var carry = 0;
for (i = 0; i < this.length; i++) {
var newCarry = this.words[i] & carryMask;
var c = ((this.words[i] | 0) - newCarry) << r;
this.words[i] = c | carry;
carry = newCarry >>> (26 - r);
}
if (carry) {
this.words[i] = carry;
this.length++;
}
}
if (s !== 0) {
for (i = this.length - 1; i >= 0; i--) {
this.words[i + s] = this.words[i];
}
for (i = 0; i < s; i++) {
this.words[i] = 0;
}
this.length += s;
}
return this.strip();
};
BN.prototype.ishln = function ishln (bits) {
// TODO(indutny): implement me
assert(this.negative === 0);
return this.iushln(bits);
};
// Shift-right in-place
// NOTE: `hint` is a lowest bit before trailing zeroes
// NOTE: if `extended` is present - it will be filled with destroyed bits
BN.prototype.iushrn = function iushrn (bits, hint, extended) {
assert(typeof bits === 'number' && bits >= 0);
var h;
if (hint) {
h = (hint - (hint % 26)) / 26;
} else {
h = 0;
}
var r = bits % 26;
var s = Math.min((bits - r) / 26, this.length);
var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
var maskedWords = extended;
h -= s;
h = Math.max(0, h);
// Extended mode, copy masked part
if (maskedWords) {
for (var i = 0; i < s; i++) {
maskedWords.words[i] = this.words[i];
}
maskedWords.length = s;
}
if (s === 0) {
// No-op, we should not move anything at all
} else if (this.length > s) {
this.length -= s;
for (i = 0; i < this.length; i++) {
this.words[i] = this.words[i + s];
}
} else {
this.words[0] = 0;
this.length = 1;
}
var carry = 0;
for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {
var word = this.words[i] | 0;
this.words[i] = (carry << (26 - r)) | (word >>> r);
carry = word & mask;
}
// Push carried bits as a mask
if (maskedWords && carry !== 0) {
maskedWords.words[maskedWords.length++] = carry;
}
if (this.length === 0) {
this.words[0] = 0;
this.length = 1;
}
return this.strip();
};
BN.prototype.ishrn = function ishrn (bits, hint, extended) {
// TODO(indutny): implement me
assert(this.negative === 0);
return this.iushrn(bits, hint, extended);
};
// Shift-left
BN.prototype.shln = function shln (bits) {
return this.clone().ishln(bits);
};
BN.prototype.ushln = function ushln (bits) {
return this.clone().iushln(bits);
};
// Shift-right
BN.prototype.shrn = function shrn (bits) {
return this.clone().ishrn(bits);
};
BN.prototype.ushrn = function ushrn (bits) {
return this.clone().iushrn(bits);
};
// Test if n bit is set
BN.prototype.testn = function testn (bit) {
assert(typeof bit === 'number' && bit >= 0);
var r = bit % 26;
var s = (bit - r) / 26;
var q = 1 << r;
// Fast case: bit is much higher than all existing words
if (this.length <= s) return false;
// Check bit and return
var w = this.words[s];
return !!(w & q);
};
// Return only lowers bits of number (in-place)
BN.prototype.imaskn = function imaskn (bits) {
assert(typeof bits === 'number' && bits >= 0);
var r = bits % 26;
var s = (bits - r) / 26;
assert(this.negative === 0, 'imaskn works only with positive numbers');
if (this.length <= s) {
return this;
}
if (r !== 0) {
s++;
}
this.length = Math.min(s, this.length);
if (r !== 0) {
var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);
this.words[this.length - 1] &= mask;
}
return this.strip();
};
// Return only lowers bits of number
BN.prototype.maskn = function maskn (bits) {
return this.clone().imaskn(bits);
};
// Add plain number `num` to `this`
BN.prototype.iaddn = function iaddn (num) {
assert(typeof num === 'number');
assert(num < 0x4000000);
if (num < 0) return this.isubn(-num);
// Possible sign change
if (this.negative !== 0) {
if (this.length === 1 && (this.words[0] | 0) < num) {
this.words[0] = num - (this.words[0] | 0);
this.negative = 0;
return this;
}
this.negative = 0;
this.isubn(num);
this.negative = 1;
return this;
}
// Add without checks
return this._iaddn(num);
};
BN.prototype._iaddn = function _iaddn (num) {
this.words[0] += num;
// Carry
for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {
this.words[i] -= 0x4000000;
if (i === this.length - 1) {
this.words[i + 1] = 1;
} else {
this.words[i + 1]++;
}
}
this.length = Math.max(this.length, i + 1);
return this;
};
// Subtract plain number `num` from `this`
BN.prototype.isubn = function isubn (num) {
assert(typeof num === 'number');
assert(num < 0x4000000);
if (num < 0) return this.iaddn(-num);
if (this.negative !== 0) {
this.negative = 0;
this.iaddn(num);
this.negative = 1;
return this;
}
this.words[0] -= num;
if (this.length === 1 && this.words[0] < 0) {
this.words[0] = -this.words[0];
this.negative = 1;
} else {
// Carry
for (var i = 0; i < this.length && this.words[i] < 0; i++) {
this.words[i] += 0x4000000;
this.words[i + 1] -= 1;
}
}
return this.strip();
};
BN.prototype.addn = function addn (num) {
return this.clone().iaddn(num);
};
BN.prototype.subn = function subn (num) {
return this.clone().isubn(num);
};
BN.prototype.iabs = function iabs () {
this.negative = 0;
return this;
};
BN.prototype.abs = function abs () {
return this.clone().iabs();
};
BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {
var len = num.length + shift;
var i;
this._expand(len);
var w;
var carry = 0;
for (i = 0; i < num.length; i++) {
w = (this.words[i + shift] | 0) + carry;
var right = (num.words[i] | 0) * mul;
w -= right & 0x3ffffff;
carry = (w >> 26) - ((right / 0x4000000) | 0);
this.words[i + shift] = w & 0x3ffffff;
}
for (; i < this.length - shift; i++) {
w = (this.words[i + shift] | 0) + carry;
carry = w >> 26;
this.words[i + shift] = w & 0x3ffffff;
}
if (carry === 0) return this.strip();
// Subtraction overflow
assert(carry === -1);
carry = 0;
for (i = 0; i < this.length; i++) {
w = -(this.words[i] | 0) + carry;
carry = w >> 26;
this.words[i] = w & 0x3ffffff;
}
this.negative = 1;
return this.strip();
};
BN.prototype._wordDiv = function _wordDiv (num, mode) {
var shift = this.length - num.length;
var a = this.clone();
var b = num;
// Normalize
var bhi = b.words[b.length - 1] | 0;
var bhiBits = this._countBits(bhi);
shift = 26 - bhiBits;
if (shift !== 0) {
b = b.ushln(shift);
a.iushln(shift);
bhi = b.words[b.length - 1] | 0;
}
// Initialize quotient
var m = a.length - b.length;
var q;
if (mode !== 'mod') {
q = new BN(null);
q.length = m + 1;
q.words = new Array(q.length);
for (var i = 0; i < q.length; i++) {
q.words[i] = 0;
}
}
var diff = a.clone()._ishlnsubmul(b, 1, m);
if (diff.negative === 0) {
a = diff;
if (q) {
q.words[m] = 1;
}
}
for (var j = m - 1; j >= 0; j--) {
var qj = (a.words[b.length + j] | 0) * 0x4000000 +
(a.words[b.length + j - 1] | 0);
// NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max
// (0x7ffffff)
qj = Math.min((qj / bhi) | 0, 0x3ffffff);
a._ishlnsubmul(b, qj, j);
while (a.negative !== 0) {
qj--;
a.negative = 0;
a._ishlnsubmul(b, 1, j);
if (!a.isZero()) {
a.negative ^= 1;
}
}
if (q) {
q.words[j] = qj;
}
}
if (q) {
q.strip();
}
a.strip();
// Denormalize
if (mode !== 'div' && shift !== 0) {
a.iushrn(shift);
}
return {
div: q || null,
mod: a
};
};
// NOTE: 1) `mode` can be set to `mod` to request mod only,
// to `div` to request div only, or be absent to
// request both div & mod
// 2) `positive` is true if unsigned mod is requested
BN.prototype.divmod = function divmod (num, mode, positive) {
assert(!num.isZero());
if (this.isZero()) {
return {
div: new BN(0),
mod: new BN(0)
};
}
var div, mod, res;
if (this.negative !== 0 && num.negative === 0) {
res = this.neg().divmod(num, mode);
if (mode !== 'mod') {
div = res.div.neg();
}
if (mode !== 'div') {
mod = res.mod.neg();
if (positive && mod.negative !== 0) {
mod.iadd(num);
}
}
return {
div: div,
mod: mod
};
}
if (this.negative === 0 && num.negative !== 0) {
res = this.divmod(num.neg(), mode);
if (mode !== 'mod') {
div = res.div.neg();
}
return {
div: div,
mod: res.mod
};
}
if ((this.negative & num.negative) !== 0) {
res = this.neg().divmod(num.neg(), mode);
if (mode !== 'div') {
mod = res.mod.neg();
if (positive && mod.negative !== 0) {
mod.isub(num);
}
}
return {
div: res.div,
mod: mod
};
}
// Both numbers are positive at this point
// Strip both numbers to approximate shift value
if (num.length > this.length || this.cmp(num) < 0) {
return {
div: new BN(0),
mod: this
};
}
// Very short reduction
if (num.length === 1) {
if (mode === 'div') {
return {
div: this.divn(num.words[0]),
mod: null
};
}
if (mode === 'mod') {
return {
div: null,
mod: new BN(this.modn(num.words[0]))
};
}
return {
div: this.divn(num.words[0]),
mod: new BN(this.modn(num.words[0]))
};
}
return this._wordDiv(num, mode);
};
// Find `this` / `num`
BN.prototype.div = function div (num) {
return this.divmod(num, 'div', false).div;
};
// Find `this` % `num`
BN.prototype.mod = function mod (num) {
return this.divmod(num, 'mod', false).mod;
};
BN.prototype.umod = function umod (num) {
return this.divmod(num, 'mod', true).mod;
};
// Find Round(`this` / `num`)
BN.prototype.divRound = function divRound (num) {
var dm = this.divmod(num);
// Fast case - exact division
if (dm.mod.isZero()) return dm.div;
var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;
var half = num.ushrn(1);
var r2 = num.andln(1);
var cmp = mod.cmp(half);
// Round down
if (cmp < 0 || r2 === 1 && cmp === 0) return dm.div;
// Round up
return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);
};
BN.prototype.modn = function modn (num) {
assert(num <= 0x3ffffff);
var p = (1 << 26) % num;
var acc = 0;
for (var i = this.length - 1; i >= 0; i--) {
acc = (p * acc + (this.words[i] | 0)) % num;
}
return acc;
};
// In-place division by number
BN.prototype.idivn = function idivn (num) {
assert(num <= 0x3ffffff);
var carry = 0;
for (var i = this.length - 1; i >= 0; i--) {
var w = (this.words[i] | 0) + carry * 0x4000000;
this.words[i] = (w / num) | 0;
carry = w % num;
}
return this.strip();
};
BN.prototype.divn = function divn (num) {
return this.clone().idivn(num);
};
BN.prototype.egcd = function egcd (p) {
assert(p.negative === 0);
assert(!p.isZero());
var x = this;
var y = p.clone();
if (x.negative !== 0) {
x = x.umod(p);
} else {
x = x.clone();
}
// A * x + B * y = x
var A = new BN(1);
var B = new BN(0);
// C * x + D * y = y
var C = new BN(0);
var D = new BN(1);
var g = 0;
while (x.isEven() && y.isEven()) {
x.iushrn(1);
y.iushrn(1);
++g;
}
var yp = y.clone();
var xp = x.clone();
while (!x.isZero()) {
for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
if (i > 0) {
x.iushrn(i);
while (i-- > 0) {
if (A.isOdd() || B.isOdd()) {
A.iadd(yp);
B.isub(xp);
}
A.iushrn(1);
B.iushrn(1);
}
}
for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
if (j > 0) {
y.iushrn(j);
while (j-- > 0) {
if (C.isOdd() || D.isOdd()) {
C.iadd(yp);
D.isub(xp);
}
C.iushrn(1);
D.iushrn(1);
}
}
if (x.cmp(y) >= 0) {
x.isub(y);
A.isub(C);
B.isub(D);
} else {
y.isub(x);
C.isub(A);
D.isub(B);
}
}
return {
a: C,
b: D,
gcd: y.iushln(g)
};
};
// This is reduced incarnation of the binary EEA
// above, designated to invert members of the
// _prime_ fields F(p) at a maximal speed
BN.prototype._invmp = function _invmp (p) {
assert(p.negative === 0);
assert(!p.isZero());
var a = this;
var b = p.clone();
if (a.negative !== 0) {
a = a.umod(p);
} else {
a = a.clone();
}
var x1 = new BN(1);
var x2 = new BN(0);
var delta = b.clone();
while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {
for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);
if (i > 0) {
a.iushrn(i);
while (i-- > 0) {
if (x1.isOdd()) {
x1.iadd(delta);
}
x1.iushrn(1);
}
}
for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);
if (j > 0) {
b.iushrn(j);
while (j-- > 0) {
if (x2.isOdd()) {
x2.iadd(delta);
}
x2.iushrn(1);
}
}
if (a.cmp(b) >= 0) {
a.isub(b);
x1.isub(x2);
} else {
b.isub(a);
x2.isub(x1);
}
}
var res;
if (a.cmpn(1) === 0) {
res = x1;
} else {
res = x2;
}
if (res.cmpn(0) < 0) {
res.iadd(p);
}
return res;
};
BN.prototype.gcd = function gcd (num) {
if (this.isZero()) return num.abs();
if (num.isZero()) return this.abs();
var a = this.clone();
var b = num.clone();
a.negative = 0;
b.negative = 0;
// Remove common factor of two
for (var shift = 0; a.isEven() && b.isEven(); shift++) {
a.iushrn(1);
b.iushrn(1);
}
do {
while (a.isEven()) {
a.iushrn(1);
}
while (b.isEven()) {
b.iushrn(1);
}
var r = a.cmp(b);
if (r < 0) {
// Swap `a` and `b` to make `a` always bigger than `b`
var t = a;
a = b;
b = t;
} else if (r === 0 || b.cmpn(1) === 0) {
break;
}
a.isub(b);
} while (true);
return b.iushln(shift);
};
// Invert number in the field F(num)
BN.prototype.invm = function invm (num) {
return this.egcd(num).a.umod(num);
};
BN.prototype.isEven = function isEven () {
return (this.words[0] & 1) === 0;
};
BN.prototype.isOdd = function isOdd () {
return (this.words[0] & 1) === 1;
};
// And first word and num
BN.prototype.andln = function andln (num) {
return this.words[0] & num;
};
// Increment at the bit position in-line
BN.prototype.bincn = function bincn (bit) {
assert(typeof bit === 'number');
var r = bit % 26;
var s = (bit - r) / 26;
var q = 1 << r;
// Fast case: bit is much higher than all existing words
if (this.length <= s) {
this._expand(s + 1);
this.words[s] |= q;
return this;
}
// Add bit and propagate, if needed
var carry = q;
for (var i = s; carry !== 0 && i < this.length; i++) {
var w = this.words[i] | 0;
w += carry;
carry = w >>> 26;
w &= 0x3ffffff;
this.words[i] = w;
}
if (carry !== 0) {
this.words[i] = carry;
this.length++;
}
return this;
};
BN.prototype.isZero = function isZero () {
return this.length === 1 && this.words[0] === 0;
};
BN.prototype.cmpn = function cmpn (num) {
var negative = num < 0;
if (this.negative !== 0 && !negative) return -1;
if (this.negative === 0 && negative) return 1;
this.strip();
var res;
if (this.length > 1) {
res = 1;
} else {
if (negative) {
num = -num;
}
assert(num <= 0x3ffffff, 'Number is too big');
var w = this.words[0] | 0;
res = w === num ? 0 : w < num ? -1 : 1;
}
if (this.negative !== 0) return -res | 0;
return res;
};
// Compare two numbers and return:
// 1 - if `this` > `num`
// 0 - if `this` == `num`
// -1 - if `this` < `num`
BN.prototype.cmp = function cmp (num) {
if (this.negative !== 0 && num.negative === 0) return -1;
if (this.negative === 0 && num.negative !== 0) return 1;
var res = this.ucmp(num);
if (this.negative !== 0) return -res | 0;
return res;
};
// Unsigned comparison
BN.prototype.ucmp = function ucmp (num) {
// At this point both numbers have the same sign
if (this.length > num.length) return 1;
if (this.length < num.length) return -1;
var res = 0;
for (var i = this.length - 1; i >= 0; i--) {
var a = this.words[i] | 0;
var b = num.words[i] | 0;
if (a === b) continue;
if (a < b) {
res = -1;
} else if (a > b) {
res = 1;
}
break;
}
return res;
};
BN.prototype.gtn = function gtn (num) {
return this.cmpn(num) === 1;
};
BN.prototype.gt = function gt (num) {
return this.cmp(num) === 1;
};
BN.prototype.gten = function gten (num) {
return this.cmpn(num) >= 0;
};
BN.prototype.gte = function gte (num) {
return this.cmp(num) >= 0;
};
BN.prototype.ltn = function ltn (num) {
return this.cmpn(num) === -1;
};
BN.prototype.lt = function lt (num) {
return this.cmp(num) === -1;
};
BN.prototype.lten = function lten (num) {
return this.cmpn(num) <= 0;
};
BN.prototype.lte = function lte (num) {
return this.cmp(num) <= 0;
};
BN.prototype.eqn = function eqn (num) {
return this.cmpn(num) === 0;
};
BN.prototype.eq = function eq (num) {
return this.cmp(num) === 0;
};
//
// A reduce context, could be using montgomery or something better, depending
// on the `m` itself.
//
BN.red = function red (num) {
return new Red(num);
};
BN.prototype.toRed = function toRed (ctx) {
assert(!this.red, 'Already a number in reduction context');
assert(this.negative === 0, 'red works only with positives');
return ctx.convertTo(this)._forceRed(ctx);
};
BN.prototype.fromRed = function fromRed () {
assert(this.red, 'fromRed works only with numbers in reduction context');
return this.red.convertFrom(this);
};
BN.prototype._forceRed = function _forceRed (ctx) {
this.red = ctx;
return this;
};
BN.prototype.forceRed = function forceRed (ctx) {
assert(!this.red, 'Already a number in reduction context');
return this._forceRed(ctx);
};
BN.prototype.redAdd = function redAdd (num) {
assert(this.red, 'redAdd works only with red numbers');
return this.red.add(this, num);
};
BN.prototype.redIAdd = function redIAdd (num) {
assert(this.red, 'redIAdd works only with red numbers');
return this.red.iadd(this, num);
};
BN.prototype.redSub = function redSub (num) {
assert(this.red, 'redSub works only with red numbers');
return this.red.sub(this, num);
};
BN.prototype.redISub = function redISub (num) {
assert(this.red, 'redISub works only with red numbers');
return this.red.isub(this, num);
};
BN.prototype.redShl = function redShl (num) {
assert(this.red, 'redShl works only with red numbers');
return this.red.shl(this, num);
};
BN.prototype.redMul = function redMul (num) {
assert(this.red, 'redMul works only with red numbers');
this.red._verify2(this, num);
return this.red.mul(this, num);
};
BN.prototype.redIMul = function redIMul (num) {
assert(this.red, 'redMul works only with red numbers');
this.red._verify2(this, num);
return this.red.imul(this, num);
};
BN.prototype.redSqr = function redSqr () {
assert(this.red, 'redSqr works only with red numbers');
this.red._verify1(this);
return this.red.sqr(this);
};
BN.prototype.redISqr = function redISqr () {
assert(this.red, 'redISqr works only with red numbers');
this.red._verify1(this);
return this.red.isqr(this);
};
// Square root over p
BN.prototype.redSqrt = function redSqrt () {
assert(this.red, 'redSqrt works only with red numbers');
this.red._verify1(this);
return this.red.sqrt(this);
};
BN.prototype.redInvm = function redInvm () {
assert(this.red, 'redInvm works only with red numbers');
this.red._verify1(this);
return this.red.invm(this);
};
// Return negative clone of `this` % `red modulo`
BN.prototype.redNeg = function redNeg () {
assert(this.red, 'redNeg works only with red numbers');
this.red._verify1(this);
return this.red.neg(this);
};
BN.prototype.redPow = function redPow (num) {
assert(this.red && !num.red, 'redPow(normalNum)');
this.red._verify1(this);
return this.red.pow(this, num);
};
// Prime numbers with efficient reduction
var primes = {
k256: null,
p224: null,
p192: null,
p25519: null
};
// Pseudo-Mersenne prime
function MPrime (name, p) {
// P = 2 ^ N - K
this.name = name;
this.p = new BN(p, 16);
this.n = this.p.bitLength();
this.k = new BN(1).iushln(this.n).isub(this.p);
this.tmp = this._tmp();
}
MPrime.prototype._tmp = function _tmp () {
var tmp = new BN(null);
tmp.words = new Array(Math.ceil(this.n / 13));
return tmp;
};
MPrime.prototype.ireduce = function ireduce (num) {
// Assumes that `num` is less than `P^2`
// num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)
var r = num;
var rlen;
do {
this.split(r, this.tmp);
r = this.imulK(r);
r = r.iadd(this.tmp);
rlen = r.bitLength();
} while (rlen > this.n);
var cmp = rlen < this.n ? -1 : r.ucmp(this.p);
if (cmp === 0) {
r.words[0] = 0;
r.length = 1;
} else if (cmp > 0) {
r.isub(this.p);
} else {
r.strip();
}
return r;
};
MPrime.prototype.split = function split (input, out) {
input.iushrn(this.n, 0, out);
};
MPrime.prototype.imulK = function imulK (num) {
return num.imul(this.k);
};
function K256 () {
MPrime.call(
this,
'k256',
'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');
}
inherits(K256, MPrime);
K256.prototype.split = function split (input, output) {
// 256 = 9 * 26 + 22
var mask = 0x3fffff;
var outLen = Math.min(input.length, 9);
for (var i = 0; i < outLen; i++) {
output.words[i] = input.words[i];
}
output.length = outLen;
if (input.length <= 9) {
input.words[0] = 0;
input.length = 1;
return;
}
// Shift by 9 limbs
var prev = input.words[9];
output.words[output.length++] = prev & mask;
for (i = 10; i < input.length; i++) {
var next = input.words[i] | 0;
input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);
prev = next;
}
prev >>>= 22;
input.words[i - 10] = prev;
if (prev === 0 && input.length > 10) {
input.length -= 10;
} else {
input.length -= 9;
}
};
K256.prototype.imulK = function imulK (num) {
// K = 0x1000003d1 = [ 0x40, 0x3d1 ]
num.words[num.length] = 0;
num.words[num.length + 1] = 0;
num.length += 2;
// bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390
var lo = 0;
for (var i = 0; i < num.length; i++) {
var w = num.words[i] | 0;
lo += w * 0x3d1;
num.words[i] = lo & 0x3ffffff;
lo = w * 0x40 + ((lo / 0x4000000) | 0);
}
// Fast length reduction
if (num.words[num.length - 1] === 0) {
num.length--;
if (num.words[num.length - 1] === 0) {
num.length--;
}
}
return num;
};
function P224 () {
MPrime.call(
this,
'p224',
'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');
}
inherits(P224, MPrime);
function P192 () {
MPrime.call(
this,
'p192',
'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');
}
inherits(P192, MPrime);
function P25519 () {
// 2 ^ 255 - 19
MPrime.call(
this,
'25519',
'7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');
}
inherits(P25519, MPrime);
P25519.prototype.imulK = function imulK (num) {
// K = 0x13
var carry = 0;
for (var i = 0; i < num.length; i++) {
var hi = (num.words[i] | 0) * 0x13 + carry;
var lo = hi & 0x3ffffff;
hi >>>= 26;
num.words[i] = lo;
carry = hi;
}
if (carry !== 0) {
num.words[num.length++] = carry;
}
return num;
};
// Exported mostly for testing purposes, use plain name instead
BN._prime = function prime (name) {
// Cached version of prime
if (primes[name]) return primes[name];
var prime;
if (name === 'k256') {
prime = new K256();
} else if (name === 'p224') {
prime = new P224();
} else if (name === 'p192') {
prime = new P192();
} else if (name === 'p25519') {
prime = new P25519();
} else {
throw new Error('Unknown prime ' + name);
}
primes[name] = prime;
return prime;
};
//
// Base reduction engine
//
function Red (m) {
if (typeof m === 'string') {
var prime = BN._prime(m);
this.m = prime.p;
this.prime = prime;
} else {
assert(m.gtn(1), 'modulus must be greater than 1');
this.m = m;
this.prime = null;
}
}
Red.prototype._verify1 = function _verify1 (a) {
assert(a.negative === 0, 'red works only with positives');
assert(a.red, 'red works only with red numbers');
};
Red.prototype._verify2 = function _verify2 (a, b) {
assert((a.negative | b.negative) === 0, 'red works only with positives');
assert(a.red && a.red === b.red,
'red works only with red numbers');
};
Red.prototype.imod = function imod (a) {
if (this.prime) return this.prime.ireduce(a)._forceRed(this);
return a.umod(this.m)._forceRed(this);
};
Red.prototype.neg = function neg (a) {
if (a.isZero()) {
return a.clone();
}
return this.m.sub(a)._forceRed(this);
};
Red.prototype.add = function add (a, b) {
this._verify2(a, b);
var res = a.add(b);
if (res.cmp(this.m) >= 0) {
res.isub(this.m);
}
return res._forceRed(this);
};
Red.prototype.iadd = function iadd (a, b) {
this._verify2(a, b);
var res = a.iadd(b);
if (res.cmp(this.m) >= 0) {
res.isub(this.m);
}
return res;
};
Red.prototype.sub = function sub (a, b) {
this._verify2(a, b);
var res = a.sub(b);
if (res.cmpn(0) < 0) {
res.iadd(this.m);
}
return res._forceRed(this);
};
Red.prototype.isub = function isub (a, b) {
this._verify2(a, b);
var res = a.isub(b);
if (res.cmpn(0) < 0) {
res.iadd(this.m);
}
return res;
};
Red.prototype.shl = function shl (a, num) {
this._verify1(a);
return this.imod(a.ushln(num));
};
Red.prototype.imul = function imul (a, b) {
this._verify2(a, b);
return this.imod(a.imul(b));
};
Red.prototype.mul = function mul (a, b) {
this._verify2(a, b);
return this.imod(a.mul(b));
};
Red.prototype.isqr = function isqr (a) {
return this.imul(a, a.clone());
};
Red.prototype.sqr = function sqr (a) {
return this.mul(a, a);
};
Red.prototype.sqrt = function sqrt (a) {
if (a.isZero()) return a.clone();
var mod3 = this.m.andln(3);
assert(mod3 % 2 === 1);
// Fast case
if (mod3 === 3) {
var pow = this.m.add(new BN(1)).iushrn(2);
return this.pow(a, pow);
}
// Tonelli-Shanks algorithm (Totally unoptimized and slow)
//
// Find Q and S, that Q * 2 ^ S = (P - 1)
var q = this.m.subn(1);
var s = 0;
while (!q.isZero() && q.andln(1) === 0) {
s++;
q.iushrn(1);
}
assert(!q.isZero());
var one = new BN(1).toRed(this);
var nOne = one.redNeg();
// Find quadratic non-residue
// NOTE: Max is such because of generalized Riemann hypothesis.
var lpow = this.m.subn(1).iushrn(1);
var z = this.m.bitLength();
z = new BN(2 * z * z).toRed(this);
while (this.pow(z, lpow).cmp(nOne) !== 0) {
z.redIAdd(nOne);
}
var c = this.pow(z, q);
var r = this.pow(a, q.addn(1).iushrn(1));
var t = this.pow(a, q);
var m = s;
while (t.cmp(one) !== 0) {
var tmp = t;
for (var i = 0; tmp.cmp(one) !== 0; i++) {
tmp = tmp.redSqr();
}
assert(i < m);
var b = this.pow(c, new BN(1).iushln(m - i - 1));
r = r.redMul(b);
c = b.redSqr();
t = t.redMul(c);
m = i;
}
return r;
};
Red.prototype.invm = function invm (a) {
var inv = a._invmp(this.m);
if (inv.negative !== 0) {
inv.negative = 0;
return this.imod(inv).redNeg();
} else {
return this.imod(inv);
}
};
Red.prototype.pow = function pow (a, num) {
if (num.isZero()) return new BN(1).toRed(this);
if (num.cmpn(1) === 0) return a.clone();
var windowSize = 4;
var wnd = new Array(1 << windowSize);
wnd[0] = new BN(1).toRed(this);
wnd[1] = a;
for (var i = 2; i < wnd.length; i++) {
wnd[i] = this.mul(wnd[i - 1], a);
}
var res = wnd[0];
var current = 0;
var currentLen = 0;
var start = num.bitLength() % 26;
if (start === 0) {
start = 26;
}
for (i = num.length - 1; i >= 0; i--) {
var word = num.words[i];
for (var j = start - 1; j >= 0; j--) {
var bit = (word >> j) & 1;
if (res !== wnd[0]) {
res = this.sqr(res);
}
if (bit === 0 && current === 0) {
currentLen = 0;
continue;
}
current <<= 1;
current |= bit;
currentLen++;
if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;
res = this.mul(res, wnd[current]);
currentLen = 0;
current = 0;
}
start = 26;
}
return res;
};
Red.prototype.convertTo = function convertTo (num) {
var r = num.umod(this.m);
return r === num ? r.clone() : r;
};
Red.prototype.convertFrom = function convertFrom (num) {
var res = num.clone();
res.red = null;
return res;
};
//
// Montgomery method engine
//
BN.mont = function mont (num) {
return new Mont(num);
};
function Mont (m) {
Red.call(this, m);
this.shift = this.m.bitLength();
if (this.shift % 26 !== 0) {
this.shift += 26 - (this.shift % 26);
}
this.r = new BN(1).iushln(this.shift);
this.r2 = this.imod(this.r.sqr());
this.rinv = this.r._invmp(this.m);
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);
this.minv = this.minv.umod(this.r);
this.minv = this.r.sub(this.minv);
}
inherits(Mont, Red);
Mont.prototype.convertTo = function convertTo (num) {
return this.imod(num.ushln(this.shift));
};
Mont.prototype.convertFrom = function convertFrom (num) {
var r = this.imod(num.mul(this.rinv));
r.red = null;
return r;
};
Mont.prototype.imul = function imul (a, b) {
if (a.isZero() || b.isZero()) {
a.words[0] = 0;
a.length = 1;
return a;
}
var t = a.imul(b);
var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
var u = t.isub(c).iushrn(this.shift);
var res = u;
if (u.cmp(this.m) >= 0) {
res = u.isub(this.m);
} else if (u.cmpn(0) < 0) {
res = u.iadd(this.m);
}
return res._forceRed(this);
};
Mont.prototype.mul = function mul (a, b) {
if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);
var t = a.mul(b);
var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);
var u = t.isub(c).iushrn(this.shift);
var res = u;
if (u.cmp(this.m) >= 0) {
res = u.isub(this.m);
} else if (u.cmpn(0) < 0) {
res = u.iadd(this.m);
}
return res._forceRed(this);
};
Mont.prototype.invm = function invm (a) {
// (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R
var res = this.imod(a._invmp(this.m).mul(this.r2));
return res._forceRed(this);
};
})(typeof module === 'undefined' || module, this);
},{"buffer":36}],35:[function(require,module,exports){
var r;
module.exports = function rand(len) {
if (!r)
r = new Rand(null);
return r.generate(len);
};
function Rand(rand) {
this.rand = rand;
}
module.exports.Rand = Rand;
Rand.prototype.generate = function generate(len) {
return this._rand(len);
};
// Emulate crypto API using randy
Rand.prototype._rand = function _rand(n) {
if (this.rand.getBytes)
return this.rand.getBytes(n);
var res = new Uint8Array(n);
for (var i = 0; i < res.length; i++)
res[i] = this.rand.getByte();
return res;
};
if (typeof self === 'object') {
if (self.crypto && self.crypto.getRandomValues) {
// Modern browsers
Rand.prototype._rand = function _rand(n) {
var arr = new Uint8Array(n);
self.crypto.getRandomValues(arr);
return arr;
};
} else if (self.msCrypto && self.msCrypto.getRandomValues) {
// IE
Rand.prototype._rand = function _rand(n) {
var arr = new Uint8Array(n);
self.msCrypto.getRandomValues(arr);
return arr;
};
// Safari's WebWorkers do not have `crypto`
} else if (typeof window === 'object') {
// Old junk
Rand.prototype._rand = function() {
throw new Error('Not implemented yet');
};
}
} else {
// Node.js or Web worker with no crypto support
try {
var crypto = require('crypto');
if (typeof crypto.randomBytes !== 'function')
throw new Error('Not supported');
Rand.prototype._rand = function _rand(n) {
return crypto.randomBytes(n);
};
} catch (e) {
}
}
},{"crypto":36}],36:[function(require,module,exports){
},{}],37:[function(require,module,exports){
// based on the aes implimentation in triple sec
// https://github.com/keybase/triplesec
// which is in turn based on the one from crypto-js
// https://code.google.com/p/crypto-js/
var Buffer = require('safe-buffer').Buffer
function asUInt32Array (buf) {
if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)
var len = (buf.length / 4) | 0
var out = new Array(len)
for (var i = 0; i < len; i++) {
out[i] = buf.readUInt32BE(i * 4)
}
return out
}
function scrubVec (v) {
for (var i = 0; i < v.length; v++) {
v[i] = 0
}
}
function cryptBlock (M, keySchedule, SUB_MIX, SBOX, nRounds) {
var SUB_MIX0 = SUB_MIX[0]
var SUB_MIX1 = SUB_MIX[1]
var SUB_MIX2 = SUB_MIX[2]
var SUB_MIX3 = SUB_MIX[3]
var s0 = M[0] ^ keySchedule[0]
var s1 = M[1] ^ keySchedule[1]
var s2 = M[2] ^ keySchedule[2]
var s3 = M[3] ^ keySchedule[3]
var t0, t1, t2, t3
var ksRow = 4
for (var round = 1; round < nRounds; round++) {
t0 = SUB_MIX0[s0 >>> 24] ^ SUB_MIX1[(s1 >>> 16) & 0xff] ^ SUB_MIX2[(s2 >>> 8) & 0xff] ^ SUB_MIX3[s3 & 0xff] ^ keySchedule[ksRow++]
t1 = SUB_MIX0[s1 >>> 24] ^ SUB_MIX1[(s2 >>> 16) & 0xff] ^ SUB_MIX2[(s3 >>> 8) & 0xff] ^ SUB_MIX3[s0 & 0xff] ^ keySchedule[ksRow++]
t2 = SUB_MIX0[s2 >>> 24] ^ SUB_MIX1[(s3 >>> 16) & 0xff] ^ SUB_MIX2[(s0 >>> 8) & 0xff] ^ SUB_MIX3[s1 & 0xff] ^ keySchedule[ksRow++]
t3 = SUB_MIX0[s3 >>> 24] ^ SUB_MIX1[(s0 >>> 16) & 0xff] ^ SUB_MIX2[(s1 >>> 8) & 0xff] ^ SUB_MIX3[s2 & 0xff] ^ keySchedule[ksRow++]
s0 = t0
s1 = t1
s2 = t2
s3 = t3
}
t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]
t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]
t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]
t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]
t0 = t0 >>> 0
t1 = t1 >>> 0
t2 = t2 >>> 0
t3 = t3 >>> 0
return [t0, t1, t2, t3]
}
// AES constants
var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]
var G = (function () {
// Compute double table
var d = new Array(256)
for (var j = 0; j < 256; j++) {
if (j < 128) {
d[j] = j << 1
} else {
d[j] = (j << 1) ^ 0x11b
}
}
var SBOX = []
var INV_SBOX = []
var SUB_MIX = [[], [], [], []]
var INV_SUB_MIX = [[], [], [], []]
// Walk GF(2^8)
var x = 0
var xi = 0
for (var i = 0; i < 256; ++i) {
// Compute sbox
var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4)
sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63
SBOX[x] = sx
INV_SBOX[sx] = x
// Compute multiplication
var x2 = d[x]
var x4 = d[x2]
var x8 = d[x4]
// Compute sub bytes, mix columns tables
var t = (d[sx] * 0x101) ^ (sx * 0x1010100)
SUB_MIX[0][x] = (t << 24) | (t >>> 8)
SUB_MIX[1][x] = (t << 16) | (t >>> 16)
SUB_MIX[2][x] = (t << 8) | (t >>> 24)
SUB_MIX[3][x] = t
// Compute inv sub bytes, inv mix columns tables
t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100)
INV_SUB_MIX[0][sx] = (t << 24) | (t >>> 8)
INV_SUB_MIX[1][sx] = (t << 16) | (t >>> 16)
INV_SUB_MIX[2][sx] = (t << 8) | (t >>> 24)
INV_SUB_MIX[3][sx] = t
if (x === 0) {
x = xi = 1
} else {
x = x2 ^ d[d[d[x8 ^ x2]]]
xi ^= d[d[xi]]
}
}
return {
SBOX: SBOX,
INV_SBOX: INV_SBOX,
SUB_MIX: SUB_MIX,
INV_SUB_MIX: INV_SUB_MIX
}
})()
function AES (key) {
this._key = asUInt32Array(key)
this._reset()
}
AES.blockSize = 4 * 4
AES.keySize = 256 / 8
AES.prototype.blockSize = AES.blockSize
AES.prototype.keySize = AES.keySize
AES.prototype._reset = function () {
var keyWords = this._key
var keySize = keyWords.length
var nRounds = keySize + 6
var ksRows = (nRounds + 1) * 4
var keySchedule = []
for (var k = 0; k < keySize; k++) {
keySchedule[k] = keyWords[k]
}
for (k = keySize; k < ksRows; k++) {
var t = keySchedule[k - 1]
if (k % keySize === 0) {
t = (t << 8) | (t >>> 24)
t =
(G.SBOX[t >>> 24] << 24) |
(G.SBOX[(t >>> 16) & 0xff] << 16) |
(G.SBOX[(t >>> 8) & 0xff] << 8) |
(G.SBOX[t & 0xff])
t ^= RCON[(k / keySize) | 0] << 24
} else if (keySize > 6 && k % keySize === 4) {
t =
(G.SBOX[t >>> 24] << 24) |
(G.SBOX[(t >>> 16) & 0xff] << 16) |
(G.SBOX[(t >>> 8) & 0xff] << 8) |
(G.SBOX[t & 0xff])
}
keySchedule[k] = keySchedule[k - keySize] ^ t
}
var invKeySchedule = []
for (var ik = 0; ik < ksRows; ik++) {
var ksR = ksRows - ik
var tt = keySchedule[ksR - (ik % 4 ? 0 : 4)]
if (ik < 4 || ksR <= 4) {
invKeySchedule[ik] = tt
} else {
invKeySchedule[ik] =
G.INV_SUB_MIX[0][G.SBOX[tt >>> 24]] ^
G.INV_SUB_MIX[1][G.SBOX[(tt >>> 16) & 0xff]] ^
G.INV_SUB_MIX[2][G.SBOX[(tt >>> 8) & 0xff]] ^
G.INV_SUB_MIX[3][G.SBOX[tt & 0xff]]
}
}
this._nRounds = nRounds
this._keySchedule = keySchedule
this._invKeySchedule = invKeySchedule
}
AES.prototype.encryptBlockRaw = function (M) {
M = asUInt32Array(M)
return cryptBlock(M, this._keySchedule, G.SUB_MIX, G.SBOX, this._nRounds)
}
AES.prototype.encryptBlock = function (M) {
var out = this.encryptBlockRaw(M)
var buf = Buffer.allocUnsafe(16)
buf.writeUInt32BE(out[0], 0)
buf.writeUInt32BE(out[1], 4)
buf.writeUInt32BE(out[2], 8)
buf.writeUInt32BE(out[3], 12)
return buf
}
AES.prototype.decryptBlock = function (M) {
M = asUInt32Array(M)
// swap
var m1 = M[1]
M[1] = M[3]
M[3] = m1
var out = cryptBlock(M, this._invKeySchedule, G.INV_SUB_MIX, G.INV_SBOX, this._nRounds)
var buf = Buffer.allocUnsafe(16)
buf.writeUInt32BE(out[0], 0)
buf.writeUInt32BE(out[3], 4)
buf.writeUInt32BE(out[2], 8)
buf.writeUInt32BE(out[1], 12)
return buf
}
AES.prototype.scrub = function () {
scrubVec(this._keySchedule)
scrubVec(this._invKeySchedule)
scrubVec(this._key)
}
module.exports.AES = AES
},{"safe-buffer":160}],38:[function(require,module,exports){
var aes = require('./aes')
var Buffer = require('safe-buffer').Buffer
var Transform = require('cipher-base')
var inherits = require('inherits')
var GHASH = require('./ghash')
var xor = require('buffer-xor')
var incr32 = require('./incr32')
function xorTest (a, b) {
var out = 0
if (a.length !== b.length) out++
var len = Math.min(a.length, b.length)
for (var i = 0; i < len; ++i) {
out += (a[i] ^ b[i])
}
return out
}
function calcIv (self, iv, ck) {
if (iv.length === 12) {
self._finID = Buffer.concat([iv, Buffer.from([0, 0, 0, 1])])
return Buffer.concat([iv, Buffer.from([0, 0, 0, 2])])
}
var ghash = new GHASH(ck)
var len = iv.length
var toPad = len % 16
ghash.update(iv)
if (toPad) {
toPad = 16 - toPad
ghash.update(Buffer.alloc(toPad, 0))
}
ghash.update(Buffer.alloc(8, 0))
var ivBits = len * 8
var tail = Buffer.alloc(8)
tail.writeUIntBE(ivBits, 0, 8)
ghash.update(tail)
self._finID = ghash.state
var out = Buffer.from(self._finID)
incr32(out)
return out
}
function StreamCipher (mode, key, iv, decrypt) {
Transform.call(this)
var h = Buffer.alloc(4, 0)
this._cipher = new aes.AES(key)
var ck = this._cipher.encryptBlock(h)
this._ghash = new GHASH(ck)
iv = calcIv(this, iv, ck)
this._prev = Buffer.from(iv)
this._cache = Buffer.allocUnsafe(0)
this._secCache = Buffer.allocUnsafe(0)
this._decrypt = decrypt
this._alen = 0
this._len = 0
this._mode = mode
this._authTag = null
this._called = false
}
inherits(StreamCipher, Transform)
StreamCipher.prototype._update = function (chunk) {
if (!this._called && this._alen) {
var rump = 16 - (this._alen % 16)
if (rump < 16) {
rump = Buffer.alloc(rump, 0)
this._ghash.update(rump)
}
}
this._called = true
var out = this._mode.encrypt(this, chunk)
if (this._decrypt) {
this._ghash.update(chunk)
} else {
this._ghash.update(out)
}
this._len += chunk.length
return out
}
StreamCipher.prototype._final = function () {
if (this._decrypt && !this._authTag) throw new Error('Unsupported state or unable to authenticate data')
var tag = xor(this._ghash.final(this._alen * 8, this._len * 8), this._cipher.encryptBlock(this._finID))
if (this._decrypt && xorTest(tag, this._authTag)) throw new Error('Unsupported state or unable to authenticate data')
this._authTag = tag
this._cipher.scrub()
}
StreamCipher.prototype.getAuthTag = function getAuthTag () {
if (this._decrypt || !Buffer.isBuffer(this._authTag)) throw new Error('Attempting to get auth tag in unsupported state')
return this._authTag
}
StreamCipher.prototype.setAuthTag = function setAuthTag (tag) {
if (!this._decrypt) throw new Error('Attempting to set auth tag in unsupported state')
this._authTag = tag
}
StreamCipher.prototype.setAAD = function setAAD (buf) {
if (this._called) throw new Error('Attempting to set AAD in unsupported state')
this._ghash.update(buf)
this._alen += buf.length
}
module.exports = StreamCipher
},{"./aes":37,"./ghash":42,"./incr32":43,"buffer-xor":64,"cipher-base":66,"inherits":119,"safe-buffer":160}],39:[function(require,module,exports){
var ciphers = require('./encrypter')
var deciphers = require('./decrypter')
var modes = require('./modes/list.json')
function getCiphers () {
return Object.keys(modes)
}
exports.createCipher = exports.Cipher = ciphers.createCipher
exports.createCipheriv = exports.Cipheriv = ciphers.createCipheriv
exports.createDecipher = exports.Decipher = deciphers.createDecipher
exports.createDecipheriv = exports.Decipheriv = deciphers.createDecipheriv
exports.listCiphers = exports.getCiphers = getCiphers
},{"./decrypter":40,"./encrypter":41,"./modes/list.json":51}],40:[function(require,module,exports){
var AuthCipher = require('./authCipher')
var Buffer = require('safe-buffer').Buffer
var MODES = require('./modes')
var StreamCipher = require('./streamCipher')
var Transform = require('cipher-base')
var aes = require('./aes')
var ebtk = require('evp_bytestokey')
var inherits = require('inherits')
function Decipher (mode, key, iv) {
Transform.call(this)
this._cache = new Splitter()
this._last = void 0
this._cipher = new aes.AES(key)
this._prev = Buffer.from(iv)
this._mode = mode
this._autopadding = true
}
inherits(Decipher, Transform)
Decipher.prototype._update = function (data) {
this._cache.add(data)
var chunk
var thing
var out = []
while ((chunk = this._cache.get(this._autopadding))) {
thing = this._mode.decrypt(this, chunk)
out.push(thing)
}
return Buffer.concat(out)
}
Decipher.prototype._final = function () {
var chunk = this._cache.flush()
if (this._autopadding) {
return unpad(this._mode.decrypt(this, chunk))
} else if (chunk) {
throw new Error('data not multiple of block length')
}
}
Decipher.prototype.setAutoPadding = function (setTo) {
this._autopadding = !!setTo
return this
}
function Splitter () {
this.cache = Buffer.allocUnsafe(0)
}
Splitter.prototype.add = function (data) {
this.cache = Buffer.concat([this.cache, data])
}
Splitter.prototype.get = function (autoPadding) {
var out
if (autoPadding) {
if (this.cache.length > 16) {
out = this.cache.slice(0, 16)
this.cache = this.cache.slice(16)
return out
}
} else {
if (this.cache.length >= 16) {
out = this.cache.slice(0, 16)
this.cache = this.cache.slice(16)
return out
}
}
return null
}
Splitter.prototype.flush = function () {
if (this.cache.length) return this.cache
}
function unpad (last) {
var padded = last[15]
var i = -1
while (++i < padded) {
if (last[(i + (16 - padded))] !== padded) {
throw new Error('unable to decrypt data')
}
}
if (padded === 16) return
return last.slice(0, 16 - padded)
}
function createDecipheriv (suite, password, iv) {
var config = MODES[suite.toLowerCase()]
if (!config) throw new TypeError('invalid suite type')
if (typeof iv === 'string') iv = Buffer.from(iv)
if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
if (typeof password === 'string') password = Buffer.from(password)
if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
if (config.type === 'stream') {
return new StreamCipher(config.module, password, iv, true)
} else if (config.type === 'auth') {
return new AuthCipher(config.module, password, iv, true)
}
return new Decipher(config.module, password, iv)
}
function createDecipher (suite, password) {
var config = MODES[suite.toLowerCase()]
if (!config) throw new TypeError('invalid suite type')
var keys = ebtk(password, false, config.key, config.iv)
return createDecipheriv(suite, keys.key, keys.iv)
}
exports.createDecipher = createDecipher
exports.createDecipheriv = createDecipheriv
},{"./aes":37,"./authCipher":38,"./modes":50,"./streamCipher":53,"cipher-base":66,"evp_bytestokey":102,"inherits":119,"safe-buffer":160}],41:[function(require,module,exports){
var MODES = require('./modes')
var AuthCipher = require('./authCipher')
var Buffer = require('safe-buffer').Buffer
var StreamCipher = require('./streamCipher')
var Transform = require('cipher-base')
var aes = require('./aes')
var ebtk = require('evp_bytestokey')
var inherits = require('inherits')
function Cipher (mode, key, iv) {
Transform.call(this)
this._cache = new Splitter()
this._cipher = new aes.AES(key)
this._prev = Buffer.from(iv)
this._mode = mode
this._autopadding = true
}
inherits(Cipher, Transform)
Cipher.prototype._update = function (data) {
this._cache.add(data)
var chunk
var thing
var out = []
while ((chunk = this._cache.get())) {
thing = this._mode.encrypt(this, chunk)
out.push(thing)
}
return Buffer.concat(out)
}
var PADDING = Buffer.alloc(16, 0x10)
Cipher.prototype._final = function () {
var chunk = this._cache.flush()
if (this._autopadding) {
chunk = this._mode.encrypt(this, chunk)
this._cipher.scrub()
return chunk
}
if (!chunk.equals(PADDING)) {
this._cipher.scrub()
throw new Error('data not multiple of block length')
}
}
Cipher.prototype.setAutoPadding = function (setTo) {
this._autopadding = !!setTo
return this
}
function Splitter () {
this.cache = Buffer.allocUnsafe(0)
}
Splitter.prototype.add = function (data) {
this.cache = Buffer.concat([this.cache, data])
}
Splitter.prototype.get = function () {
if (this.cache.length > 15) {
var out = this.cache.slice(0, 16)
this.cache = this.cache.slice(16)
return out
}
return null
}
Splitter.prototype.flush = function () {
var len = 16 - this.cache.length
var padBuff = Buffer.allocUnsafe(len)
var i = -1
while (++i < len) {
padBuff.writeUInt8(len, i)
}
return Buffer.concat([this.cache, padBuff])
}
function createCipheriv (suite, password, iv) {
var config = MODES[suite.toLowerCase()]
if (!config) throw new TypeError('invalid suite type')
if (typeof password === 'string') password = Buffer.from(password)
if (password.length !== config.key / 8) throw new TypeError('invalid key length ' + password.length)
if (typeof iv === 'string') iv = Buffer.from(iv)
if (config.mode !== 'GCM' && iv.length !== config.iv) throw new TypeError('invalid iv length ' + iv.length)
if (config.type === 'stream') {
return new StreamCipher(config.module, password, iv)
} else if (config.type === 'auth') {
return new AuthCipher(config.module, password, iv)
}
return new Cipher(config.module, password, iv)
}
function createCipher (suite, password) {
var config = MODES[suite.toLowerCase()]
if (!config) throw new TypeError('invalid suite type')
var keys = ebtk(password, false, config.key, config.iv)
return createCipheriv(suite, keys.key, keys.iv)
}
exports.createCipheriv = createCipheriv
exports.createCipher = createCipher
},{"./aes":37,"./authCipher":38,"./modes":50,"./streamCipher":53,"cipher-base":66,"evp_bytestokey":102,"inherits":119,"safe-buffer":160}],42:[function(require,module,exports){
var Buffer = require('safe-buffer').Buffer
var ZEROES = Buffer.alloc(16, 0)
function toArray (buf) {
return [
buf.readUInt32BE(0),
buf.readUInt32BE(4),
buf.readUInt32BE(8),
buf.readUInt32BE(12)
]
}
function fromArray (out) {
var buf = Buffer.allocUnsafe(16)
buf.writeUInt32BE(out[0] >>> 0, 0)
buf.writeUInt32BE(out[1] >>> 0, 4)
buf.writeUInt32BE(out[2] >>> 0, 8)
buf.writeUInt32BE(out[3] >>> 0, 12)
return buf
}
function GHASH (key) {
this.h = key
this.state = Buffer.alloc(16, 0)
this.cache = Buffer.allocUnsafe(0)
}
// from http://bitwiseshiftleft.github.io/sjcl/doc/symbols/src/core_gcm.js.html
// by Juho Vähä-Herttua
GHASH.prototype.ghash = function (block) {
var i = -1
while (++i < block.length) {
this.state[i] ^= block[i]
}
this._multiply()
}
GHASH.prototype._multiply = function () {
var Vi = toArray(this.h)
var Zi = [0, 0, 0, 0]
var j, xi, lsbVi
var i = -1
while (++i < 128) {
xi = (this.state[~~(i / 8)] & (1 << (7 - (i % 8)))) !== 0
if (xi) {
// Z_i+1 = Z_i ^ V_i
Zi[0] ^= Vi[0]
Zi[1] ^= Vi[1]
Zi[2] ^= Vi[2]
Zi[3] ^= Vi[3]
}
// Store the value of LSB(V_i)
lsbVi = (Vi[3] & 1) !== 0
// V_i+1 = V_i >> 1
for (j = 3; j > 0; j--) {
Vi[j] = (Vi[j] >>> 1) | ((Vi[j - 1] & 1) << 31)
}
Vi[0] = Vi[0] >>> 1
// If LSB(V_i) is 1, V_i+1 = (V_i >> 1) ^ R
if (lsbVi) {
Vi[0] = Vi[0] ^ (0xe1 << 24)
}
}
this.state = fromArray(Zi)
}
GHASH.prototype.update = function (buf) {
this.cache = Buffer.concat([this.cache, buf])
var chunk
while (this.cache.length >= 16) {
chunk = this.cache.slice(0, 16)
this.cache = this.cache.slice(16)
this.ghash(chunk)
}
}
GHASH.prototype.final = function (abl, bl) {
if (this.cache.length) {
this.ghash(Buffer.concat([this.cache, ZEROES], 16))
}
this.ghash(fromArray([0, abl, 0, bl]))
return this.state
}
module.exports = GHASH
},{"safe-buffer":160}],43:[function(require,module,exports){
function incr32 (iv) {
var len = iv.length
var item
while (len--) {
item = iv.readUInt8(len)
if (item === 255) {
iv.writeUInt8(0, len)
} else {
item++
iv.writeUInt8(item, len)
break
}
}
}
module.exports = incr32
},{}],44:[function(require,module,exports){
var xor = require('buffer-xor')
exports.encrypt = function (self, block) {
var data = xor(block, self._prev)
self._prev = self._cipher.encryptBlock(data)
return self._prev
}
exports.decrypt = function (self, block) {
var pad = self._prev
self._prev = block
var out = self._cipher.decryptBlock(block)
return xor(out, pad)
}
},{"buffer-xor":64}],45:[function(require,module,exports){
var Buffer = require('safe-buffer').Buffer
var xor = require('buffer-xor')
function encryptStart (self, data, decrypt) {
var len = data.length
var out = xor(data, self._cache)
self._cache = self._cache.slice(len)
self._prev = Buffer.concat([self._prev, decrypt ? data : out])
return out
}
exports.encrypt = function (self, data, decrypt) {
var out = Buffer.allocUnsafe(0)
var len
while (data.length) {
if (self._cache.length === 0) {
self._cache = self._cipher.encryptBlock(self._prev)
self._prev = Buffer.allocUnsafe(0)
}
if (self._cache.length <= data.length) {
len = self._cache.length
out = Buffer.concat([out, encryptStart(self, data.slice(0, len), decrypt)])
data = data.slice(len)
} else {
out = Buffer.concat([out, encryptStart(self, data, decrypt)])
break
}
}
return out
}
},{"buffer-xor":64,"safe-buffer":160}],46:[function(require,module,exports){
var Buffer = require('safe-buffer').Buffer
function encryptByte (self, byteParam, decrypt) {
var pad
var i = -1
var len = 8
var out = 0
var bit, value
while (++i < len) {
pad = self._cipher.encryptBlock(self._prev)
bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0
value = pad[0] ^ bit
out += ((value & 0x80) >> (i % 8))
self._prev = shiftIn(self._prev, decrypt ? bit : value)
}
return out
}
function shiftIn (buffer, value) {
var len = buffer.length
var i = -1
var out = Buffer.allocUnsafe(buffer.length)
buffer = Buffer.concat([buffer, Buffer.from([value])])
while (++i < len) {
out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)
}
return out
}
exports.encrypt = function (self, chunk, decrypt) {
var len = chunk.length
var out = Buffer.allocUnsafe(len)
var i = -1
while (++i < len) {
out[i] = encryptByte(self, chunk[i], decrypt)
}
return out
}
},{"safe-buffer":160}],47:[function(require,module,exports){
(function (Buffer){
function encryptByte (self, byteParam, decrypt) {
var pad = self._cipher.encryptBlock(self._prev)
var out = pad[0] ^ byteParam
self._prev = Buffer.concat([
self._prev.slice(1),
Buffer.from([decrypt ? byteParam : out])
])
return out
}
exports.encrypt = function (self, chunk, decrypt) {
var len = chunk.length
var out = Buffer.allocUnsafe(len)
var i = -1
while (++i < len) {
out[i] = encryptByte(self, chunk[i], decrypt)
}
return out
}
}).call(this,require("buffer").Buffer)
},{"buffer":65}],48:[function(require,module,exports){
(function (Buffer){
var xor = require('buffer-xor')
var incr32 = require('../incr32')
function getBlock (self) {
var out = self._cipher.encryptBlockRaw(self._prev)
incr32(self._prev)
return out
}
var blockSize = 16
exports.encrypt = function (self, chunk) {
var chunkNum = Math.ceil(chunk.length / blockSize)
var start = self._cache.length
self._cache = Buffer.concat([
self._cache,
Buffer.allocUnsafe(chunkNum * blockSize)
])
for (var i = 0; i < chunkNum; i++) {
var out = getBlock(self)
var offset = start + i * blockSize
self._cache.writeUInt32BE(out[0], offset + 0)
self._cache.writeUInt32BE(out[1], offset + 4)
self._cache.writeUInt32BE(out[2], offset + 8)
self._cache.writeUInt32BE(out[3], offset + 12)
}
var pad = self._cache.slice(0, chunk.length)
self._cache = self._cache.slice(chunk.length)
return xor(chunk, pad)
}
}).call(this,require("buffer").Buffer)
},{"../incr32":43,"buffer":65,"buffer-xor":64}],49:[function(require,module,exports){
exports.encrypt = function (self, block) {
return self._cipher.encryptBlock(block)
}
exports.decrypt = function (self, block) {
return self._cipher.decryptBlock(block)
}
},{}],50:[function(require,module,exports){
var modeModules = {
ECB: require('./ecb'),
CBC: require('./cbc'),
CFB: require('./cfb'),
CFB8: require('./cfb8'),
CFB1: require('./cfb1'),
OFB: require('./ofb'),
CTR: require('./ctr'),
GCM: require('./ctr')
}
var modes = require('./list.json')
for (var key in modes) {
modes[key].module = modeModules[modes[key].mode]
}
module.exports = modes
},{"./cbc":44,"./cfb":45,"./cfb1":46,"./cfb8":47,"./ctr":48,"./ecb":49,"./list.json":51,"./ofb":52}],51:[function(require,module,exports){
module.exports={
"aes-128-ecb": {
"cipher": "AES",
"key": 128,
"iv": 0,
"mode": "ECB",
"type": "block"
},
"aes-192-ecb": {
"cipher": "AES",
"key": 192,
"iv": 0,
"mode": "ECB",
"type": "block"
},
"aes-256-ecb": {
"cipher": "AES",
"key": 256,
"iv": 0,
"mode": "ECB",
"type": "block"
},
"aes-128-cbc": {
"cipher": "AES",
"key": 128,
"iv": 16,
"mode": "CBC",
"type": "block"
},
"aes-192-cbc": {
"cipher": "AES",
"key": 192,
"iv": 16,
"mode": "CBC",
"type": "block"
},
"aes-256-cbc": {
"cipher": "AES",
"key": 256,
"iv": 16,
"mode": "CBC",
"type": "block"
},
"aes128": {
"cipher": "AES",
"key": 128,
"iv": 16,
"mode": "CBC",
"type": "block"
},
"aes192": {
"cipher": "AES",
"key": 192,
"iv": 16,
"mode": "CBC",
"type": "block"
},
"aes256": {
"cipher": "AES",
"key": 256,
"iv": 16,
"mode": "CBC",
"type": "block"
},
"aes-128-cfb": {
"cipher": "AES",
"key": 128,
"iv": 16,
"mode": "CFB",
"type": "stream"
},
"aes-192-cfb": {
"cipher": "AES",
"key": 192,
"iv": 16,
"mode": "CFB",
"type": "stream"
},
"aes-256-cfb": {
"cipher": "AES",
"key": 256,
"iv": 16,
"mode": "CFB",
"type": "stream"
},
"aes-128-cfb8": {
"cipher": "AES",
"key": 128,
"iv": 16,
"mode": "CFB8",
"type": "stream"
},
"aes-192-cfb8": {
"cipher": "AES",
"key": 192,
"iv": 16,
"mode": "CFB8",
"type": "stream"
},
"aes-256-cfb8": {
"cipher": "AES",
"key": 256,
"iv": 16,
"mode": "CFB8",
"type": "stream"
},
"aes-128-cfb1": {
"cipher": "AES",
"key": 128,
"iv": 16,
"mode": "CFB1",
"type": "stream"
},
"aes-192-cfb1": {
"cipher": "AES",
"key": 192,
"iv": 16,
"mode": "CFB1",
"type": "stream"
},
"aes-256-cfb1": {
"cipher": "AES",
"key": 256,
"iv": 16,
"mode": "CFB1",
"type": "stream"
},
"aes-128-ofb": {
"cipher": "AES",
"key": 128,
"iv": 16,
"mode": "OFB",
"type": "stream"
},
"aes-192-ofb": {
"cipher": "AES",
"key": 192,
"iv": 16,
"mode": "OFB",
"type": "stream"
},
"aes-256-ofb": {
"cipher": "AES",
"key": 256,
"iv": 16,
"mode": "OFB",
"type": "stream"
},
"aes-128-ctr": {
"cipher": "AES",
"key": 128,
"iv": 16,
"mode": "CTR",
"type": "stream"
},
"aes-192-ctr": {
"cipher": "AES",
"key": 192,
"iv": 16,
"mode": "CTR",
"type": "stream"
},
"aes-256-ctr": {
"cipher": "AES",
"key": 256,
"iv": 16,
"mode": "CTR",
"type": "stream"
},
"aes-128-gcm": {
"cipher": "AES",
"key": 128,
"iv": 12,
"mode": "GCM",
"type": "auth"
},
"aes-192-gcm": {
"cipher": "AES",
"key": 192,
"iv": 12,
"mode": "GCM",
"type": "auth"
},
"aes-256-gcm": {
"cipher": "AES",
"key": 256,
"iv": 12,
"mode": "GCM",
"type": "auth"
}
}
},{}],52:[function(require,module,exports){
(function (Buffer){
var xor = require('buffer-xor')
function getBlock (self) {
self._prev = self._cipher.encryptBlock(self._prev)
return self._prev
}
exports.encrypt = function (self, chunk) {
while (self._cache.length < chunk.length) {
self._cache = Buffer.concat([self._cache, getBlock(self)])
}
var pad = self._cache.slice(0, chunk.length)
self._cache = self._cache.slice(chunk.length)
return xor(chunk, pad)
}
}).call(this,require("buffer").Buffer)
},{"buffer":65,"buffer-xor":64}],53:[function(require,module,exports){
var aes = require('./aes')
var Buffer = require('safe-buffer').Buffer
var Transform = require('cipher-base')
var inherits = require('inherits')
function StreamCipher (mode, key, iv, decrypt) {
Transform.call(this)
this._cipher = new aes.AES(key)
this._prev = Buffer.from(iv)
this._cache = Buffer.allocUnsafe(0)
this._secCache = Buffer.allocUnsafe(0)
this._decrypt = decrypt
this._mode = mode
}
inherits(StreamCipher, Transform)
StreamCipher.prototype._update = function (chunk) {
return this._mode.encrypt(this, chunk, this._decrypt)
}
StreamCipher.prototype._final = function () {
this._cipher.scrub()
}
module.exports = StreamCipher
},{"./aes":37,"cipher-base":66,"inherits":119,"safe-buffer":160}],54:[function(require,module,exports){
var ebtk = require('evp_bytestokey')
var aes = require('browserify-aes/browser')
var DES = require('browserify-des')
var desModes = require('browserify-des/modes')
var aesModes = require('browserify-aes/modes')
function createCipher (suite, password) {
var keyLen, ivLen
suite = suite.toLowerCase()
if (aesModes[suite]) {
keyLen = aesModes[suite].key
ivLen = aesModes[suite].iv
} else if (desModes[suite]) {
keyLen = desModes[suite].key * 8
ivLen = desModes[suite].iv
} else {
throw new TypeError('invalid suite type')
}
var keys = ebtk(password, false, keyLen, ivLen)
return createCipheriv(suite, keys.key, keys.iv)
}
function createDecipher (suite, password) {
var keyLen, ivLen
suite = suite.toLowerCase()
if (aesModes[suite]) {
keyLen = aesModes[suite].key
ivLen = aesModes[suite].iv
} else if (desModes[suite]) {
keyLen = desModes[suite].key * 8
ivLen = desModes[suite].iv
} else {
throw new TypeError('invalid suite type')
}
var keys = ebtk(password, false, keyLen, ivLen)
return createDecipheriv(suite, keys.key, keys.iv)
}
function createCipheriv (suite, key, iv) {
suite = suite.toLowerCase()
if (aesModes[suite]) {
return aes.createCipheriv(suite, key, iv)
} else if (desModes[suite]) {
return new DES({
key: key,
iv: iv,
mode: suite
})
} else {
throw new TypeError('invalid suite type')
}
}
function createDecipheriv (suite, key, iv) {
suite = suite.toLowerCase()
if (aesModes[suite]) {
return aes.createDecipheriv(suite, key, iv)
} else if (desModes[suite]) {
return new DES({
key: key,
iv: iv,
mode: suite,
decrypt: true
})
} else {
throw new TypeError('invalid suite type')
}
}
exports.createCipher = exports.Cipher = createCipher
exports.createCipheriv = exports.Cipheriv = createCipheriv
exports.createDecipher = exports.Decipher = createDecipher
exports.createDecipheriv = exports.Decipheriv = createDecipheriv
function getCiphers () {
return Object.keys(desModes).concat(aes.getCiphers())
}
exports.listCiphers = exports.getCiphers = getCiphers
},{"browserify-aes/browser":39,"browserify-aes/modes":50,"browserify-des":55,"browserify-des/modes":56,"evp_bytestokey":102}],55:[function(require,module,exports){
(function (Buffer){
var CipherBase = require('cipher-base')
var des = require('des.js')
var inherits = require('inherits')
var modes = {
'des-ede3-cbc': des.CBC.instantiate(des.EDE),
'des-ede3': des.EDE,
'des-ede-cbc': des.CBC.instantiate(des.EDE),
'des-ede': des.EDE,
'des-cbc': des.CBC.instantiate(des.DES),
'des-ecb': des.DES
}
modes.des = modes['des-cbc']
modes.des3 = modes['des-ede3-cbc']
module.exports = DES
inherits(DES, CipherBase)
function DES (opts) {
CipherBase.call(this)
var modeName = opts.mode.toLowerCase()
var mode = modes[modeName]
var type
if (opts.decrypt) {
type = 'decrypt'
} else {
type = 'encrypt'
}
var key = opts.key
if (modeName === 'des-ede' || modeName === 'des-ede-cbc') {
key = Buffer.concat([key, key.slice(0, 8)])
}
var iv = opts.iv
this._des = mode.create({
key: key,
iv: iv,
type: type
})
}
DES.prototype._update = function (data) {
return new Buffer(this._des.update(data))
}
DES.prototype._final = function () {
return new Buffer(this._des.final())
}
}).call(this,require("buffer").Buffer)
},{"buffer":65,"cipher-base":66,"des.js":75,"inherits":119}],56:[function(require,module,exports){
exports['des-ecb'] = {
key: 8,
iv: 0
}
exports['des-cbc'] = exports.des = {
key: 8,
iv: 8
}
exports['des-ede3-cbc'] = exports.des3 = {
key: 24,
iv: 8
}
exports['des-ede3'] = {
key: 24,
iv: 0
}
exports['des-ede-cbc'] = {
key: 16,
iv: 8
}
exports['des-ede'] = {
key: 16,
iv: 0
}
},{}],57:[function(require,module,exports){
(function (Buffer){
var bn = require('bn.js');
var randomBytes = require('randombytes');
module.exports = crt;
function blind(priv) {
var r = getr(priv);
var blinder = r.toRed(bn.mont(priv.modulus))
.redPow(new bn(priv.publicExponent)).fromRed();
return {
blinder: blinder,
unblinder:r.invm(priv.modulus)
};
}
function crt(msg, priv) {
var blinds = blind(priv);
var len = priv.modulus.byteLength();
var mod = bn.mont(priv.modulus);
var blinded = new bn(msg).mul(blinds.blinder).umod(priv.modulus);
var c1 = blinded.toRed(bn.mont(priv.prime1));
var c2 = blinded.toRed(bn.mont(priv.prime2));
var qinv = priv.coefficient;
var p = priv.prime1;
var q = priv.prime2;
var m1 = c1.redPow(priv.exponent1);
var m2 = c2.redPow(priv.exponent2);
m1 = m1.fromRed();
m2 = m2.fromRed();
var h = m1.isub(m2).imul(qinv).umod(p);
h.imul(q);
m2.iadd(h);
return new Buffer(m2.imul(blinds.unblinder).umod(priv.modulus).toArray(false, len));
}
crt.getr = getr;
function getr(priv) {
var len = priv.modulus.byteLength();
var r = new bn(randomBytes(len));
while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2)) {
r = new bn(randomBytes(len));
}
return r;
}
}).call(this,require("buffer").Buffer)
},{"bn.js":34,"buffer":65,"randombytes":145}],58:[function(require,module,exports){
module.exports = require('./browser/algorithms.json')
},{"./browser/algorithms.json":59}],59:[function(require,module,exports){
module.exports={
"sha224WithRSAEncryption": {
"sign": "rsa",
"hash": "sha224",
"id": "302d300d06096086480165030402040500041c"
},
"RSA-SHA224": {
"sign": "ecdsa/rsa",
"hash": "sha224",
"id": "302d300d06096086480165030402040500041c"
},
"sha256WithRSAEncryption": {
"sign": "rsa",
"hash": "sha256",
"id": "3031300d060960864801650304020105000420"
},
"RSA-SHA256": {
"sign": "ecdsa/rsa",
"hash": "sha256",
"id": "3031300d060960864801650304020105000420"
},
"sha384WithRSAEncryption": {
"sign": "rsa",
"hash": "sha384",
"id": "3041300d060960864801650304020205000430"
},
"RSA-SHA384": {
"sign": "ecdsa/rsa",
"hash": "sha384",
"id": "3041300d060960864801650304020205000430"
},
"sha512WithRSAEncryption": {
"sign": "rsa",
"hash": "sha512",
"id": "3051300d060960864801650304020305000440"
},
"RSA-SHA512": {
"sign": "ecdsa/rsa",
"hash": "sha512",
"id": "3051300d060960864801650304020305000440"
},
"RSA-SHA1": {
"sign": "rsa",
"hash": "sha1",
"id": "3021300906052b0e03021a05000414"
},
"ecdsa-with-SHA1": {
"sign": "ecdsa",
"hash": "sha1",
"id": ""
},
"sha256": {
"sign": "ecdsa",
"hash": "sha256",
"id": ""
},
"sha224": {
"sign": "ecdsa",
"hash": "sha224",
"id": ""
},
"sha384": {
"sign": "ecdsa",
"hash": "sha384",
"id": ""
},
"sha512": {
"sign": "ecdsa",
"hash": "sha512",
"id": ""
},
"DSA-SHA": {
"sign": "dsa",
"hash": "sha1",
"id": ""
},
"DSA-SHA1": {
"sign": "dsa",
"hash": "sha1",
"id": ""
},
"DSA": {
"sign": "dsa",
"hash": "sha1",
"id": ""
},
"DSA-WITH-SHA224": {
"sign": "dsa",
"hash": "sha224",
"id": ""
},
"DSA-SHA224": {
"sign": "dsa",
"hash": "sha224",
"id": ""
},
"DSA-WITH-SHA256": {
"sign": "dsa",
"hash": "sha256",
"id": ""
},
"DSA-SHA256": {
"sign": "dsa",
"hash": "sha256",
"id": ""
},
"DSA-WITH-SHA384": {
"sign": "dsa",
"hash": "sha384",
"id": ""
},
"DSA-SHA384": {
"sign": "dsa",
"hash": "sha384",
"id": ""
},
"DSA-WITH-SHA512": {
"sign": "dsa",
"hash": "sha512",
"id": ""
},
"DSA-SHA512": {
"sign": "dsa",
"hash": "sha512",
"id": ""
},
"DSA-RIPEMD160": {
"sign": "dsa",
"hash": "rmd160",
"id": ""
},
"ripemd160WithRSA": {
"sign": "rsa",
"hash": "rmd160",
"id": "3021300906052b2403020105000414"
},
"RSA-RIPEMD160": {
"sign": "rsa",
"hash": "rmd160",
"id": "3021300906052b2403020105000414"
},
"md5WithRSAEncryption": {
"sign": "rsa",
"hash": "md5",
"id": "3020300c06082a864886f70d020505000410"
},
"RSA-MD5": {
"sign": "rsa",
"hash": "md5",
"id": "3020300c06082a864886f70d020505000410"
}
}
},{}],60:[function(require,module,exports){
module.exports={
"1.3.132.0.10": "secp256k1",
"1.3.132.0.33": "p224",
"1.2.840.10045.3.1.1": "p192",
"1.2.840.10045.3.1.7": "p256",
"1.3.132.0.34": "p384",
"1.3.132.0.35": "p521"
}
},{}],61:[function(require,module,exports){
(function (Buffer){
var createHash = require('create-hash')
var stream = require('stream')
var inherits = require('inherits')
var sign = require('./sign')
var verify = require('./verify')
var algorithms = require('./algorithms.json')
Object.keys(algorithms).forEach(function (key) {
algorithms[key].id = new Buffer(algorithms[key].id, 'hex')
algorithms[key.toLowerCase()] = algorithms[key]
})
function Sign (algorithm) {
stream.Writable.call(this)
var data = algorithms[algorithm]
if (!data) throw new Error('Unknown message digest')
this._hashType = data.hash
this._hash = createHash(data.hash)
this._tag = data.id
this._signType = data.sign
}
inherits(Sign, stream.Writable)
Sign.prototype._write = function _write (data, _, done) {
this._hash.update(data)
done()
}
Sign.prototype.update = function update (data, enc) {
if (typeof data === 'string') data = new Buffer(data, enc)
this._hash.update(data)
return this
}
Sign.prototype.sign = function signMethod (key, enc) {
this.end()
var hash = this._hash.digest()
var sig = sign(hash, key, this._hashType, this._signType, this._tag)
return enc ? sig.toString(enc) : sig
}
function Verify (algorithm) {
stream.Writable.call(this)
var data = algorithms[algorithm]
if (!data) throw new Error('Unknown message digest')
this._hash = createHash(data.hash)
this._tag = data.id
this._signType = data.sign
}
inherits(Verify, stream.Writable)
Verify.prototype._write = function _write (data, _, done) {
this._hash.update(data)
done()
}
Verify.prototype.update = function update (data, enc) {
if (typeof data === 'string') data = new Buffer(data, enc)
this._hash.update(data)
return this
}
Verify.prototype.verify = function verifyMethod (key, sig, enc) {
if (typeof sig === 'string') sig = new Buffer(sig, enc)
this.end()
var hash = this._hash.digest()
return verify(sig, hash, key, this._signType, this._tag)
}
function createSign (algorithm) {
return new Sign(algorithm)
}
function createVerify (algorithm) {
return new Verify(algorithm)
}
module.exports = {
Sign: createSign,
Verify: createVerify,
createSign: createSign,
createVerify: createVerify
}
}).call(this,require("buffer").Buffer)
},{"./algorithms.json":59,"./sign":62,"./verify":63,"buffer":65,"create-hash":69,"inherits":119,"stream":169}],62:[function(require,module,exports){
(function (Buffer){
// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
var createHmac = require('create-hmac')
var crt = require('browserify-rsa')
var EC = require('elliptic').ec
var BN = require('bn.js')
var parseKeys = require('parse-asn1')
var curves = require('./curves.json')
function sign (hash, key, hashType, signType, tag) {
var priv = parseKeys(key)
if (priv.curve) {
// rsa keys can be interpreted as ecdsa ones in openssl
if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
return ecSign(hash, priv)
} else if (priv.type === 'dsa') {
if (signType !== 'dsa') throw new Error('wrong private key type')
return dsaSign(hash, priv, hashType)
} else {
if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong private key type')
}
hash = Buffer.concat([tag, hash])
var len = priv.modulus.byteLength()
var pad = [ 0, 1 ]
while (hash.length + pad.length + 1 < len) pad.push(0xff)
pad.push(0x00)
var i = -1
while (++i < hash.length) pad.push(hash[i])
var out = crt(pad, priv)
return out
}
function ecSign (hash, priv) {
var curveId = curves[priv.curve.join('.')]
if (!curveId) throw new Error('unknown curve ' + priv.curve.join('.'))
var curve = new EC(curveId)
var key = curve.keyFromPrivate(priv.privateKey)
var out = key.sign(hash)
return new Buffer(out.toDER())
}
function dsaSign (hash, priv, algo) {
var x = priv.params.priv_key
var p = priv.params.p
var q = priv.params.q
var g = priv.params.g
var r = new BN(0)
var k
var H = bits2int(hash, q).mod(q)
var s = false
var kv = getKey(x, q, hash, algo)
while (s === false) {
k = makeKey(q, kv, algo)
r = makeR(g, k, p, q)
s = k.invm(q).imul(H.add(x.mul(r))).mod(q)
if (s.cmpn(0) === 0) {
s = false
r = new BN(0)
}
}
return toDER(r, s)
}
function toDER (r, s) {
r = r.toArray()
s = s.toArray()
// Pad values
if (r[0] & 0x80) r = [ 0 ].concat(r)
if (s[0] & 0x80) s = [ 0 ].concat(s)
var total = r.length + s.length + 4
var res = [ 0x30, total, 0x02, r.length ]
res = res.concat(r, [ 0x02, s.length ], s)
return new Buffer(res)
}
function getKey (x, q, hash, algo) {
x = new Buffer(x.toArray())
if (x.length < q.byteLength()) {
var zeros = new Buffer(q.byteLength() - x.length)
zeros.fill(0)
x = Buffer.concat([ zeros, x ])
}
var hlen = hash.length
var hbits = bits2octets(hash, q)
var v = new Buffer(hlen)
v.fill(1)
var k = new Buffer(hlen)
k.fill(0)
k = createHmac(algo, k).update(v).update(new Buffer([ 0 ])).update(x).update(hbits).digest()
v = createHmac(algo, k).update(v).digest()
k = createHmac(algo, k).update(v).update(new Buffer([ 1 ])).update(x).update(hbits).digest()
v = createHmac(algo, k).update(v).digest()
return { k: k, v: v }
}
function bits2int (obits, q) {
var bits = new BN(obits)
var shift = (obits.length << 3) - q.bitLength()
if (shift > 0) bits.ishrn(shift)
return bits
}
function bits2octets (bits, q) {
bits = bits2int(bits, q)
bits = bits.mod(q)
var out = new Buffer(bits.toArray())
if (out.length < q.byteLength()) {
var zeros = new Buffer(q.byteLength() - out.length)
zeros.fill(0)
out = Buffer.concat([ zeros, out ])
}
return out
}
function makeKey (q, kv, algo) {
var t
var k
do {
t = new Buffer(0)
while (t.length * 8 < q.bitLength()) {
kv.v = createHmac(algo, kv.k).update(kv.v).digest()
t = Buffer.concat([ t, kv.v ])
}
k = bits2int(t, q)
kv.k = createHmac(algo, kv.k).update(kv.v).update(new Buffer([ 0 ])).digest()
kv.v = createHmac(algo, kv.k).update(kv.v).digest()
} while (k.cmp(q) !== -1)
return k
}
function makeR (g, k, p, q) {
return g.toRed(BN.mont(p)).redPow(k).fromRed().mod(q)
}
module.exports = sign
module.exports.getKey = getKey
module.exports.makeKey = makeKey
}).call(this,require("buffer").Buffer)
},{"./curves.json":60,"bn.js":34,"browserify-rsa":57,"buffer":65,"create-hmac":72,"elliptic":85,"parse-asn1":131}],63:[function(require,module,exports){
(function (Buffer){
// much of this based on https://github.com/indutny/self-signed/blob/gh-pages/lib/rsa.js
var BN = require('bn.js')
var EC = require('elliptic').ec
var parseKeys = require('parse-asn1')
var curves = require('./curves.json')
function verify (sig, hash, key, signType, tag) {
var pub = parseKeys(key)
if (pub.type === 'ec') {
// rsa keys can be interpreted as ecdsa ones in openssl
if (signType !== 'ecdsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
return ecVerify(sig, hash, pub)
} else if (pub.type === 'dsa') {
if (signType !== 'dsa') throw new Error('wrong public key type')
return dsaVerify(sig, hash, pub)
} else {
if (signType !== 'rsa' && signType !== 'ecdsa/rsa') throw new Error('wrong public key type')
}
hash = Buffer.concat([tag, hash])
var len = pub.modulus.byteLength()
var pad = [ 1 ]
var padNum = 0
while (hash.length + pad.length + 2 < len) {
pad.push(0xff)
padNum++
}
pad.push(0x00)
var i = -1
while (++i < hash.length) {
pad.push(hash[i])
}
pad = new Buffer(pad)
var red = BN.mont(pub.modulus)
sig = new BN(sig).toRed(red)
sig = sig.redPow(new BN(pub.publicExponent))
sig = new Buffer(sig.fromRed().toArray())
var out = padNum < 8 ? 1 : 0
len = Math.min(sig.length, pad.length)
if (sig.length !== pad.length) out = 1
i = -1
while (++i < len) out |= sig[i] ^ pad[i]
return out === 0
}
function ecVerify (sig, hash, pub) {
var curveId = curves[pub.data.algorithm.curve.join('.')]
if (!curveId) throw new Error('unknown curve ' + pub.data.algorithm.curve.join('.'))
var curve = new EC(curveId)
var pubkey = pub.data.subjectPrivateKey.data
return curve.verify(hash, sig, pubkey)
}
function dsaVerify (sig, hash, pub) {
var p = pub.data.p
var q = pub.data.q
var g = pub.data.g
var y = pub.data.pub_key
var unpacked = parseKeys.signature.decode(sig, 'der')
var s = unpacked.s
var r = unpacked.r
checkValue(s, q)
checkValue(r, q)
var montp = BN.mont(p)
var w = s.invm(q)
var v = g.toRed(montp)
.redPow(new BN(hash).mul(w).mod(q))
.fromRed()
.mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed())
.mod(p)
.mod(q)
return v.cmp(r) === 0
}
function checkValue (b, q) {
if (b.cmpn(0) <= 0) throw new Error('invalid sig')
if (b.cmp(q) >= q) throw new Error('invalid sig')
}
module.exports = verify
}).call(this,require("buffer").Buffer)
},{"./curves.json":60,"bn.js":34,"buffer":65,"elliptic":85,"parse-asn1":131}],64:[function(require,module,exports){
(function (Buffer){
module.exports = function xor (a, b) {
var length = Math.min(a.length, b.length)
var buffer = new Buffer(length)
for (var i = 0; i < length; ++i) {
buffer[i] = a[i] ^ b[i]
}
return buffer
}
}).call(this,require("buffer").Buffer)
},{"buffer":65}],65:[function(require,module,exports){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
'use strict'
var base64 = require('base64-js')
var ieee754 = require('ieee754')
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
var K_MAX_LENGTH = 0x7fffffff
exports.kMaxLength = K_MAX_LENGTH
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Print warning and recommend using `buffer` v4.x which has an Object
* implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* We report that the browser does not support typed arrays if the are not subclassable
* using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
* (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
* for __proto__ and has a buggy typed array implementation.
*/
Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport()
if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&
typeof console.error === 'function') {
console.error(
'This browser lacks typed array (Uint8Array) support which is required by ' +
'`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'
)
}
function typedArraySupport () {
// Can typed array instances can be augmented?
try {
var arr = new Uint8Array(1)
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
return arr.foo() === 42
} catch (e) {
return false
}
}
function createBuffer (length) {
if (length > K_MAX_LENGTH) {
throw new RangeError('Invalid typed array length')
}
// Return an augmented `Uint8Array` instance
var buf = new Uint8Array(length)
buf.__proto__ = Buffer.prototype
return buf
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer (arg, encodingOrOffset, length) {
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error(
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe(arg)
}
return from(arg, encodingOrOffset, length)
}
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
if (typeof Symbol !== 'undefined' && Symbol.species &&
Buffer[Symbol.species] === Buffer) {
Object.defineProperty(Buffer, Symbol.species, {
value: null,
configurable: true,
enumerable: false,
writable: false
})
}
Buffer.poolSize = 8192 // not used by this implementation
function from (value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number')
}
if (isArrayBuffer(value)) {
return fromArrayBuffer(value, encodingOrOffset, length)
}
if (typeof value === 'string') {
return fromString(value, encodingOrOffset)
}
return fromObject(value)
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(value, encodingOrOffset, length)
}
// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
// https://github.com/feross/buffer/pull/148
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
function assertSize (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
}
function alloc (size, fill, encoding) {
assertSize(size)
if (size <= 0) {
return createBuffer(size)
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer(size).fill(fill, encoding)
: createBuffer(size).fill(fill)
}
return createBuffer(size)
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(size, fill, encoding)
}
function allocUnsafe (size) {
assertSize(size)
return createBuffer(size < 0 ? 0 : checked(size) | 0)
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(size)
}
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(size)
}
function fromString (string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8'
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding')
}
var length = byteLength(string, encoding) | 0
var buf = createBuffer(length)
var actual = buf.write(string, encoding)
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
buf = buf.slice(0, actual)
}
return buf
}
function fromArrayLike (array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0
var buf = createBuffer(length)
for (var i = 0; i < length; i += 1) {
buf[i] = array[i] & 255
}
return buf
}
function fromArrayBuffer (array, byteOffset, length) {
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds')
}
var buf
if (byteOffset === undefined && length === undefined) {
buf = new Uint8Array(array)
} else if (length === undefined) {
buf = new Uint8Array(array, byteOffset)
} else {
buf = new Uint8Array(array, byteOffset, length)
}
// Return an augmented `Uint8Array` instance
buf.__proto__ = Buffer.prototype
return buf
}
function fromObject (obj) {
if (Buffer.isBuffer(obj)) {
var len = checked(obj.length) | 0
var buf = createBuffer(len)
if (buf.length === 0) {
return buf
}
obj.copy(buf, 0, 0, len)
return buf
}
if (obj) {
if (isArrayBufferView(obj) || 'length' in obj) {
if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
return createBuffer(0)
}
return fromArrayLike(obj)
}
if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
return fromArrayLike(obj.data)
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}
function checked (length) {
// Note: cannot use `length < K_MAX_LENGTH` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= K_MAX_LENGTH) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')
}
return length | 0
}
function SlowBuffer (length) {
if (+length != length) { // eslint-disable-line eqeqeq
length = 0
}
return Buffer.alloc(+length)
}
Buffer.isBuffer = function isBuffer (b) {
return b != null && b._isBuffer === true
}
Buffer.compare = function compare (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i]
y = b[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function concat (list, length) {
if (!Array.isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i
if (length === undefined) {
length = 0
for (i = 0; i < list.length; ++i) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
for (i = 0; i < list.length; ++i) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer, pos)
pos += buf.length
}
return buffer
}
function byteLength (string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length
}
if (isArrayBufferView(string) || isArrayBuffer(string)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string
}
var len = string.length
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.byteLength = byteLength
function slowToString (encoding, start, end) {
var loweredCase = false
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return ''
}
if (end === undefined || end > this.length) {
end = this.length
}
if (end <= 0) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0
start >>>= 0
if (end <= start) {
return ''
}
if (!encoding) encoding = 'utf8'
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'latin1':
case 'binary':
return latin1Slice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
// to detect a Buffer instance. It's not possible to use `instanceof Buffer`
// reliably in a browserify context because there could be multiple different
// copies of the 'buffer' package in use. This method works even for Buffer
// instances that were created from another copy of the `buffer` package.
// See: https://github.com/feross/buffer/issues/154
Buffer.prototype._isBuffer = true
function swap (b, n, m) {
var i = b[n]
b[n] = b[m]
b[m] = i
}
Buffer.prototype.swap16 = function swap16 () {
var len = this.length
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits')
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1)
}
return this
}
Buffer.prototype.swap32 = function swap32 () {
var len = this.length
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits')
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3)
swap(this, i + 1, i + 2)
}
return this
}
Buffer.prototype.swap64 = function swap64 () {
var len = this.length
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits')
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7)
swap(this, i + 1, i + 6)
swap(this, i + 2, i + 5)
swap(this, i + 3, i + 4)
}
return this
}
Buffer.prototype.toString = function toString () {
var length = this.length
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this, 0, length)
return slowToString.apply(this, arguments)
}
Buffer.prototype.equals = function equals (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function inspect () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max) str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
if (!Buffer.isBuffer(target)) {
throw new TypeError('Argument must be a Buffer')
}
if (start === undefined) {
start = 0
}
if (end === undefined) {
end = target ? target.length : 0
}
if (thisStart === undefined) {
thisStart = 0
}
if (thisEnd === undefined) {
thisEnd = this.length
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index')
}
if (thisStart >= thisEnd && start >= end) {
return 0
}
if (thisStart >= thisEnd) {
return -1
}
if (start >= end) {
return 1
}
start >>>= 0
end >>>= 0
thisStart >>>= 0
thisEnd >>>= 0
if (this === target) return 0
var x = thisEnd - thisStart
var y = end - start
var len = Math.min(x, y)
var thisCopy = this.slice(thisStart, thisEnd)
var targetCopy = target.slice(start, end)
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i]
y = targetCopy[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1
// Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset
byteOffset = 0
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000
}
byteOffset = +byteOffset // Coerce to Number.
if (numberIsNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1)
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
if (byteOffset >= buffer.length) {
if (dir) return -1
else byteOffset = buffer.length - 1
} else if (byteOffset < 0) {
if (dir) byteOffset = 0
else return -1
}
// Normalize val
if (typeof val === 'string') {
val = Buffer.from(val, encoding)
}
// Finally, search either indexOf (if dir is true) or lastIndexOf
if (Buffer.isBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1
}
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
} else if (typeof val === 'number') {
val = val & 0xFF // Search for a byte value [0-255]
if (typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
}
}
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
}
throw new TypeError('val must be string, number or Buffer')
}
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
var indexSize = 1
var arrLength = arr.length
var valLength = val.length
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase()
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1
}
indexSize = 2
arrLength /= 2
valLength /= 2
byteOffset /= 2
}
}
function read (buf, i) {
if (indexSize === 1) {
return buf[i]
} else {
return buf.readUInt16BE(i * indexSize)
}
}
var i
if (dir) {
var foundIndex = -1
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex
foundIndex = -1
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
for (i = byteOffset; i >= 0; i--) {
var found = true
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false
break
}
}
if (found) return i
}
}
return -1
}
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1
}
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
}
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; ++i) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (numberIsNaN(parsed)) return i
buf[offset + i] = parsed
}
return i
}
function utf8Write (buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}
function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length)
}
function ucs2Write (buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8'
length = this.length
offset = 0
// Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset
length = this.length
offset = 0
// Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset >>> 0
if (isFinite(length)) {
length = length >>> 0
if (encoding === undefined) encoding = 'utf8'
} else {
encoding = length
length = undefined
}
} else {
throw new Error(
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
)
}
var remaining = this.length - offset
if (length === undefined || length > remaining) length = remaining
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
throw new RangeError('Attempt to write outside buffer bounds')
}
if (!encoding) encoding = 'utf8'
var loweredCase = false
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length)
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length)
case 'ascii':
return asciiWrite(this, string, offset, length)
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.toJSON = function toJSON () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end)
var res = []
var i = start
while (i < end) {
var firstByte = buf[i]
var codePoint = null
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
: (firstByte > 0xBF) ? 2
: 1
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte
}
break
case 2:
secondByte = buf[i + 1]
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint
}
}
break
case 3:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint
}
}
break
case 4:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
fourthByte = buf[i + 3]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD
bytesPerSequence = 1
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
codePoint = 0xDC00 | codePoint & 0x3FF
}
res.push(codePoint)
i += bytesPerSequence
}
return decodeCodePointsArray(res)
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000
function decodeCodePointsArray (codePoints) {
var len = codePoints.length
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = ''
var i = 0
while (i < len) {
res += String.fromCharCode.apply(
String,
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
)
}
return res
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
}
function latin1Slice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i])
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; ++i) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))
}
return res
}
Buffer.prototype.slice = function slice (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len
if (start < 0) start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0) end = 0
} else if (end > len) {
end = len
}
if (end < start) end = start
var newBuf = this.subarray(start, end)
// Return an augmented `Uint8Array` instance
newBuf.__proto__ = Buffer.prototype
return newBuf
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
return val
}
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert) {
checkOffset(offset, byteLength, this.length)
}
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul
}
return val
}
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80)) return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
offset = offset >>> 0
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
if (offset + ext > buf.length) throw new RangeError('Index out of range')
}
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
byteLength = byteLength >>> 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
this[offset] = (value & 0xff)
return offset + 1
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
return offset + 2
}
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
return offset + 2
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = (value & 0xff)
return offset + 4
}
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
return offset + 4
}
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
var limit = Math.pow(2, (8 * byteLength) - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = 0
var mul = 1
var sub = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
var limit = Math.pow(2, (8 * byteLength) - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = byteLength - 1
var mul = 1
var sub = 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (value < 0) value = 0xff + value + 1
this[offset] = (value & 0xff)
return offset + 1
}
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
return offset + 2
}
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
return offset + 2
}
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
return offset + 4
}
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range')
if (offset < 0) throw new RangeError('Index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
}
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
value = +value
offset = offset >>> 0
if (!noAssert) {
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
}
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
if (!targetStart) targetStart = 0
if (end > 0 && end < start) end = start
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || this.length === 0) return 0
// Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length) end = this.length
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start
}
var len = end - start
var i
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000) {
// ascending copy from start
for (i = 0; i < len; ++i) {
target[i + targetStart] = this[i + start]
}
} else {
Uint8Array.prototype.set.call(
target,
this.subarray(start, start + len),
targetStart
)
}
return len
}
// Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill (val, start, end, encoding) {
// Handle string cases:
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start
start = 0
end = this.length
} else if (typeof end === 'string') {
encoding = end
end = this.length
}
if (val.length === 1) {
var code = val.charCodeAt(0)
if (code < 256) {
val = code
}
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
} else if (typeof val === 'number') {
val = val & 255
}
// Invalid ranges are not set to a default, so can range check early.
if (start < 0 || this.length < start || this.length < end) {
throw new RangeError('Out of range index')
}
if (end <= start) {
return this
}
start = start >>> 0
end = end === undefined ? this.length : end >>> 0
if (!val) val = 0
var i
if (typeof val === 'number') {
for (i = start; i < end; ++i) {
this[i] = val
}
} else {
var bytes = Buffer.isBuffer(val)
? val
: new Buffer(val, encoding)
var len = bytes.length
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len]
}
}
return this
}
// HELPER FUNCTIONS
// ================
var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = str.trim().replace(INVALID_BASE64_RE, '')
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
var length = string.length
var leadSurrogate = null
var bytes = []
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
leadSurrogate = codePoint
continue
}
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
}
leadSurrogate = null
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
return base64.toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
return i
}
// ArrayBuffers from another context (i.e. an iframe) do not pass the `instanceof` check
// but they should be treated as valid. See: https://github.com/feross/buffer/issues/166
function isArrayBuffer (obj) {
return obj instanceof ArrayBuffer ||
(obj != null && obj.constructor != null && obj.constructor.name === 'ArrayBuffer' &&
typeof obj.byteLength === 'number')
}
// Node 0.10 supports `ArrayBuffer` but lacks `ArrayBuffer.isView`
function isArrayBufferView (obj) {
return (typeof ArrayBuffer.isView === 'function') && ArrayBuffer.isView(obj)
}
function numberIsNaN (obj) {
return obj !== obj // eslint-disable-line no-self-compare
}
},{"base64-js":33,"ieee754":117}],66:[function(require,module,exports){
var Buffer = require('safe-buffer').Buffer
var Transform = require('stream').Transform
var StringDecoder = require('string_decoder').StringDecoder
var inherits = require('inherits')
function CipherBase (hashMode) {
Transform.call(this)
this.hashMode = typeof hashMode === 'string'
if (this.hashMode) {
this[hashMode] = this._finalOrDigest
} else {
this.final = this._finalOrDigest
}
if (this._final) {
this.__final = this._final
this._final = null
}
this._decoder = null
this._encoding = null
}
inherits(CipherBase, Transform)
CipherBase.prototype.update = function (data, inputEnc, outputEnc) {
if (typeof data === 'string') {
data = Buffer.from(data, inputEnc)
}
var outData = this._update(data)
if (this.hashMode) return this
if (outputEnc) {
outData = this._toString(outData, outputEnc)
}
return outData
}
CipherBase.prototype.setAutoPadding = function () {}
CipherBase.prototype.getAuthTag = function () {
throw new Error('trying to get auth tag in unsupported state')
}
CipherBase.prototype.setAuthTag = function () {
throw new Error('trying to set auth tag in unsupported state')
}
CipherBase.prototype.setAAD = function () {
throw new Error('trying to set aad in unsupported state')
}
CipherBase.prototype._transform = function (data, _, next) {
var err
try {
if (this.hashMode) {
this._update(data)
} else {
this.push(this._update(data))
}
} catch (e) {
err = e
} finally {
next(err)
}
}
CipherBase.prototype._flush = function (done) {
var err
try {
this.push(this.__final())
} catch (e) {
err = e
}
done(err)
}
CipherBase.prototype._finalOrDigest = function (outputEnc) {
var outData = this.__final() || Buffer.alloc(0)
if (outputEnc) {
outData = this._toString(outData, outputEnc, true)
}
return outData
}
CipherBase.prototype._toString = function (value, enc, fin) {
if (!this._decoder) {
this._decoder = new StringDecoder(enc)
this._encoding = enc
}
if (this._encoding !== enc) throw new Error('can\'t switch encodings')
var out = this._decoder.write(value)
if (fin) {
out += this._decoder.end()
}
return out
}
module.exports = CipherBase
},{"inherits":119,"safe-buffer":160,"stream":169,"string_decoder":170}],67:[function(require,module,exports){
(function (Buffer){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(arg) {
if (Array.isArray) {
return Array.isArray(arg);
}
return objectToString(arg) === '[object Array]';
}
exports.isArray = isArray;
function isBoolean(arg) {
return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;
function isNull(arg) {
return arg === null;
}
exports.isNull = isNull;
function isNullOrUndefined(arg) {
return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;
function isNumber(arg) {
return typeof arg === 'number';
}
exports.isNumber = isNumber;
function isString(arg) {
return typeof arg === 'string';
}
exports.isString = isString;
function isSymbol(arg) {
return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;
function isUndefined(arg) {
return arg === void 0;
}
exports.isUndefined = isUndefined;
function isRegExp(re) {
return objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
exports.isObject = isObject;
function isDate(d) {
return objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
function isError(e) {
return (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
function isFunction(arg) {
return typeof arg === 'function';
}
exports.isFunction = isFunction;
function isPrimitive(arg) {
return arg === null ||
typeof arg === 'boolean' ||
typeof arg === 'number' ||
typeof arg === 'string' ||
typeof arg === 'symbol' || // ES6 symbol
typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;
exports.isBuffer = Buffer.isBuffer;
function objectToString(o) {
return Object.prototype.toString.call(o);
}
}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
},{"../../is-buffer/index.js":120}],68:[function(require,module,exports){
(function (Buffer){
var elliptic = require('elliptic');
var BN = require('bn.js');
module.exports = function createECDH(curve) {
return new ECDH(curve);
};
var aliases = {
secp256k1: {
name: 'secp256k1',
byteLength: 32
},
secp224r1: {
name: 'p224',
byteLength: 28
},
prime256v1: {
name: 'p256',
byteLength: 32
},
prime192v1: {
name: 'p192',
byteLength: 24
},
ed25519: {
name: 'ed25519',
byteLength: 32
},
secp384r1: {
name: 'p384',
byteLength: 48
},
secp521r1: {
name: 'p521',
byteLength: 66
}
};
aliases.p224 = aliases.secp224r1;
aliases.p256 = aliases.secp256r1 = aliases.prime256v1;
aliases.p192 = aliases.secp192r1 = aliases.prime192v1;
aliases.p384 = aliases.secp384r1;
aliases.p521 = aliases.secp521r1;
function ECDH(curve) {
this.curveType = aliases[curve];
if (!this.curveType ) {
this.curveType = {
name: curve
};
}
this.curve = new elliptic.ec(this.curveType.name);
this.keys = void 0;
}
ECDH.prototype.generateKeys = function (enc, format) {
this.keys = this.curve.genKeyPair();
return this.getPublicKey(enc, format);
};
ECDH.prototype.computeSecret = function (other, inenc, enc) {
inenc = inenc || 'utf8';
if (!Buffer.isBuffer(other)) {
other = new Buffer(other, inenc);
}
var otherPub = this.curve.keyFromPublic(other).getPublic();
var out = otherPub.mul(this.keys.getPrivate()).getX();
return formatReturnValue(out, enc, this.curveType.byteLength);
};
ECDH.prototype.getPublicKey = function (enc, format) {
var key = this.keys.getPublic(format === 'compressed', true);
if (format === 'hybrid') {
if (key[key.length - 1] % 2) {
key[0] = 7;
} else {
key [0] = 6;
}
}
return formatReturnValue(key, enc);
};
ECDH.prototype.getPrivateKey = function (enc) {
return formatReturnValue(this.keys.getPrivate(), enc);
};
ECDH.prototype.setPublicKey = function (pub, enc) {
enc = enc || 'utf8';
if (!Buffer.isBuffer(pub)) {
pub = new Buffer(pub, enc);
}
this.keys._importPublic(pub);
return this;
};
ECDH.prototype.setPrivateKey = function (priv, enc) {
enc = enc || 'utf8';
if (!Buffer.isBuffer(priv)) {
priv = new Buffer(priv, enc);
}
var _priv = new BN(priv);
_priv = _priv.toString(16);
this.keys._importPrivate(_priv);
return this;
};
function formatReturnValue(bn, enc, len) {
if (!Array.isArray(bn)) {
bn = bn.toArray();
}
var buf = new Buffer(bn);
if (len && buf.length < len) {
var zeros = new Buffer(len - buf.length);
zeros.fill(0);
buf = Buffer.concat([zeros, buf]);
}
if (!enc) {
return buf;
} else {
return buf.toString(enc);
}
}
}).call(this,require("buffer").Buffer)
},{"bn.js":34,"buffer":65,"elliptic":85}],69:[function(require,module,exports){
(function (Buffer){
'use strict'
var inherits = require('inherits')
var md5 = require('./md5')
var RIPEMD160 = require('ripemd160')
var sha = require('sha.js')
var Base = require('cipher-base')
function HashNoConstructor (hash) {
Base.call(this, 'digest')
this._hash = hash
this.buffers = []
}
inherits(HashNoConstructor, Base)
HashNoConstructor.prototype._update = function (data) {
this.buffers.push(data)
}
HashNoConstructor.prototype._final = function () {
var buf = Buffer.concat(this.buffers)
var r = this._hash(buf)
this.buffers = null
return r
}
function Hash (hash) {
Base.call(this, 'digest')
this._hash = hash
}
inherits(Hash, Base)
Hash.prototype._update = function (data) {
this._hash.update(data)
}
Hash.prototype._final = function () {
return this._hash.digest()
}
module.exports = function createHash (alg) {
alg = alg.toLowerCase()
if (alg === 'md5') return new HashNoConstructor(md5)
if (alg === 'rmd160' || alg === 'ripemd160') return new Hash(new RIPEMD160())
return new Hash(sha(alg))
}
}).call(this,require("buffer").Buffer)
},{"./md5":71,"buffer":65,"cipher-base":66,"inherits":119,"ripemd160":159,"sha.js":162}],70:[function(require,module,exports){
(function (Buffer){
'use strict'
var intSize = 4
var zeroBuffer = new Buffer(intSize)
zeroBuffer.fill(0)
var charSize = 8
var hashSize = 16
function toArray (buf) {
if ((buf.length % intSize) !== 0) {
var len = buf.length + (intSize - (buf.length % intSize))
buf = Buffer.concat([buf, zeroBuffer], len)
}
var arr = new Array(buf.length >>> 2)
for (var i = 0, j = 0; i < buf.length; i += intSize, j++) {
arr[j] = buf.readInt32LE(i)
}
return arr
}
module.exports = function hash (buf, fn) {
var arr = fn(toArray(buf), buf.length * charSize)
buf = new Buffer(hashSize)
for (var i = 0; i < arr.length; i++) {
buf.writeInt32LE(arr[i], i << 2, true)
}
return buf
}
}).call(this,require("buffer").Buffer)
},{"buffer":65}],71:[function(require,module,exports){
'use strict'
/*
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
var makeHash = require('./make-hash')
/*
* Calculate the MD5 of an array of little-endian words, and a bit length
*/
function core_md5 (x, len) {
/* append padding */
x[len >> 5] |= 0x80 << ((len) % 32)
x[(((len + 64) >>> 9) << 4) + 14] = len
var a = 1732584193
var b = -271733879
var c = -1732584194
var d = 271733878
for (var i = 0; i < x.length; i += 16) {
var olda = a
var oldb = b
var oldc = c
var oldd = d
a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936)
d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586)
c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819)
b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330)
a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897)
d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426)
c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341)
b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983)
a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416)
d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417)
c = md5_ff(c, d, a, b, x[i + 10], 17, -42063)
b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162)
a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682)
d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101)
c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290)
b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329)
a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510)
d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632)
c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713)
b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302)
a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691)
d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083)
c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335)
b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848)
a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438)
d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690)
c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961)
b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501)
a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467)
d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784)
c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473)
b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734)
a = md5_hh(a, b, c, d, x[i + 5], 4, -378558)
d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463)
c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562)
b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556)
a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060)
d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353)
c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632)
b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640)
a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174)
d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222)
c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979)
b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189)
a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487)
d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835)
c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520)
b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651)
a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844)
d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415)
c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905)
b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055)
a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571)
d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606)
c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523)
b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799)
a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359)
d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744)
c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380)
b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649)
a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070)
d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379)
c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259)
b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551)
a = safe_add(a, olda)
b = safe_add(b, oldb)
c = safe_add(c, oldc)
d = safe_add(d, oldd)
}
return [a, b, c, d]
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5_cmn (q, a, b, x, s, t) {
return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)
}
function md5_ff (a, b, c, d, x, s, t) {
return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t)
}
function md5_gg (a, b, c, d, x, s, t) {
return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t)
}
function md5_hh (a, b, c, d, x, s, t) {
return md5_cmn(b ^ c ^ d, a, b, x, s, t)
}
function md5_ii (a, b, c, d, x, s, t) {
return md5_cmn(c ^ (b | (~d)), a, b, x, s, t)
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safe_add (x, y) {
var lsw = (x & 0xFFFF) + (y & 0xFFFF)
var msw = (x >> 16) + (y >> 16) + (lsw >> 16)
return (msw << 16) | (lsw & 0xFFFF)
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bit_rol (num, cnt) {
return (num << cnt) | (num >>> (32 - cnt))
}
module.exports = function md5 (buf) {
return makeHash(buf, core_md5)
}
},{"./make-hash":70}],72:[function(require,module,exports){
'use strict'
var inherits = require('inherits')
var Legacy = require('./legacy')
var Base = require('cipher-base')
var Buffer = require('safe-buffer').Buffer
var md5 = require('create-hash/md5')
var RIPEMD160 = require('ripemd160')
var sha = require('sha.js')
var ZEROS = Buffer.alloc(128)
function Hmac (alg, key) {
Base.call(this, 'digest')
if (typeof key === 'string') {
key = Buffer.from(key)
}
var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
this._alg = alg
this._key = key
if (key.length > blocksize) {
var hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
key = hash.update(key).digest()
} else if (key.length < blocksize) {
key = Buffer.concat([key, ZEROS], blocksize)
}
var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
var opad = this._opad = Buffer.allocUnsafe(blocksize)
for (var i = 0; i < blocksize; i++) {
ipad[i] = key[i] ^ 0x36
opad[i] = key[i] ^ 0x5C
}
this._hash = alg === 'rmd160' ? new RIPEMD160() : sha(alg)
this._hash.update(ipad)
}
inherits(Hmac, Base)
Hmac.prototype._update = function (data) {
this._hash.update(data)
}
Hmac.prototype._final = function () {
var h = this._hash.digest()
var hash = this._alg === 'rmd160' ? new RIPEMD160() : sha(this._alg)
return hash.update(this._opad).update(h).digest()
}
module.exports = function createHmac (alg, key) {
alg = alg.toLowerCase()
if (alg === 'rmd160' || alg === 'ripemd160') {
return new Hmac('rmd160', key)
}
if (alg === 'md5') {
return new Legacy(md5, key)
}
return new Hmac(alg, key)
}
},{"./legacy":73,"cipher-base":66,"create-hash/md5":71,"inherits":119,"ripemd160":159,"safe-buffer":160,"sha.js":162}],73:[function(require,module,exports){
'use strict'
var inherits = require('inherits')
var Buffer = require('safe-buffer').Buffer
var Base = require('cipher-base')
var ZEROS = Buffer.alloc(128)
var blocksize = 64
function Hmac (alg, key) {
Base.call(this, 'digest')
if (typeof key === 'string') {
key = Buffer.from(key)
}
this._alg = alg
this._key = key
if (key.length > blocksize) {
key = alg(key)
} else if (key.length < blocksize) {
key = Buffer.concat([key, ZEROS], blocksize)
}
var ipad = this._ipad = Buffer.allocUnsafe(blocksize)
var opad = this._opad = Buffer.allocUnsafe(blocksize)
for (var i = 0; i < blocksize; i++) {
ipad[i] = key[i] ^ 0x36
opad[i] = key[i] ^ 0x5C
}
this._hash = [ipad]
}
inherits(Hmac, Base)
Hmac.prototype._update = function (data) {
this._hash.push(data)
}
Hmac.prototype._final = function () {
var h = this._alg(Buffer.concat(this._hash))
return this._alg(Buffer.concat([this._opad, h]))
}
module.exports = Hmac
},{"cipher-base":66,"inherits":119,"safe-buffer":160}],74:[function(require,module,exports){
'use strict'
exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = require('randombytes')
exports.createHash = exports.Hash = require('create-hash')
exports.createHmac = exports.Hmac = require('create-hmac')
var algos = require('browserify-sign/algos')
var algoKeys = Object.keys(algos)
var hashes = ['sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'md5', 'rmd160'].concat(algoKeys)
exports.getHashes = function () {
return hashes
}
var p = require('pbkdf2')
exports.pbkdf2 = p.pbkdf2
exports.pbkdf2Sync = p.pbkdf2Sync
var aes = require('browserify-cipher')
exports.Cipher = aes.Cipher
exports.createCipher = aes.createCipher
exports.Cipheriv = aes.Cipheriv
exports.createCipheriv = aes.createCipheriv
exports.Decipher = aes.Decipher
exports.createDecipher = aes.createDecipher
exports.Decipheriv = aes.Decipheriv
exports.createDecipheriv = aes.createDecipheriv
exports.getCiphers = aes.getCiphers
exports.listCiphers = aes.listCiphers
var dh = require('diffie-hellman')
exports.DiffieHellmanGroup = dh.DiffieHellmanGroup
exports.createDiffieHellmanGroup = dh.createDiffieHellmanGroup
exports.getDiffieHellman = dh.getDiffieHellman
exports.createDiffieHellman = dh.createDiffieHellman
exports.DiffieHellman = dh.DiffieHellman
var sign = require('browserify-sign')
exports.createSign = sign.createSign
exports.Sign = sign.Sign
exports.createVerify = sign.createVerify
exports.Verify = sign.Verify
exports.createECDH = require('create-ecdh')
var publicEncrypt = require('public-encrypt')
exports.publicEncrypt = publicEncrypt.publicEncrypt
exports.privateEncrypt = publicEncrypt.privateEncrypt
exports.publicDecrypt = publicEncrypt.publicDecrypt
exports.privateDecrypt = publicEncrypt.privateDecrypt
// the least I can do is make error messages for the rest of the node.js/crypto api.
// ;[
// 'createCredentials'
// ].forEach(function (name) {
// exports[name] = function () {
// throw new Error([
// 'sorry, ' + name + ' is not implemented yet',
// 'we accept pull requests',
// 'https://github.com/crypto-browserify/crypto-browserify'
// ].join('\n'))
// }
// })
exports.createCredentials = function () {
throw new Error([
'sorry, createCredentials is not implemented yet',
'we accept pull requests',
'https://github.com/crypto-browserify/crypto-browserify'
].join('\n'))
}
exports.constants = {
'DH_CHECK_P_NOT_SAFE_PRIME': 2,
'DH_CHECK_P_NOT_PRIME': 1,
'DH_UNABLE_TO_CHECK_GENERATOR': 4,
'DH_NOT_SUITABLE_GENERATOR': 8,
'NPN_ENABLED': 1,
'ALPN_ENABLED': 1,
'RSA_PKCS1_PADDING': 1,
'RSA_SSLV23_PADDING': 2,
'RSA_NO_PADDING': 3,
'RSA_PKCS1_OAEP_PADDING': 4,
'RSA_X931_PADDING': 5,
'RSA_PKCS1_PSS_PADDING': 6,
'POINT_CONVERSION_COMPRESSED': 2,
'POINT_CONVERSION_UNCOMPRESSED': 4,
'POINT_CONVERSION_HYBRID': 6
}
},{"browserify-cipher":54,"browserify-sign":61,"browserify-sign/algos":58,"create-ecdh":68,"create-hash":69,"create-hmac":72,"diffie-hellman":81,"pbkdf2":132,"public-encrypt":139,"randombytes":145}],75:[function(require,module,exports){
'use strict';
exports.utils = require('./des/utils');
exports.Cipher = require('./des/cipher');
exports.DES = require('./des/des');
exports.CBC = require('./des/cbc');
exports.EDE = require('./des/ede');
},{"./des/cbc":76,"./des/cipher":77,"./des/des":78,"./des/ede":79,"./des/utils":80}],76:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
var inherits = require('inherits');
var proto = {};
function CBCState(iv) {
assert.equal(iv.length, 8, 'Invalid IV length');
this.iv = new Array(8);
for (var i = 0; i < this.iv.length; i++)
this.iv[i] = iv[i];
}
function instantiate(Base) {
function CBC(options) {
Base.call(this, options);
this._cbcInit();
}
inherits(CBC, Base);
var keys = Object.keys(proto);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
CBC.prototype[key] = proto[key];
}
CBC.create = function create(options) {
return new CBC(options);
};
return CBC;
}
exports.instantiate = instantiate;
proto._cbcInit = function _cbcInit() {
var state = new CBCState(this.options.iv);
this._cbcState = state;
};
proto._update = function _update(inp, inOff, out, outOff) {
var state = this._cbcState;
var superProto = this.constructor.super_.prototype;
var iv = state.iv;
if (this.type === 'encrypt') {
for (var i = 0; i < this.blockSize; i++)
iv[i] ^= inp[inOff + i];
superProto._update.call(this, iv, 0, out, outOff);
for (var i = 0; i < this.blockSize; i++)
iv[i] = out[outOff + i];
} else {
superProto._update.call(this, inp, inOff, out, outOff);
for (var i = 0; i < this.blockSize; i++)
out[outOff + i] ^= iv[i];
for (var i = 0; i < this.blockSize; i++)
iv[i] = inp[inOff + i];
}
};
},{"inherits":119,"minimalistic-assert":125}],77:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
function Cipher(options) {
this.options = options;
this.type = this.options.type;
this.blockSize = 8;
this._init();
this.buffer = new Array(this.blockSize);
this.bufferOff = 0;
}
module.exports = Cipher;
Cipher.prototype._init = function _init() {
// Might be overrided
};
Cipher.prototype.update = function update(data) {
if (data.length === 0)
return [];
if (this.type === 'decrypt')
return this._updateDecrypt(data);
else
return this._updateEncrypt(data);
};
Cipher.prototype._buffer = function _buffer(data, off) {
// Append data to buffer
var min = Math.min(this.buffer.length - this.bufferOff, data.length - off);
for (var i = 0; i < min; i++)
this.buffer[this.bufferOff + i] = data[off + i];
this.bufferOff += min;
// Shift next
return min;
};
Cipher.prototype._flushBuffer = function _flushBuffer(out, off) {
this._update(this.buffer, 0, out, off);
this.bufferOff = 0;
return this.blockSize;
};
Cipher.prototype._updateEncrypt = function _updateEncrypt(data) {
var inputOff = 0;
var outputOff = 0;
var count = ((this.bufferOff + data.length) / this.blockSize) | 0;
var out = new Array(count * this.blockSize);
if (this.bufferOff !== 0) {
inputOff += this._buffer(data, inputOff);
if (this.bufferOff === this.buffer.length)
outputOff += this._flushBuffer(out, outputOff);
}
// Write blocks
var max = data.length - ((data.length - inputOff) % this.blockSize);
for (; inputOff < max; inputOff += this.blockSize) {
this._update(data, inputOff, out, outputOff);
outputOff += this.blockSize;
}
// Queue rest
for (; inputOff < data.length; inputOff++, this.bufferOff++)
this.buffer[this.bufferOff] = data[inputOff];
return out;
};
Cipher.prototype._updateDecrypt = function _updateDecrypt(data) {
var inputOff = 0;
var outputOff = 0;
var count = Math.ceil((this.bufferOff + data.length) / this.blockSize) - 1;
var out = new Array(count * this.blockSize);
// TODO(indutny): optimize it, this is far from optimal
for (; count > 0; count--) {
inputOff += this._buffer(data, inputOff);
outputOff += this._flushBuffer(out, outputOff);
}
// Buffer rest of the input
inputOff += this._buffer(data, inputOff);
return out;
};
Cipher.prototype.final = function final(buffer) {
var first;
if (buffer)
first = this.update(buffer);
var last;
if (this.type === 'encrypt')
last = this._finalEncrypt();
else
last = this._finalDecrypt();
if (first)
return first.concat(last);
else
return last;
};
Cipher.prototype._pad = function _pad(buffer, off) {
if (off === 0)
return false;
while (off < buffer.length)
buffer[off++] = 0;
return true;
};
Cipher.prototype._finalEncrypt = function _finalEncrypt() {
if (!this._pad(this.buffer, this.bufferOff))
return [];
var out = new Array(this.blockSize);
this._update(this.buffer, 0, out, 0);
return out;
};
Cipher.prototype._unpad = function _unpad(buffer) {
return buffer;
};
Cipher.prototype._finalDecrypt = function _finalDecrypt() {
assert.equal(this.bufferOff, this.blockSize, 'Not enough data to decrypt');
var out = new Array(this.blockSize);
this._flushBuffer(out, 0);
return this._unpad(out);
};
},{"minimalistic-assert":125}],78:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
var inherits = require('inherits');
var des = require('../des');
var utils = des.utils;
var Cipher = des.Cipher;
function DESState() {
this.tmp = new Array(2);
this.keys = null;
}
function DES(options) {
Cipher.call(this, options);
var state = new DESState();
this._desState = state;
this.deriveKeys(state, options.key);
}
inherits(DES, Cipher);
module.exports = DES;
DES.create = function create(options) {
return new DES(options);
};
var shiftTable = [
1, 1, 2, 2, 2, 2, 2, 2,
1, 2, 2, 2, 2, 2, 2, 1
];
DES.prototype.deriveKeys = function deriveKeys(state, key) {
state.keys = new Array(16 * 2);
assert.equal(key.length, this.blockSize, 'Invalid key length');
var kL = utils.readUInt32BE(key, 0);
var kR = utils.readUInt32BE(key, 4);
utils.pc1(kL, kR, state.tmp, 0);
kL = state.tmp[0];
kR = state.tmp[1];
for (var i = 0; i < state.keys.length; i += 2) {
var shift = shiftTable[i >>> 1];
kL = utils.r28shl(kL, shift);
kR = utils.r28shl(kR, shift);
utils.pc2(kL, kR, state.keys, i);
}
};
DES.prototype._update = function _update(inp, inOff, out, outOff) {
var state = this._desState;
var l = utils.readUInt32BE(inp, inOff);
var r = utils.readUInt32BE(inp, inOff + 4);
// Initial Permutation
utils.ip(l, r, state.tmp, 0);
l = state.tmp[0];
r = state.tmp[1];
if (this.type === 'encrypt')
this._encrypt(state, l, r, state.tmp, 0);
else
this._decrypt(state, l, r, state.tmp, 0);
l = state.tmp[0];
r = state.tmp[1];
utils.writeUInt32BE(out, l, outOff);
utils.writeUInt32BE(out, r, outOff + 4);
};
DES.prototype._pad = function _pad(buffer, off) {
var value = buffer.length - off;
for (var i = off; i < buffer.length; i++)
buffer[i] = value;
return true;
};
DES.prototype._unpad = function _unpad(buffer) {
var pad = buffer[buffer.length - 1];
for (var i = buffer.length - pad; i < buffer.length; i++)
assert.equal(buffer[i], pad);
return buffer.slice(0, buffer.length - pad);
};
DES.prototype._encrypt = function _encrypt(state, lStart, rStart, out, off) {
var l = lStart;
var r = rStart;
// Apply f() x16 times
for (var i = 0; i < state.keys.length; i += 2) {
var keyL = state.keys[i];
var keyR = state.keys[i + 1];
// f(r, k)
utils.expand(r, state.tmp, 0);
keyL ^= state.tmp[0];
keyR ^= state.tmp[1];
var s = utils.substitute(keyL, keyR);
var f = utils.permute(s);
var t = r;
r = (l ^ f) >>> 0;
l = t;
}
// Reverse Initial Permutation
utils.rip(r, l, out, off);
};
DES.prototype._decrypt = function _decrypt(state, lStart, rStart, out, off) {
var l = rStart;
var r = lStart;
// Apply f() x16 times
for (var i = state.keys.length - 2; i >= 0; i -= 2) {
var keyL = state.keys[i];
var keyR = state.keys[i + 1];
// f(r, k)
utils.expand(l, state.tmp, 0);
keyL ^= state.tmp[0];
keyR ^= state.tmp[1];
var s = utils.substitute(keyL, keyR);
var f = utils.permute(s);
var t = l;
l = (r ^ f) >>> 0;
r = t;
}
// Reverse Initial Permutation
utils.rip(l, r, out, off);
};
},{"../des":75,"inherits":119,"minimalistic-assert":125}],79:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
var inherits = require('inherits');
var des = require('../des');
var Cipher = des.Cipher;
var DES = des.DES;
function EDEState(type, key) {
assert.equal(key.length, 24, 'Invalid key length');
var k1 = key.slice(0, 8);
var k2 = key.slice(8, 16);
var k3 = key.slice(16, 24);
if (type === 'encrypt') {
this.ciphers = [
DES.create({ type: 'encrypt', key: k1 }),
DES.create({ type: 'decrypt', key: k2 }),
DES.create({ type: 'encrypt', key: k3 })
];
} else {
this.ciphers = [
DES.create({ type: 'decrypt', key: k3 }),
DES.create({ type: 'encrypt', key: k2 }),
DES.create({ type: 'decrypt', key: k1 })
];
}
}
function EDE(options) {
Cipher.call(this, options);
var state = new EDEState(this.type, this.options.key);
this._edeState = state;
}
inherits(EDE, Cipher);
module.exports = EDE;
EDE.create = function create(options) {
return new EDE(options);
};
EDE.prototype._update = function _update(inp, inOff, out, outOff) {
var state = this._edeState;
state.ciphers[0]._update(inp, inOff, out, outOff);
state.ciphers[1]._update(out, outOff, out, outOff);
state.ciphers[2]._update(out, outOff, out, outOff);
};
EDE.prototype._pad = DES.prototype._pad;
EDE.prototype._unpad = DES.prototype._unpad;
},{"../des":75,"inherits":119,"minimalistic-assert":125}],80:[function(require,module,exports){
'use strict';
exports.readUInt32BE = function readUInt32BE(bytes, off) {
var res = (bytes[0 + off] << 24) |
(bytes[1 + off] << 16) |
(bytes[2 + off] << 8) |
bytes[3 + off];
return res >>> 0;
};
exports.writeUInt32BE = function writeUInt32BE(bytes, value, off) {
bytes[0 + off] = value >>> 24;
bytes[1 + off] = (value >>> 16) & 0xff;
bytes[2 + off] = (value >>> 8) & 0xff;
bytes[3 + off] = value & 0xff;
};
exports.ip = function ip(inL, inR, out, off) {
var outL = 0;
var outR = 0;
for (var i = 6; i >= 0; i -= 2) {
for (var j = 0; j <= 24; j += 8) {
outL <<= 1;
outL |= (inR >>> (j + i)) & 1;
}
for (var j = 0; j <= 24; j += 8) {
outL <<= 1;
outL |= (inL >>> (j + i)) & 1;
}
}
for (var i = 6; i >= 0; i -= 2) {
for (var j = 1; j <= 25; j += 8) {
outR <<= 1;
outR |= (inR >>> (j + i)) & 1;
}
for (var j = 1; j <= 25; j += 8) {
outR <<= 1;
outR |= (inL >>> (j + i)) & 1;
}
}
out[off + 0] = outL >>> 0;
out[off + 1] = outR >>> 0;
};
exports.rip = function rip(inL, inR, out, off) {
var outL = 0;
var outR = 0;
for (var i = 0; i < 4; i++) {
for (var j = 24; j >= 0; j -= 8) {
outL <<= 1;
outL |= (inR >>> (j + i)) & 1;
outL <<= 1;
outL |= (inL >>> (j + i)) & 1;
}
}
for (var i = 4; i < 8; i++) {
for (var j = 24; j >= 0; j -= 8) {
outR <<= 1;
outR |= (inR >>> (j + i)) & 1;
outR <<= 1;
outR |= (inL >>> (j + i)) & 1;
}
}
out[off + 0] = outL >>> 0;
out[off + 1] = outR >>> 0;
};
exports.pc1 = function pc1(inL, inR, out, off) {
var outL = 0;
var outR = 0;
// 7, 15, 23, 31, 39, 47, 55, 63
// 6, 14, 22, 30, 39, 47, 55, 63
// 5, 13, 21, 29, 39, 47, 55, 63
// 4, 12, 20, 28
for (var i = 7; i >= 5; i--) {
for (var j = 0; j <= 24; j += 8) {
outL <<= 1;
outL |= (inR >> (j + i)) & 1;
}
for (var j = 0; j <= 24; j += 8) {
outL <<= 1;
outL |= (inL >> (j + i)) & 1;
}
}
for (var j = 0; j <= 24; j += 8) {
outL <<= 1;
outL |= (inR >> (j + i)) & 1;
}
// 1, 9, 17, 25, 33, 41, 49, 57
// 2, 10, 18, 26, 34, 42, 50, 58
// 3, 11, 19, 27, 35, 43, 51, 59
// 36, 44, 52, 60
for (var i = 1; i <= 3; i++) {
for (var j = 0; j <= 24; j += 8) {
outR <<= 1;
outR |= (inR >> (j + i)) & 1;
}
for (var j = 0; j <= 24; j += 8) {
outR <<= 1;
outR |= (inL >> (j + i)) & 1;
}
}
for (var j = 0; j <= 24; j += 8) {
outR <<= 1;
outR |= (inL >> (j + i)) & 1;
}
out[off + 0] = outL >>> 0;
out[off + 1] = outR >>> 0;
};
exports.r28shl = function r28shl(num, shift) {
return ((num << shift) & 0xfffffff) | (num >>> (28 - shift));
};
var pc2table = [
// inL => outL
14, 11, 17, 4, 27, 23, 25, 0,
13, 22, 7, 18, 5, 9, 16, 24,
2, 20, 12, 21, 1, 8, 15, 26,
// inR => outR
15, 4, 25, 19, 9, 1, 26, 16,
5, 11, 23, 8, 12, 7, 17, 0,
22, 3, 10, 14, 6, 20, 27, 24
];
exports.pc2 = function pc2(inL, inR, out, off) {
var outL = 0;
var outR = 0;
var len = pc2table.length >>> 1;
for (var i = 0; i < len; i++) {
outL <<= 1;
outL |= (inL >>> pc2table[i]) & 0x1;
}
for (var i = len; i < pc2table.length; i++) {
outR <<= 1;
outR |= (inR >>> pc2table[i]) & 0x1;
}
out[off + 0] = outL >>> 0;
out[off + 1] = outR >>> 0;
};
exports.expand = function expand(r, out, off) {
var outL = 0;
var outR = 0;
outL = ((r & 1) << 5) | (r >>> 27);
for (var i = 23; i >= 15; i -= 4) {
outL <<= 6;
outL |= (r >>> i) & 0x3f;
}
for (var i = 11; i >= 3; i -= 4) {
outR |= (r >>> i) & 0x3f;
outR <<= 6;
}
outR |= ((r & 0x1f) << 1) | (r >>> 31);
out[off + 0] = outL >>> 0;
out[off + 1] = outR >>> 0;
};
var sTable = [
14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1,
3, 10, 10, 6, 6, 12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8,
4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7,
15, 5, 12, 11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13,
15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,
9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5,
0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15, 13, 4, 1, 2,
5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9,
10, 13, 0, 7, 9, 0, 14, 9, 6, 3, 3, 4, 15, 6, 5, 10,
1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1,
13, 1, 6, 10, 4, 13, 9, 0, 8, 6, 15, 9, 3, 8, 0, 7,
11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12,
7, 13, 13, 8, 14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3,
1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9,
10, 3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8,
15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4, 14,
2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1,
8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9, 14, 8, 9, 6,
4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13,
15, 6, 9, 15, 12, 0, 5, 9, 6, 10, 3, 4, 0, 5, 14, 3,
12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5,
0, 6, 13, 1, 3, 13, 4, 14, 14, 0, 7, 11, 5, 3, 11, 8,
9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10,
7, 11, 0, 14, 4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13,
4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10,
3, 14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6,
1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10, 14, 7,
10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12,
13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15, 3, 11, 7, 1, 4,
10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2,
7, 2, 11, 1, 4, 14, 1, 7, 9, 4, 12, 10, 14, 8, 2, 13,
0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11
];
exports.substitute = function substitute(inL, inR) {
var out = 0;
for (var i = 0; i < 4; i++) {
var b = (inL >>> (18 - i * 6)) & 0x3f;
var sb = sTable[i * 0x40 + b];
out <<= 4;
out |= sb;
}
for (var i = 0; i < 4; i++) {
var b = (inR >>> (18 - i * 6)) & 0x3f;
var sb = sTable[4 * 0x40 + i * 0x40 + b];
out <<= 4;
out |= sb;
}
return out >>> 0;
};
var permuteTable = [
16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22,
30, 24, 8, 18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7
];
exports.permute = function permute(num) {
var out = 0;
for (var i = 0; i < permuteTable.length; i++) {
out <<= 1;
out |= (num >>> permuteTable[i]) & 0x1;
}
return out >>> 0;
};
exports.padSplit = function padSplit(num, size, group) {
var str = num.toString(2);
while (str.length < size)
str = '0' + str;
var out = [];
for (var i = 0; i < size; i += group)
out.push(str.slice(i, i + group));
return out.join(' ');
};
},{}],81:[function(require,module,exports){
(function (Buffer){
var generatePrime = require('./lib/generatePrime')
var primes = require('./lib/primes.json')
var DH = require('./lib/dh')
function getDiffieHellman (mod) {
var prime = new Buffer(primes[mod].prime, 'hex')
var gen = new Buffer(primes[mod].gen, 'hex')
return new DH(prime, gen)
}
var ENCODINGS = {
'binary': true, 'hex': true, 'base64': true
}
function createDiffieHellman (prime, enc, generator, genc) {
if (Buffer.isBuffer(enc) || ENCODINGS[enc] === undefined) {
return createDiffieHellman(prime, 'binary', enc, generator)
}
enc = enc || 'binary'
genc = genc || 'binary'
generator = generator || new Buffer([2])
if (!Buffer.isBuffer(generator)) {
generator = new Buffer(generator, genc)
}
if (typeof prime === 'number') {
return new DH(generatePrime(prime, generator), generator, true)
}
if (!Buffer.isBuffer(prime)) {
prime = new Buffer(prime, enc)
}
return new DH(prime, generator, true)
}
exports.DiffieHellmanGroup = exports.createDiffieHellmanGroup = exports.getDiffieHellman = getDiffieHellman
exports.createDiffieHellman = exports.DiffieHellman = createDiffieHellman
}).call(this,require("buffer").Buffer)
},{"./lib/dh":82,"./lib/generatePrime":83,"./lib/primes.json":84,"buffer":65}],82:[function(require,module,exports){
(function (Buffer){
var BN = require('bn.js');
var MillerRabin = require('miller-rabin');
var millerRabin = new MillerRabin();
var TWENTYFOUR = new BN(24);
var ELEVEN = new BN(11);
var TEN = new BN(10);
var THREE = new BN(3);
var SEVEN = new BN(7);
var primes = require('./generatePrime');
var randomBytes = require('randombytes');
module.exports = DH;
function setPublicKey(pub, enc) {
enc = enc || 'utf8';
if (!Buffer.isBuffer(pub)) {
pub = new Buffer(pub, enc);
}
this._pub = new BN(pub);
return this;
}
function setPrivateKey(priv, enc) {
enc = enc || 'utf8';
if (!Buffer.isBuffer(priv)) {
priv = new Buffer(priv, enc);
}
this._priv = new BN(priv);
return this;
}
var primeCache = {};
function checkPrime(prime, generator) {
var gen = generator.toString('hex');
var hex = [gen, prime.toString(16)].join('_');
if (hex in primeCache) {
return primeCache[hex];
}
var error = 0;
if (prime.isEven() ||
!primes.simpleSieve ||
!primes.fermatTest(prime) ||
!millerRabin.test(prime)) {
//not a prime so +1
error += 1;
if (gen === '02' || gen === '05') {
// we'd be able to check the generator
// it would fail so +8
error += 8;
} else {
//we wouldn't be able to test the generator
// so +4
error += 4;
}
primeCache[hex] = error;
return error;
}
if (!millerRabin.test(prime.shrn(1))) {
//not a safe prime
error += 2;
}
var rem;
switch (gen) {
case '02':
if (prime.mod(TWENTYFOUR).cmp(ELEVEN)) {
// unsuidable generator
error += 8;
}
break;
case '05':
rem = prime.mod(TEN);
if (rem.cmp(THREE) && rem.cmp(SEVEN)) {
// prime mod 10 needs to equal 3 or 7
error += 8;
}
break;
default:
error += 4;
}
primeCache[hex] = error;
return error;
}
function DH(prime, generator, malleable) {
this.setGenerator(generator);
this.__prime = new BN(prime);
this._prime = BN.mont(this.__prime);
this._primeLen = prime.length;
this._pub = undefined;
this._priv = undefined;
this._primeCode = undefined;
if (malleable) {
this.setPublicKey = setPublicKey;
this.setPrivateKey = setPrivateKey;
} else {
this._primeCode = 8;
}
}
Object.defineProperty(DH.prototype, 'verifyError', {
enumerable: true,
get: function () {
if (typeof this._primeCode !== 'number') {
this._primeCode = checkPrime(this.__prime, this.__gen);
}
return this._primeCode;
}
});
DH.prototype.generateKeys = function () {
if (!this._priv) {
this._priv = new BN(randomBytes(this._primeLen));
}
this._pub = this._gen.toRed(this._prime).redPow(this._priv).fromRed();
return this.getPublicKey();
};
DH.prototype.computeSecret = function (other) {
other = new BN(other);
other = other.toRed(this._prime);
var secret = other.redPow(this._priv).fromRed();
var out = new Buffer(secret.toArray());
var prime = this.getPrime();
if (out.length < prime.length) {
var front = new Buffer(prime.length - out.length);
front.fill(0);
out = Buffer.concat([front, out]);
}
return out;
};
DH.prototype.getPublicKey = function getPublicKey(enc) {
return formatReturnValue(this._pub, enc);
};
DH.prototype.getPrivateKey = function getPrivateKey(enc) {
return formatReturnValue(this._priv, enc);
};
DH.prototype.getPrime = function (enc) {
return formatReturnValue(this.__prime, enc);
};
DH.prototype.getGenerator = function (enc) {
return formatReturnValue(this._gen, enc);
};
DH.prototype.setGenerator = function (gen, enc) {
enc = enc || 'utf8';
if (!Buffer.isBuffer(gen)) {
gen = new Buffer(gen, enc);
}
this.__gen = gen;
this._gen = new BN(gen);
return this;
};
function formatReturnValue(bn, enc) {
var buf = new Buffer(bn.toArray());
if (!enc) {
return buf;
} else {
return buf.toString(enc);
}
}
}).call(this,require("buffer").Buffer)
},{"./generatePrime":83,"bn.js":34,"buffer":65,"miller-rabin":124,"randombytes":145}],83:[function(require,module,exports){
var randomBytes = require('randombytes');
module.exports = findPrime;
findPrime.simpleSieve = simpleSieve;
findPrime.fermatTest = fermatTest;
var BN = require('bn.js');
var TWENTYFOUR = new BN(24);
var MillerRabin = require('miller-rabin');
var millerRabin = new MillerRabin();
var ONE = new BN(1);
var TWO = new BN(2);
var FIVE = new BN(5);
var SIXTEEN = new BN(16);
var EIGHT = new BN(8);
var TEN = new BN(10);
var THREE = new BN(3);
var SEVEN = new BN(7);
var ELEVEN = new BN(11);
var FOUR = new BN(4);
var TWELVE = new BN(12);
var primes = null;
function _getPrimes() {
if (primes !== null)
return primes;
var limit = 0x100000;
var res = [];
res[0] = 2;
for (var i = 1, k = 3; k < limit; k += 2) {
var sqrt = Math.ceil(Math.sqrt(k));
for (var j = 0; j < i && res[j] <= sqrt; j++)
if (k % res[j] === 0)
break;
if (i !== j && res[j] <= sqrt)
continue;
res[i++] = k;
}
primes = res;
return res;
}
function simpleSieve(p) {
var primes = _getPrimes();
for (var i = 0; i < primes.length; i++)
if (p.modn(primes[i]) === 0) {
if (p.cmpn(primes[i]) === 0) {
return true;
} else {
return false;
}
}
return true;
}
function fermatTest(p) {
var red = BN.mont(p);
return TWO.toRed(red).redPow(p.subn(1)).fromRed().cmpn(1) === 0;
}
function findPrime(bits, gen) {
if (bits < 16) {
// this is what openssl does
if (gen === 2 || gen === 5) {
return new BN([0x8c, 0x7b]);
} else {
return new BN([0x8c, 0x27]);
}
}
gen = new BN(gen);
var num, n2;
while (true) {
num = new BN(randomBytes(Math.ceil(bits / 8)));
while (num.bitLength() > bits) {
num.ishrn(1);
}
if (num.isEven()) {
num.iadd(ONE);
}
if (!num.testn(1)) {
num.iadd(TWO);
}
if (!gen.cmp(TWO)) {
while (num.mod(TWENTYFOUR).cmp(ELEVEN)) {
num.iadd(FOUR);
}
} else if (!gen.cmp(FIVE)) {
while (num.mod(TEN).cmp(THREE)) {
num.iadd(FOUR);
}
}
n2 = num.shrn(1);
if (simpleSieve(n2) && simpleSieve(num) &&
fermatTest(n2) && fermatTest(num) &&
millerRabin.test(n2) && millerRabin.test(num)) {
return num;
}
}
}
},{"bn.js":34,"miller-rabin":124,"randombytes":145}],84:[function(require,module,exports){
module.exports={
"modp1": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"
},
"modp2": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"
},
"modp5": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"
},
"modp14": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"
},
"modp15": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"
},
"modp16": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"
},
"modp17": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"
},
"modp18": {
"gen": "02",
"prime": "ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"
}
}
},{}],85:[function(require,module,exports){
'use strict';
var elliptic = exports;
elliptic.version = require('../package.json').version;
elliptic.utils = require('./elliptic/utils');
elliptic.rand = require('brorand');
elliptic.curve = require('./elliptic/curve');
elliptic.curves = require('./elliptic/curves');
// Protocols
elliptic.ec = require('./elliptic/ec');
elliptic.eddsa = require('./elliptic/eddsa');
},{"../package.json":100,"./elliptic/curve":88,"./elliptic/curves":91,"./elliptic/ec":92,"./elliptic/eddsa":95,"./elliptic/utils":99,"brorand":35}],86:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
var getNAF = utils.getNAF;
var getJSF = utils.getJSF;
var assert = utils.assert;
function BaseCurve(type, conf) {
this.type = type;
this.p = new BN(conf.p, 16);
// Use Montgomery, when there is no fast reduction for the prime
this.red = conf.prime ? BN.red(conf.prime) : BN.mont(this.p);
// Useful for many curves
this.zero = new BN(0).toRed(this.red);
this.one = new BN(1).toRed(this.red);
this.two = new BN(2).toRed(this.red);
// Curve configuration, optional
this.n = conf.n && new BN(conf.n, 16);
this.g = conf.g && this.pointFromJSON(conf.g, conf.gRed);
// Temporary arrays
this._wnafT1 = new Array(4);
this._wnafT2 = new Array(4);
this._wnafT3 = new Array(4);
this._wnafT4 = new Array(4);
// Generalized Greg Maxwell's trick
var adjustCount = this.n && this.p.div(this.n);
if (!adjustCount || adjustCount.cmpn(100) > 0) {
this.redN = null;
} else {
this._maxwellTrick = true;
this.redN = this.n.toRed(this.red);
}
}
module.exports = BaseCurve;
BaseCurve.prototype.point = function point() {
throw new Error('Not implemented');
};
BaseCurve.prototype.validate = function validate() {
throw new Error('Not implemented');
};
BaseCurve.prototype._fixedNafMul = function _fixedNafMul(p, k) {
assert(p.precomputed);
var doubles = p._getDoubles();
var naf = getNAF(k, 1);
var I = (1 << (doubles.step + 1)) - (doubles.step % 2 === 0 ? 2 : 1);
I /= 3;
// Translate into more windowed form
var repr = [];
for (var j = 0; j < naf.length; j += doubles.step) {
var nafW = 0;
for (var k = j + doubles.step - 1; k >= j; k--)
nafW = (nafW << 1) + naf[k];
repr.push(nafW);
}
var a = this.jpoint(null, null, null);
var b = this.jpoint(null, null, null);
for (var i = I; i > 0; i--) {
for (var j = 0; j < repr.length; j++) {
var nafW = repr[j];
if (nafW === i)
b = b.mixedAdd(doubles.points[j]);
else if (nafW === -i)
b = b.mixedAdd(doubles.points[j].neg());
}
a = a.add(b);
}
return a.toP();
};
BaseCurve.prototype._wnafMul = function _wnafMul(p, k) {
var w = 4;
// Precompute window
var nafPoints = p._getNAFPoints(w);
w = nafPoints.wnd;
var wnd = nafPoints.points;
// Get NAF form
var naf = getNAF(k, w);
// Add `this`*(N+1) for every w-NAF index
var acc = this.jpoint(null, null, null);
for (var i = naf.length - 1; i >= 0; i--) {
// Count zeroes
for (var k = 0; i >= 0 && naf[i] === 0; i--)
k++;
if (i >= 0)
k++;
acc = acc.dblp(k);
if (i < 0)
break;
var z = naf[i];
assert(z !== 0);
if (p.type === 'affine') {
// J +- P
if (z > 0)
acc = acc.mixedAdd(wnd[(z - 1) >> 1]);
else
acc = acc.mixedAdd(wnd[(-z - 1) >> 1].neg());
} else {
// J +- J
if (z > 0)
acc = acc.add(wnd[(z - 1) >> 1]);
else
acc = acc.add(wnd[(-z - 1) >> 1].neg());
}
}
return p.type === 'affine' ? acc.toP() : acc;
};
BaseCurve.prototype._wnafMulAdd = function _wnafMulAdd(defW,
points,
coeffs,
len,
jacobianResult) {
var wndWidth = this._wnafT1;
var wnd = this._wnafT2;
var naf = this._wnafT3;
// Fill all arrays
var max = 0;
for (var i = 0; i < len; i++) {
var p = points[i];
var nafPoints = p._getNAFPoints(defW);
wndWidth[i] = nafPoints.wnd;
wnd[i] = nafPoints.points;
}
// Comb small window NAFs
for (var i = len - 1; i >= 1; i -= 2) {
var a = i - 1;
var b = i;
if (wndWidth[a] !== 1 || wndWidth[b] !== 1) {
naf[a] = getNAF(coeffs[a], wndWidth[a]);
naf[b] = getNAF(coeffs[b], wndWidth[b]);
max = Math.max(naf[a].length, max);
max = Math.max(naf[b].length, max);
continue;
}
var comb = [
points[a], /* 1 */
null, /* 3 */
null, /* 5 */
points[b] /* 7 */
];
// Try to avoid Projective points, if possible
if (points[a].y.cmp(points[b].y) === 0) {
comb[1] = points[a].add(points[b]);
comb[2] = points[a].toJ().mixedAdd(points[b].neg());
} else if (points[a].y.cmp(points[b].y.redNeg()) === 0) {
comb[1] = points[a].toJ().mixedAdd(points[b]);
comb[2] = points[a].add(points[b].neg());
} else {
comb[1] = points[a].toJ().mixedAdd(points[b]);
comb[2] = points[a].toJ().mixedAdd(points[b].neg());
}
var index = [
-3, /* -1 -1 */
-1, /* -1 0 */
-5, /* -1 1 */
-7, /* 0 -1 */
0, /* 0 0 */
7, /* 0 1 */
5, /* 1 -1 */
1, /* 1 0 */
3 /* 1 1 */
];
var jsf = getJSF(coeffs[a], coeffs[b]);
max = Math.max(jsf[0].length, max);
naf[a] = new Array(max);
naf[b] = new Array(max);
for (var j = 0; j < max; j++) {
var ja = jsf[0][j] | 0;
var jb = jsf[1][j] | 0;
naf[a][j] = index[(ja + 1) * 3 + (jb + 1)];
naf[b][j] = 0;
wnd[a] = comb;
}
}
var acc = this.jpoint(null, null, null);
var tmp = this._wnafT4;
for (var i = max; i >= 0; i--) {
var k = 0;
while (i >= 0) {
var zero = true;
for (var j = 0; j < len; j++) {
tmp[j] = naf[j][i] | 0;
if (tmp[j] !== 0)
zero = false;
}
if (!zero)
break;
k++;
i--;
}
if (i >= 0)
k++;
acc = acc.dblp(k);
if (i < 0)
break;
for (var j = 0; j < len; j++) {
var z = tmp[j];
var p;
if (z === 0)
continue;
else if (z > 0)
p = wnd[j][(z - 1) >> 1];
else if (z < 0)
p = wnd[j][(-z - 1) >> 1].neg();
if (p.type === 'affine')
acc = acc.mixedAdd(p);
else
acc = acc.add(p);
}
}
// Zeroify references
for (var i = 0; i < len; i++)
wnd[i] = null;
if (jacobianResult)
return acc;
else
return acc.toP();
};
function BasePoint(curve, type) {
this.curve = curve;
this.type = type;
this.precomputed = null;
}
BaseCurve.BasePoint = BasePoint;
BasePoint.prototype.eq = function eq(/*other*/) {
throw new Error('Not implemented');
};
BasePoint.prototype.validate = function validate() {
return this.curve.validate(this);
};
BaseCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
bytes = utils.toArray(bytes, enc);
var len = this.p.byteLength();
// uncompressed, hybrid-odd, hybrid-even
if ((bytes[0] === 0x04 || bytes[0] === 0x06 || bytes[0] === 0x07) &&
bytes.length - 1 === 2 * len) {
if (bytes[0] === 0x06)
assert(bytes[bytes.length - 1] % 2 === 0);
else if (bytes[0] === 0x07)
assert(bytes[bytes.length - 1] % 2 === 1);
var res = this.point(bytes.slice(1, 1 + len),
bytes.slice(1 + len, 1 + 2 * len));
return res;
} else if ((bytes[0] === 0x02 || bytes[0] === 0x03) &&
bytes.length - 1 === len) {
return this.pointFromX(bytes.slice(1, 1 + len), bytes[0] === 0x03);
}
throw new Error('Unknown point format');
};
BasePoint.prototype.encodeCompressed = function encodeCompressed(enc) {
return this.encode(enc, true);
};
BasePoint.prototype._encode = function _encode(compact) {
var len = this.curve.p.byteLength();
var x = this.getX().toArray('be', len);
if (compact)
return [ this.getY().isEven() ? 0x02 : 0x03 ].concat(x);
return [ 0x04 ].concat(x, this.getY().toArray('be', len)) ;
};
BasePoint.prototype.encode = function encode(enc, compact) {
return utils.encode(this._encode(compact), enc);
};
BasePoint.prototype.precompute = function precompute(power) {
if (this.precomputed)
return this;
var precomputed = {
doubles: null,
naf: null,
beta: null
};
precomputed.naf = this._getNAFPoints(8);
precomputed.doubles = this._getDoubles(4, power);
precomputed.beta = this._getBeta();
this.precomputed = precomputed;
return this;
};
BasePoint.prototype._hasDoubles = function _hasDoubles(k) {
if (!this.precomputed)
return false;
var doubles = this.precomputed.doubles;
if (!doubles)
return false;
return doubles.points.length >= Math.ceil((k.bitLength() + 1) / doubles.step);
};
BasePoint.prototype._getDoubles = function _getDoubles(step, power) {
if (this.precomputed && this.precomputed.doubles)
return this.precomputed.doubles;
var doubles = [ this ];
var acc = this;
for (var i = 0; i < power; i += step) {
for (var j = 0; j < step; j++)
acc = acc.dbl();
doubles.push(acc);
}
return {
step: step,
points: doubles
};
};
BasePoint.prototype._getNAFPoints = function _getNAFPoints(wnd) {
if (this.precomputed && this.precomputed.naf)
return this.precomputed.naf;
var res = [ this ];
var max = (1 << wnd) - 1;
var dbl = max === 1 ? null : this.dbl();
for (var i = 1; i < max; i++)
res[i] = res[i - 1].add(dbl);
return {
wnd: wnd,
points: res
};
};
BasePoint.prototype._getBeta = function _getBeta() {
return null;
};
BasePoint.prototype.dblp = function dblp(k) {
var r = this;
for (var i = 0; i < k; i++)
r = r.dbl();
return r;
};
},{"../../elliptic":85,"bn.js":34}],87:[function(require,module,exports){
'use strict';
var curve = require('../curve');
var elliptic = require('../../elliptic');
var BN = require('bn.js');
var inherits = require('inherits');
var Base = curve.base;
var assert = elliptic.utils.assert;
function EdwardsCurve(conf) {
// NOTE: Important as we are creating point in Base.call()
this.twisted = (conf.a | 0) !== 1;
this.mOneA = this.twisted && (conf.a | 0) === -1;
this.extended = this.mOneA;
Base.call(this, 'edwards', conf);
this.a = new BN(conf.a, 16).umod(this.red.m);
this.a = this.a.toRed(this.red);
this.c = new BN(conf.c, 16).toRed(this.red);
this.c2 = this.c.redSqr();
this.d = new BN(conf.d, 16).toRed(this.red);
this.dd = this.d.redAdd(this.d);
assert(!this.twisted || this.c.fromRed().cmpn(1) === 0);
this.oneC = (conf.c | 0) === 1;
}
inherits(EdwardsCurve, Base);
module.exports = EdwardsCurve;
EdwardsCurve.prototype._mulA = function _mulA(num) {
if (this.mOneA)
return num.redNeg();
else
return this.a.redMul(num);
};
EdwardsCurve.prototype._mulC = function _mulC(num) {
if (this.oneC)
return num;
else
return this.c.redMul(num);
};
// Just for compatibility with Short curve
EdwardsCurve.prototype.jpoint = function jpoint(x, y, z, t) {
return this.point(x, y, z, t);
};
EdwardsCurve.prototype.pointFromX = function pointFromX(x, odd) {
x = new BN(x, 16);
if (!x.red)
x = x.toRed(this.red);
var x2 = x.redSqr();
var rhs = this.c2.redSub(this.a.redMul(x2));
var lhs = this.one.redSub(this.c2.redMul(this.d).redMul(x2));
var y2 = rhs.redMul(lhs.redInvm());
var y = y2.redSqrt();
if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
throw new Error('invalid point');
var isOdd = y.fromRed().isOdd();
if (odd && !isOdd || !odd && isOdd)
y = y.redNeg();
return this.point(x, y);
};
EdwardsCurve.prototype.pointFromY = function pointFromY(y, odd) {
y = new BN(y, 16);
if (!y.red)
y = y.toRed(this.red);
// x^2 = (y^2 - 1) / (d y^2 + 1)
var y2 = y.redSqr();
var lhs = y2.redSub(this.one);
var rhs = y2.redMul(this.d).redAdd(this.one);
var x2 = lhs.redMul(rhs.redInvm());
if (x2.cmp(this.zero) === 0) {
if (odd)
throw new Error('invalid point');
else
return this.point(this.zero, y);
}
var x = x2.redSqrt();
if (x.redSqr().redSub(x2).cmp(this.zero) !== 0)
throw new Error('invalid point');
if (x.isOdd() !== odd)
x = x.redNeg();
return this.point(x, y);
};
EdwardsCurve.prototype.validate = function validate(point) {
if (point.isInfinity())
return true;
// Curve: A * X^2 + Y^2 = C^2 * (1 + D * X^2 * Y^2)
point.normalize();
var x2 = point.x.redSqr();
var y2 = point.y.redSqr();
var lhs = x2.redMul(this.a).redAdd(y2);
var rhs = this.c2.redMul(this.one.redAdd(this.d.redMul(x2).redMul(y2)));
return lhs.cmp(rhs) === 0;
};
function Point(curve, x, y, z, t) {
Base.BasePoint.call(this, curve, 'projective');
if (x === null && y === null && z === null) {
this.x = this.curve.zero;
this.y = this.curve.one;
this.z = this.curve.one;
this.t = this.curve.zero;
this.zOne = true;
} else {
this.x = new BN(x, 16);
this.y = new BN(y, 16);
this.z = z ? new BN(z, 16) : this.curve.one;
this.t = t && new BN(t, 16);
if (!this.x.red)
this.x = this.x.toRed(this.curve.red);
if (!this.y.red)
this.y = this.y.toRed(this.curve.red);
if (!this.z.red)
this.z = this.z.toRed(this.curve.red);
if (this.t && !this.t.red)
this.t = this.t.toRed(this.curve.red);
this.zOne = this.z === this.curve.one;
// Use extended coordinates
if (this.curve.extended && !this.t) {
this.t = this.x.redMul(this.y);
if (!this.zOne)
this.t = this.t.redMul(this.z.redInvm());
}
}
}
inherits(Point, Base.BasePoint);
EdwardsCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
return Point.fromJSON(this, obj);
};
EdwardsCurve.prototype.point = function point(x, y, z, t) {
return new Point(this, x, y, z, t);
};
Point.fromJSON = function fromJSON(curve, obj) {
return new Point(curve, obj[0], obj[1], obj[2]);
};
Point.prototype.inspect = function inspect() {
if (this.isInfinity())
return '<EC Point Infinity>';
return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
' y: ' + this.y.fromRed().toString(16, 2) +
' z: ' + this.z.fromRed().toString(16, 2) + '>';
};
Point.prototype.isInfinity = function isInfinity() {
// XXX This code assumes that zero is always zero in red
return this.x.cmpn(0) === 0 &&
this.y.cmp(this.z) === 0;
};
Point.prototype._extDbl = function _extDbl() {
// hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
// #doubling-dbl-2008-hwcd
// 4M + 4S
// A = X1^2
var a = this.x.redSqr();
// B = Y1^2
var b = this.y.redSqr();
// C = 2 * Z1^2
var c = this.z.redSqr();
c = c.redIAdd(c);
// D = a * A
var d = this.curve._mulA(a);
// E = (X1 + Y1)^2 - A - B
var e = this.x.redAdd(this.y).redSqr().redISub(a).redISub(b);
// G = D + B
var g = d.redAdd(b);
// F = G - C
var f = g.redSub(c);
// H = D - B
var h = d.redSub(b);
// X3 = E * F
var nx = e.redMul(f);
// Y3 = G * H
var ny = g.redMul(h);
// T3 = E * H
var nt = e.redMul(h);
// Z3 = F * G
var nz = f.redMul(g);
return this.curve.point(nx, ny, nz, nt);
};
Point.prototype._projDbl = function _projDbl() {
// hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
// #doubling-dbl-2008-bbjlp
// #doubling-dbl-2007-bl
// and others
// Generally 3M + 4S or 2M + 4S
// B = (X1 + Y1)^2
var b = this.x.redAdd(this.y).redSqr();
// C = X1^2
var c = this.x.redSqr();
// D = Y1^2
var d = this.y.redSqr();
var nx;
var ny;
var nz;
if (this.curve.twisted) {
// E = a * C
var e = this.curve._mulA(c);
// F = E + D
var f = e.redAdd(d);
if (this.zOne) {
// X3 = (B - C - D) * (F - 2)
nx = b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two));
// Y3 = F * (E - D)
ny = f.redMul(e.redSub(d));
// Z3 = F^2 - 2 * F
nz = f.redSqr().redSub(f).redSub(f);
} else {
// H = Z1^2
var h = this.z.redSqr();
// J = F - 2 * H
var j = f.redSub(h).redISub(h);
// X3 = (B-C-D)*J
nx = b.redSub(c).redISub(d).redMul(j);
// Y3 = F * (E - D)
ny = f.redMul(e.redSub(d));
// Z3 = F * J
nz = f.redMul(j);
}
} else {
// E = C + D
var e = c.redAdd(d);
// H = (c * Z1)^2
var h = this.curve._mulC(this.c.redMul(this.z)).redSqr();
// J = E - 2 * H
var j = e.redSub(h).redSub(h);
// X3 = c * (B - E) * J
nx = this.curve._mulC(b.redISub(e)).redMul(j);
// Y3 = c * E * (C - D)
ny = this.curve._mulC(e).redMul(c.redISub(d));
// Z3 = E * J
nz = e.redMul(j);
}
return this.curve.point(nx, ny, nz);
};
Point.prototype.dbl = function dbl() {
if (this.isInfinity())
return this;
// Double in extended coordinates
if (this.curve.extended)
return this._extDbl();
else
return this._projDbl();
};
Point.prototype._extAdd = function _extAdd(p) {
// hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html
// #addition-add-2008-hwcd-3
// 8M
// A = (Y1 - X1) * (Y2 - X2)
var a = this.y.redSub(this.x).redMul(p.y.redSub(p.x));
// B = (Y1 + X1) * (Y2 + X2)
var b = this.y.redAdd(this.x).redMul(p.y.redAdd(p.x));
// C = T1 * k * T2
var c = this.t.redMul(this.curve.dd).redMul(p.t);
// D = Z1 * 2 * Z2
var d = this.z.redMul(p.z.redAdd(p.z));
// E = B - A
var e = b.redSub(a);
// F = D - C
var f = d.redSub(c);
// G = D + C
var g = d.redAdd(c);
// H = B + A
var h = b.redAdd(a);
// X3 = E * F
var nx = e.redMul(f);
// Y3 = G * H
var ny = g.redMul(h);
// T3 = E * H
var nt = e.redMul(h);
// Z3 = F * G
var nz = f.redMul(g);
return this.curve.point(nx, ny, nz, nt);
};
Point.prototype._projAdd = function _projAdd(p) {
// hyperelliptic.org/EFD/g1p/auto-twisted-projective.html
// #addition-add-2008-bbjlp
// #addition-add-2007-bl
// 10M + 1S
// A = Z1 * Z2
var a = this.z.redMul(p.z);
// B = A^2
var b = a.redSqr();
// C = X1 * X2
var c = this.x.redMul(p.x);
// D = Y1 * Y2
var d = this.y.redMul(p.y);
// E = d * C * D
var e = this.curve.d.redMul(c).redMul(d);
// F = B - E
var f = b.redSub(e);
// G = B + E
var g = b.redAdd(e);
// X3 = A * F * ((X1 + Y1) * (X2 + Y2) - C - D)
var tmp = this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d);
var nx = a.redMul(f).redMul(tmp);
var ny;
var nz;
if (this.curve.twisted) {
// Y3 = A * G * (D - a * C)
ny = a.redMul(g).redMul(d.redSub(this.curve._mulA(c)));
// Z3 = F * G
nz = f.redMul(g);
} else {
// Y3 = A * G * (D - C)
ny = a.redMul(g).redMul(d.redSub(c));
// Z3 = c * F * G
nz = this.curve._mulC(f).redMul(g);
}
return this.curve.point(nx, ny, nz);
};
Point.prototype.add = function add(p) {
if (this.isInfinity())
return p;
if (p.isInfinity())
return this;
if (this.curve.extended)
return this._extAdd(p);
else
return this._projAdd(p);
};
Point.prototype.mul = function mul(k) {
if (this._hasDoubles(k))
return this.curve._fixedNafMul(this, k);
else
return this.curve._wnafMul(this, k);
};
Point.prototype.mulAdd = function mulAdd(k1, p, k2) {
return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, false);
};
Point.prototype.jmulAdd = function jmulAdd(k1, p, k2) {
return this.curve._wnafMulAdd(1, [ this, p ], [ k1, k2 ], 2, true);
};
Point.prototype.normalize = function normalize() {
if (this.zOne)
return this;
// Normalize coordinates
var zi = this.z.redInvm();
this.x = this.x.redMul(zi);
this.y = this.y.redMul(zi);
if (this.t)
this.t = this.t.redMul(zi);
this.z = this.curve.one;
this.zOne = true;
return this;
};
Point.prototype.neg = function neg() {
return this.curve.point(this.x.redNeg(),
this.y,
this.z,
this.t && this.t.redNeg());
};
Point.prototype.getX = function getX() {
this.normalize();
return this.x.fromRed();
};
Point.prototype.getY = function getY() {
this.normalize();
return this.y.fromRed();
};
Point.prototype.eq = function eq(other) {
return this === other ||
this.getX().cmp(other.getX()) === 0 &&
this.getY().cmp(other.getY()) === 0;
};
Point.prototype.eqXToP = function eqXToP(x) {
var rx = x.toRed(this.curve.red).redMul(this.z);
if (this.x.cmp(rx) === 0)
return true;
var xc = x.clone();
var t = this.curve.redN.redMul(this.z);
for (;;) {
xc.iadd(this.curve.n);
if (xc.cmp(this.curve.p) >= 0)
return false;
rx.redIAdd(t);
if (this.x.cmp(rx) === 0)
return true;
}
return false;
};
// Compatibility with BaseCurve
Point.prototype.toP = Point.prototype.normalize;
Point.prototype.mixedAdd = Point.prototype.add;
},{"../../elliptic":85,"../curve":88,"bn.js":34,"inherits":119}],88:[function(require,module,exports){
'use strict';
var curve = exports;
curve.base = require('./base');
curve.short = require('./short');
curve.mont = require('./mont');
curve.edwards = require('./edwards');
},{"./base":86,"./edwards":87,"./mont":89,"./short":90}],89:[function(require,module,exports){
'use strict';
var curve = require('../curve');
var BN = require('bn.js');
var inherits = require('inherits');
var Base = curve.base;
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
function MontCurve(conf) {
Base.call(this, 'mont', conf);
this.a = new BN(conf.a, 16).toRed(this.red);
this.b = new BN(conf.b, 16).toRed(this.red);
this.i4 = new BN(4).toRed(this.red).redInvm();
this.two = new BN(2).toRed(this.red);
this.a24 = this.i4.redMul(this.a.redAdd(this.two));
}
inherits(MontCurve, Base);
module.exports = MontCurve;
MontCurve.prototype.validate = function validate(point) {
var x = point.normalize().x;
var x2 = x.redSqr();
var rhs = x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);
var y = rhs.redSqrt();
return y.redSqr().cmp(rhs) === 0;
};
function Point(curve, x, z) {
Base.BasePoint.call(this, curve, 'projective');
if (x === null && z === null) {
this.x = this.curve.one;
this.z = this.curve.zero;
} else {
this.x = new BN(x, 16);
this.z = new BN(z, 16);
if (!this.x.red)
this.x = this.x.toRed(this.curve.red);
if (!this.z.red)
this.z = this.z.toRed(this.curve.red);
}
}
inherits(Point, Base.BasePoint);
MontCurve.prototype.decodePoint = function decodePoint(bytes, enc) {
return this.point(utils.toArray(bytes, enc), 1);
};
MontCurve.prototype.point = function point(x, z) {
return new Point(this, x, z);
};
MontCurve.prototype.pointFromJSON = function pointFromJSON(obj) {
return Point.fromJSON(this, obj);
};
Point.prototype.precompute = function precompute() {
// No-op
};
Point.prototype._encode = function _encode() {
return this.getX().toArray('be', this.curve.p.byteLength());
};
Point.fromJSON = function fromJSON(curve, obj) {
return new Point(curve, obj[0], obj[1] || curve.one);
};
Point.prototype.inspect = function inspect() {
if (this.isInfinity())
return '<EC Point Infinity>';
return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
' z: ' + this.z.fromRed().toString(16, 2) + '>';
};
Point.prototype.isInfinity = function isInfinity() {
// XXX This code assumes that zero is always zero in red
return this.z.cmpn(0) === 0;
};
Point.prototype.dbl = function dbl() {
// http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#doubling-dbl-1987-m-3
// 2M + 2S + 4A
// A = X1 + Z1
var a = this.x.redAdd(this.z);
// AA = A^2
var aa = a.redSqr();
// B = X1 - Z1
var b = this.x.redSub(this.z);
// BB = B^2
var bb = b.redSqr();
// C = AA - BB
var c = aa.redSub(bb);
// X3 = AA * BB
var nx = aa.redMul(bb);
// Z3 = C * (BB + A24 * C)
var nz = c.redMul(bb.redAdd(this.curve.a24.redMul(c)));
return this.curve.point(nx, nz);
};
Point.prototype.add = function add() {
throw new Error('Not supported on Montgomery curve');
};
Point.prototype.diffAdd = function diffAdd(p, diff) {
// http://hyperelliptic.org/EFD/g1p/auto-montgom-xz.html#diffadd-dadd-1987-m-3
// 4M + 2S + 6A
// A = X2 + Z2
var a = this.x.redAdd(this.z);
// B = X2 - Z2
var b = this.x.redSub(this.z);
// C = X3 + Z3
var c = p.x.redAdd(p.z);
// D = X3 - Z3
var d = p.x.redSub(p.z);
// DA = D * A
var da = d.redMul(a);
// CB = C * B
var cb = c.redMul(b);
// X5 = Z1 * (DA + CB)^2
var nx = diff.z.redMul(da.redAdd(cb).redSqr());
// Z5 = X1 * (DA - CB)^2
var nz = diff.x.redMul(da.redISub(cb).redSqr());
return this.curve.point(nx, nz);
};
Point.prototype.mul = function mul(k) {
var t = k.clone();
var a = this; // (N / 2) * Q + Q
var b = this.curve.point(null, null); // (N / 2) * Q
var c = this; // Q
for (var bits = []; t.cmpn(0) !== 0; t.iushrn(1))
bits.push(t.andln(1));
for (var i = bits.length - 1; i >= 0; i--) {
if (bits[i] === 0) {
// N * Q + Q = ((N / 2) * Q + Q)) + (N / 2) * Q
a = a.diffAdd(b, c);
// N * Q = 2 * ((N / 2) * Q + Q))
b = b.dbl();
} else {
// N * Q = ((N / 2) * Q + Q) + ((N / 2) * Q)
b = a.diffAdd(b, c);
// N * Q + Q = 2 * ((N / 2) * Q + Q)
a = a.dbl();
}
}
return b;
};
Point.prototype.mulAdd = function mulAdd() {
throw new Error('Not supported on Montgomery curve');
};
Point.prototype.jumlAdd = function jumlAdd() {
throw new Error('Not supported on Montgomery curve');
};
Point.prototype.eq = function eq(other) {
return this.getX().cmp(other.getX()) === 0;
};
Point.prototype.normalize = function normalize() {
this.x = this.x.redMul(this.z.redInvm());
this.z = this.curve.one;
return this;
};
Point.prototype.getX = function getX() {
// Normalize coordinates
this.normalize();
return this.x.fromRed();
};
},{"../../elliptic":85,"../curve":88,"bn.js":34,"inherits":119}],90:[function(require,module,exports){
'use strict';
var curve = require('../curve');
var elliptic = require('../../elliptic');
var BN = require('bn.js');
var inherits = require('inherits');
var Base = curve.base;
var assert = elliptic.utils.assert;
function ShortCurve(conf) {
Base.call(this, 'short', conf);
this.a = new BN(conf.a, 16).toRed(this.red);
this.b = new BN(conf.b, 16).toRed(this.red);
this.tinv = this.two.redInvm();
this.zeroA = this.a.fromRed().cmpn(0) === 0;
this.threeA = this.a.fromRed().sub(this.p).cmpn(-3) === 0;
// If the curve is endomorphic, precalculate beta and lambda
this.endo = this._getEndomorphism(conf);
this._endoWnafT1 = new Array(4);
this._endoWnafT2 = new Array(4);
}
inherits(ShortCurve, Base);
module.exports = ShortCurve;
ShortCurve.prototype._getEndomorphism = function _getEndomorphism(conf) {
// No efficient endomorphism
if (!this.zeroA || !this.g || !this.n || this.p.modn(3) !== 1)
return;
// Compute beta and lambda, that lambda * P = (beta * Px; Py)
var beta;
var lambda;
if (conf.beta) {
beta = new BN(conf.beta, 16).toRed(this.red);
} else {
var betas = this._getEndoRoots(this.p);
// Choose the smallest beta
beta = betas[0].cmp(betas[1]) < 0 ? betas[0] : betas[1];
beta = beta.toRed(this.red);
}
if (conf.lambda) {
lambda = new BN(conf.lambda, 16);
} else {
// Choose the lambda that is matching selected beta
var lambdas = this._getEndoRoots(this.n);
if (this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta)) === 0) {
lambda = lambdas[0];
} else {
lambda = lambdas[1];
assert(this.g.mul(lambda).x.cmp(this.g.x.redMul(beta)) === 0);
}
}
// Get basis vectors, used for balanced length-two representation
var basis;
if (conf.basis) {
basis = conf.basis.map(function(vec) {
return {
a: new BN(vec.a, 16),
b: new BN(vec.b, 16)
};
});
} else {
basis = this._getEndoBasis(lambda);
}
return {
beta: beta,
lambda: lambda,
basis: basis
};
};
ShortCurve.prototype._getEndoRoots = function _getEndoRoots(num) {
// Find roots of for x^2 + x + 1 in F
// Root = (-1 +- Sqrt(-3)) / 2
//
var red = num === this.p ? this.red : BN.mont(num);
var tinv = new BN(2).toRed(red).redInvm();
var ntinv = tinv.redNeg();
var s = new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);
var l1 = ntinv.redAdd(s).fromRed();
var l2 = ntinv.redSub(s).fromRed();
return [ l1, l2 ];
};
ShortCurve.prototype._getEndoBasis = function _getEndoBasis(lambda) {
// aprxSqrt >= sqrt(this.n)
var aprxSqrt = this.n.ushrn(Math.floor(this.n.bitLength() / 2));
// 3.74
// Run EGCD, until r(L + 1) < aprxSqrt
var u = lambda;
var v = this.n.clone();
var x1 = new BN(1);
var y1 = new BN(0);
var x2 = new BN(0);
var y2 = new BN(1);
// NOTE: all vectors are roots of: a + b * lambda = 0 (mod n)
var a0;
var b0;
// First vector
var a1;
var b1;
// Second vector
var a2;
var b2;
var prevR;
var i = 0;
var r;
var x;
while (u.cmpn(0) !== 0) {
var q = v.div(u);
r = v.sub(q.mul(u));
x = x2.sub(q.mul(x1));
var y = y2.sub(q.mul(y1));
if (!a1 && r.cmp(aprxSqrt) < 0) {
a0 = prevR.neg();
b0 = x1;
a1 = r.neg();
b1 = x;
} else if (a1 && ++i === 2) {
break;
}
prevR = r;
v = u;
u = r;
x2 = x1;
x1 = x;
y2 = y1;
y1 = y;
}
a2 = r.neg();
b2 = x;
var len1 = a1.sqr().add(b1.sqr());
var len2 = a2.sqr().add(b2.sqr());
if (len2.cmp(len1) >= 0) {
a2 = a0;
b2 = b0;
}
// Normalize signs
if (a1.negative) {
a1 = a1.neg();
b1 = b1.neg();
}
if (a2.negative) {
a2 = a2.neg();
b2 = b2.neg();
}
return [
{ a: a1, b: b1 },
{ a: a2, b: b2 }
];
};
ShortCurve.prototype._endoSplit = function _endoSplit(k) {
var basis = this.endo.basis;
var v1 = basis[0];
var v2 = basis[1];
var c1 = v2.b.mul(k).divRound(this.n);
var c2 = v1.b.neg().mul(k).divRound(this.n);
var p1 = c1.mul(v1.a);
var p2 = c2.mul(v2.a);
var q1 = c1.mul(v1.b);
var q2 = c2.mul(v2.b);
// Calculate answer
var k1 = k.sub(p1).sub(p2);
var k2 = q1.add(q2).neg();
return { k1: k1, k2: k2 };
};
ShortCurve.prototype.pointFromX = function pointFromX(x, odd) {
x = new BN(x, 16);
if (!x.red)
x = x.toRed(this.red);
var y2 = x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b);
var y = y2.redSqrt();
if (y.redSqr().redSub(y2).cmp(this.zero) !== 0)
throw new Error('invalid point');
// XXX Is there any way to tell if the number is odd without converting it
// to non-red form?
var isOdd = y.fromRed().isOdd();
if (odd && !isOdd || !odd && isOdd)
y = y.redNeg();
return this.point(x, y);
};
ShortCurve.prototype.validate = function validate(point) {
if (point.inf)
return true;
var x = point.x;
var y = point.y;
var ax = this.a.redMul(x);
var rhs = x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);
return y.redSqr().redISub(rhs).cmpn(0) === 0;
};
ShortCurve.prototype._endoWnafMulAdd =
function _endoWnafMulAdd(points, coeffs, jacobianResult) {
var npoints = this._endoWnafT1;
var ncoeffs = this._endoWnafT2;
for (var i = 0; i < points.length; i++) {
var split = this._endoSplit(coeffs[i]);
var p = points[i];
var beta = p._getBeta();
if (split.k1.negative) {
split.k1.ineg();
p = p.neg(true);
}
if (split.k2.negative) {
split.k2.ineg();
beta = beta.neg(true);
}
npoints[i * 2] = p;
npoints[i * 2 + 1] = beta;
ncoeffs[i * 2] = split.k1;
ncoeffs[i * 2 + 1] = split.k2;
}
var res = this._wnafMulAdd(1, npoints, ncoeffs, i * 2, jacobianResult);
// Clean-up references to points and coefficients
for (var j = 0; j < i * 2; j++) {
npoints[j] = null;
ncoeffs[j] = null;
}
return res;
};
function Point(curve, x, y, isRed) {
Base.BasePoint.call(this, curve, 'affine');
if (x === null && y === null) {
this.x = null;
this.y = null;
this.inf = true;
} else {
this.x = new BN(x, 16);
this.y = new BN(y, 16);
// Force redgomery representation when loading from JSON
if (isRed) {
this.x.forceRed(this.curve.red);
this.y.forceRed(this.curve.red);
}
if (!this.x.red)
this.x = this.x.toRed(this.curve.red);
if (!this.y.red)
this.y = this.y.toRed(this.curve.red);
this.inf = false;
}
}
inherits(Point, Base.BasePoint);
ShortCurve.prototype.point = function point(x, y, isRed) {
return new Point(this, x, y, isRed);
};
ShortCurve.prototype.pointFromJSON = function pointFromJSON(obj, red) {
return Point.fromJSON(this, obj, red);
};
Point.prototype._getBeta = function _getBeta() {
if (!this.curve.endo)
return;
var pre = this.precomputed;
if (pre && pre.beta)
return pre.beta;
var beta = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
if (pre) {
var curve = this.curve;
var endoMul = function(p) {
return curve.point(p.x.redMul(curve.endo.beta), p.y);
};
pre.beta = beta;
beta.precomputed = {
beta: null,
naf: pre.naf && {
wnd: pre.naf.wnd,
points: pre.naf.points.map(endoMul)
},
doubles: pre.doubles && {
step: pre.doubles.step,
points: pre.doubles.points.map(endoMul)
}
};
}
return beta;
};
Point.prototype.toJSON = function toJSON() {
if (!this.precomputed)
return [ this.x, this.y ];
return [ this.x, this.y, this.precomputed && {
doubles: this.precomputed.doubles && {
step: this.precomputed.doubles.step,
points: this.precomputed.doubles.points.slice(1)
},
naf: this.precomputed.naf && {
wnd: this.precomputed.naf.wnd,
points: this.precomputed.naf.points.slice(1)
}
} ];
};
Point.fromJSON = function fromJSON(curve, obj, red) {
if (typeof obj === 'string')
obj = JSON.parse(obj);
var res = curve.point(obj[0], obj[1], red);
if (!obj[2])
return res;
function obj2point(obj) {
return curve.point(obj[0], obj[1], red);
}
var pre = obj[2];
res.precomputed = {
beta: null,
doubles: pre.doubles && {
step: pre.doubles.step,
points: [ res ].concat(pre.doubles.points.map(obj2point))
},
naf: pre.naf && {
wnd: pre.naf.wnd,
points: [ res ].concat(pre.naf.points.map(obj2point))
}
};
return res;
};
Point.prototype.inspect = function inspect() {
if (this.isInfinity())
return '<EC Point Infinity>';
return '<EC Point x: ' + this.x.fromRed().toString(16, 2) +
' y: ' + this.y.fromRed().toString(16, 2) + '>';
};
Point.prototype.isInfinity = function isInfinity() {
return this.inf;
};
Point.prototype.add = function add(p) {
// O + P = P
if (this.inf)
return p;
// P + O = P
if (p.inf)
return this;
// P + P = 2P
if (this.eq(p))
return this.dbl();
// P + (-P) = O
if (this.neg().eq(p))
return this.curve.point(null, null);
// P + Q = O
if (this.x.cmp(p.x) === 0)
return this.curve.point(null, null);
var c = this.y.redSub(p.y);
if (c.cmpn(0) !== 0)
c = c.redMul(this.x.redSub(p.x).redInvm());
var nx = c.redSqr().redISub(this.x).redISub(p.x);
var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
return this.curve.point(nx, ny);
};
Point.prototype.dbl = function dbl() {
if (this.inf)
return this;
// 2P = O
var ys1 = this.y.redAdd(this.y);
if (ys1.cmpn(0) === 0)
return this.curve.point(null, null);
var a = this.curve.a;
var x2 = this.x.redSqr();
var dyinv = ys1.redInvm();
var c = x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv);
var nx = c.redSqr().redISub(this.x.redAdd(this.x));
var ny = c.redMul(this.x.redSub(nx)).redISub(this.y);
return this.curve.point(nx, ny);
};
Point.prototype.getX = function getX() {
return this.x.fromRed();
};
Point.prototype.getY = function getY() {
return this.y.fromRed();
};
Point.prototype.mul = function mul(k) {
k = new BN(k, 16);
if (this._hasDoubles(k))
return this.curve._fixedNafMul(this, k);
else if (this.curve.endo)
return this.curve._endoWnafMulAdd([ this ], [ k ]);
else
return this.curve._wnafMul(this, k);
};
Point.prototype.mulAdd = function mulAdd(k1, p2, k2) {
var points = [ this, p2 ];
var coeffs = [ k1, k2 ];
if (this.curve.endo)
return this.curve._endoWnafMulAdd(points, coeffs);
else
return this.curve._wnafMulAdd(1, points, coeffs, 2);
};
Point.prototype.jmulAdd = function jmulAdd(k1, p2, k2) {
var points = [ this, p2 ];
var coeffs = [ k1, k2 ];
if (this.curve.endo)
return this.curve._endoWnafMulAdd(points, coeffs, true);
else
return this.curve._wnafMulAdd(1, points, coeffs, 2, true);
};
Point.prototype.eq = function eq(p) {
return this === p ||
this.inf === p.inf &&
(this.inf || this.x.cmp(p.x) === 0 && this.y.cmp(p.y) === 0);
};
Point.prototype.neg = function neg(_precompute) {
if (this.inf)
return this;
var res = this.curve.point(this.x, this.y.redNeg());
if (_precompute && this.precomputed) {
var pre = this.precomputed;
var negate = function(p) {
return p.neg();
};
res.precomputed = {
naf: pre.naf && {
wnd: pre.naf.wnd,
points: pre.naf.points.map(negate)
},
doubles: pre.doubles && {
step: pre.doubles.step,
points: pre.doubles.points.map(negate)
}
};
}
return res;
};
Point.prototype.toJ = function toJ() {
if (this.inf)
return this.curve.jpoint(null, null, null);
var res = this.curve.jpoint(this.x, this.y, this.curve.one);
return res;
};
function JPoint(curve, x, y, z) {
Base.BasePoint.call(this, curve, 'jacobian');
if (x === null && y === null && z === null) {
this.x = this.curve.one;
this.y = this.curve.one;
this.z = new BN(0);
} else {
this.x = new BN(x, 16);
this.y = new BN(y, 16);
this.z = new BN(z, 16);
}
if (!this.x.red)
this.x = this.x.toRed(this.curve.red);
if (!this.y.red)
this.y = this.y.toRed(this.curve.red);
if (!this.z.red)
this.z = this.z.toRed(this.curve.red);
this.zOne = this.z === this.curve.one;
}
inherits(JPoint, Base.BasePoint);
ShortCurve.prototype.jpoint = function jpoint(x, y, z) {
return new JPoint(this, x, y, z);
};
JPoint.prototype.toP = function toP() {
if (this.isInfinity())
return this.curve.point(null, null);
var zinv = this.z.redInvm();
var zinv2 = zinv.redSqr();
var ax = this.x.redMul(zinv2);
var ay = this.y.redMul(zinv2).redMul(zinv);
return this.curve.point(ax, ay);
};
JPoint.prototype.neg = function neg() {
return this.curve.jpoint(this.x, this.y.redNeg(), this.z);
};
JPoint.prototype.add = function add(p) {
// O + P = P
if (this.isInfinity())
return p;
// P + O = P
if (p.isInfinity())
return this;
// 12M + 4S + 7A
var pz2 = p.z.redSqr();
var z2 = this.z.redSqr();
var u1 = this.x.redMul(pz2);
var u2 = p.x.redMul(z2);
var s1 = this.y.redMul(pz2.redMul(p.z));
var s2 = p.y.redMul(z2.redMul(this.z));
var h = u1.redSub(u2);
var r = s1.redSub(s2);
if (h.cmpn(0) === 0) {
if (r.cmpn(0) !== 0)
return this.curve.jpoint(null, null, null);
else
return this.dbl();
}
var h2 = h.redSqr();
var h3 = h2.redMul(h);
var v = u1.redMul(h2);
var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
var nz = this.z.redMul(p.z).redMul(h);
return this.curve.jpoint(nx, ny, nz);
};
JPoint.prototype.mixedAdd = function mixedAdd(p) {
// O + P = P
if (this.isInfinity())
return p.toJ();
// P + O = P
if (p.isInfinity())
return this;
// 8M + 3S + 7A
var z2 = this.z.redSqr();
var u1 = this.x;
var u2 = p.x.redMul(z2);
var s1 = this.y;
var s2 = p.y.redMul(z2).redMul(this.z);
var h = u1.redSub(u2);
var r = s1.redSub(s2);
if (h.cmpn(0) === 0) {
if (r.cmpn(0) !== 0)
return this.curve.jpoint(null, null, null);
else
return this.dbl();
}
var h2 = h.redSqr();
var h3 = h2.redMul(h);
var v = u1.redMul(h2);
var nx = r.redSqr().redIAdd(h3).redISub(v).redISub(v);
var ny = r.redMul(v.redISub(nx)).redISub(s1.redMul(h3));
var nz = this.z.redMul(h);
return this.curve.jpoint(nx, ny, nz);
};
JPoint.prototype.dblp = function dblp(pow) {
if (pow === 0)
return this;
if (this.isInfinity())
return this;
if (!pow)
return this.dbl();
if (this.curve.zeroA || this.curve.threeA) {
var r = this;
for (var i = 0; i < pow; i++)
r = r.dbl();
return r;
}
// 1M + 2S + 1A + N * (4S + 5M + 8A)
// N = 1 => 6M + 6S + 9A
var a = this.curve.a;
var tinv = this.curve.tinv;
var jx = this.x;
var jy = this.y;
var jz = this.z;
var jz4 = jz.redSqr().redSqr();
// Reuse results
var jyd = jy.redAdd(jy);
for (var i = 0; i < pow; i++) {
var jx2 = jx.redSqr();
var jyd2 = jyd.redSqr();
var jyd4 = jyd2.redSqr();
var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
var t1 = jx.redMul(jyd2);
var nx = c.redSqr().redISub(t1.redAdd(t1));
var t2 = t1.redISub(nx);
var dny = c.redMul(t2);
dny = dny.redIAdd(dny).redISub(jyd4);
var nz = jyd.redMul(jz);
if (i + 1 < pow)
jz4 = jz4.redMul(jyd4);
jx = nx;
jz = nz;
jyd = dny;
}
return this.curve.jpoint(jx, jyd.redMul(tinv), jz);
};
JPoint.prototype.dbl = function dbl() {
if (this.isInfinity())
return this;
if (this.curve.zeroA)
return this._zeroDbl();
else if (this.curve.threeA)
return this._threeDbl();
else
return this._dbl();
};
JPoint.prototype._zeroDbl = function _zeroDbl() {
var nx;
var ny;
var nz;
// Z = 1
if (this.zOne) {
// hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
// #doubling-mdbl-2007-bl
// 1M + 5S + 14A
// XX = X1^2
var xx = this.x.redSqr();
// YY = Y1^2
var yy = this.y.redSqr();
// YYYY = YY^2
var yyyy = yy.redSqr();
// S = 2 * ((X1 + YY)^2 - XX - YYYY)
var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
s = s.redIAdd(s);
// M = 3 * XX + a; a = 0
var m = xx.redAdd(xx).redIAdd(xx);
// T = M ^ 2 - 2*S
var t = m.redSqr().redISub(s).redISub(s);
// 8 * YYYY
var yyyy8 = yyyy.redIAdd(yyyy);
yyyy8 = yyyy8.redIAdd(yyyy8);
yyyy8 = yyyy8.redIAdd(yyyy8);
// X3 = T
nx = t;
// Y3 = M * (S - T) - 8 * YYYY
ny = m.redMul(s.redISub(t)).redISub(yyyy8);
// Z3 = 2*Y1
nz = this.y.redAdd(this.y);
} else {
// hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html
// #doubling-dbl-2009-l
// 2M + 5S + 13A
// A = X1^2
var a = this.x.redSqr();
// B = Y1^2
var b = this.y.redSqr();
// C = B^2
var c = b.redSqr();
// D = 2 * ((X1 + B)^2 - A - C)
var d = this.x.redAdd(b).redSqr().redISub(a).redISub(c);
d = d.redIAdd(d);
// E = 3 * A
var e = a.redAdd(a).redIAdd(a);
// F = E^2
var f = e.redSqr();
// 8 * C
var c8 = c.redIAdd(c);
c8 = c8.redIAdd(c8);
c8 = c8.redIAdd(c8);
// X3 = F - 2 * D
nx = f.redISub(d).redISub(d);
// Y3 = E * (D - X3) - 8 * C
ny = e.redMul(d.redISub(nx)).redISub(c8);
// Z3 = 2 * Y1 * Z1
nz = this.y.redMul(this.z);
nz = nz.redIAdd(nz);
}
return this.curve.jpoint(nx, ny, nz);
};
JPoint.prototype._threeDbl = function _threeDbl() {
var nx;
var ny;
var nz;
// Z = 1
if (this.zOne) {
// hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html
// #doubling-mdbl-2007-bl
// 1M + 5S + 15A
// XX = X1^2
var xx = this.x.redSqr();
// YY = Y1^2
var yy = this.y.redSqr();
// YYYY = YY^2
var yyyy = yy.redSqr();
// S = 2 * ((X1 + YY)^2 - XX - YYYY)
var s = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
s = s.redIAdd(s);
// M = 3 * XX + a
var m = xx.redAdd(xx).redIAdd(xx).redIAdd(this.curve.a);
// T = M^2 - 2 * S
var t = m.redSqr().redISub(s).redISub(s);
// X3 = T
nx = t;
// Y3 = M * (S - T) - 8 * YYYY
var yyyy8 = yyyy.redIAdd(yyyy);
yyyy8 = yyyy8.redIAdd(yyyy8);
yyyy8 = yyyy8.redIAdd(yyyy8);
ny = m.redMul(s.redISub(t)).redISub(yyyy8);
// Z3 = 2 * Y1
nz = this.y.redAdd(this.y);
} else {
// hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-3.html#doubling-dbl-2001-b
// 3M + 5S
// delta = Z1^2
var delta = this.z.redSqr();
// gamma = Y1^2
var gamma = this.y.redSqr();
// beta = X1 * gamma
var beta = this.x.redMul(gamma);
// alpha = 3 * (X1 - delta) * (X1 + delta)
var alpha = this.x.redSub(delta).redMul(this.x.redAdd(delta));
alpha = alpha.redAdd(alpha).redIAdd(alpha);
// X3 = alpha^2 - 8 * beta
var beta4 = beta.redIAdd(beta);
beta4 = beta4.redIAdd(beta4);
var beta8 = beta4.redAdd(beta4);
nx = alpha.redSqr().redISub(beta8);
// Z3 = (Y1 + Z1)^2 - gamma - delta
nz = this.y.redAdd(this.z).redSqr().redISub(gamma).redISub(delta);
// Y3 = alpha * (4 * beta - X3) - 8 * gamma^2
var ggamma8 = gamma.redSqr();
ggamma8 = ggamma8.redIAdd(ggamma8);
ggamma8 = ggamma8.redIAdd(ggamma8);
ggamma8 = ggamma8.redIAdd(ggamma8);
ny = alpha.redMul(beta4.redISub(nx)).redISub(ggamma8);
}
return this.curve.jpoint(nx, ny, nz);
};
JPoint.prototype._dbl = function _dbl() {
var a = this.curve.a;
// 4M + 6S + 10A
var jx = this.x;
var jy = this.y;
var jz = this.z;
var jz4 = jz.redSqr().redSqr();
var jx2 = jx.redSqr();
var jy2 = jy.redSqr();
var c = jx2.redAdd(jx2).redIAdd(jx2).redIAdd(a.redMul(jz4));
var jxd4 = jx.redAdd(jx);
jxd4 = jxd4.redIAdd(jxd4);
var t1 = jxd4.redMul(jy2);
var nx = c.redSqr().redISub(t1.redAdd(t1));
var t2 = t1.redISub(nx);
var jyd8 = jy2.redSqr();
jyd8 = jyd8.redIAdd(jyd8);
jyd8 = jyd8.redIAdd(jyd8);
jyd8 = jyd8.redIAdd(jyd8);
var ny = c.redMul(t2).redISub(jyd8);
var nz = jy.redAdd(jy).redMul(jz);
return this.curve.jpoint(nx, ny, nz);
};
JPoint.prototype.trpl = function trpl() {
if (!this.curve.zeroA)
return this.dbl().add(this);
// hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#tripling-tpl-2007-bl
// 5M + 10S + ...
// XX = X1^2
var xx = this.x.redSqr();
// YY = Y1^2
var yy = this.y.redSqr();
// ZZ = Z1^2
var zz = this.z.redSqr();
// YYYY = YY^2
var yyyy = yy.redSqr();
// M = 3 * XX + a * ZZ2; a = 0
var m = xx.redAdd(xx).redIAdd(xx);
// MM = M^2
var mm = m.redSqr();
// E = 6 * ((X1 + YY)^2 - XX - YYYY) - MM
var e = this.x.redAdd(yy).redSqr().redISub(xx).redISub(yyyy);
e = e.redIAdd(e);
e = e.redAdd(e).redIAdd(e);
e = e.redISub(mm);
// EE = E^2
var ee = e.redSqr();
// T = 16*YYYY
var t = yyyy.redIAdd(yyyy);
t = t.redIAdd(t);
t = t.redIAdd(t);
t = t.redIAdd(t);
// U = (M + E)^2 - MM - EE - T
var u = m.redIAdd(e).redSqr().redISub(mm).redISub(ee).redISub(t);
// X3 = 4 * (X1 * EE - 4 * YY * U)
var yyu4 = yy.redMul(u);
yyu4 = yyu4.redIAdd(yyu4);
yyu4 = yyu4.redIAdd(yyu4);
var nx = this.x.redMul(ee).redISub(yyu4);
nx = nx.redIAdd(nx);
nx = nx.redIAdd(nx);
// Y3 = 8 * Y1 * (U * (T - U) - E * EE)
var ny = this.y.redMul(u.redMul(t.redISub(u)).redISub(e.redMul(ee)));
ny = ny.redIAdd(ny);
ny = ny.redIAdd(ny);
ny = ny.redIAdd(ny);
// Z3 = (Z1 + E)^2 - ZZ - EE
var nz = this.z.redAdd(e).redSqr().redISub(zz).redISub(ee);
return this.curve.jpoint(nx, ny, nz);
};
JPoint.prototype.mul = function mul(k, kbase) {
k = new BN(k, kbase);
return this.curve._wnafMul(this, k);
};
JPoint.prototype.eq = function eq(p) {
if (p.type === 'affine')
return this.eq(p.toJ());
if (this === p)
return true;
// x1 * z2^2 == x2 * z1^2
var z2 = this.z.redSqr();
var pz2 = p.z.redSqr();
if (this.x.redMul(pz2).redISub(p.x.redMul(z2)).cmpn(0) !== 0)
return false;
// y1 * z2^3 == y2 * z1^3
var z3 = z2.redMul(this.z);
var pz3 = pz2.redMul(p.z);
return this.y.redMul(pz3).redISub(p.y.redMul(z3)).cmpn(0) === 0;
};
JPoint.prototype.eqXToP = function eqXToP(x) {
var zs = this.z.redSqr();
var rx = x.toRed(this.curve.red).redMul(zs);
if (this.x.cmp(rx) === 0)
return true;
var xc = x.clone();
var t = this.curve.redN.redMul(zs);
for (;;) {
xc.iadd(this.curve.n);
if (xc.cmp(this.curve.p) >= 0)
return false;
rx.redIAdd(t);
if (this.x.cmp(rx) === 0)
return true;
}
return false;
};
JPoint.prototype.inspect = function inspect() {
if (this.isInfinity())
return '<EC JPoint Infinity>';
return '<EC JPoint x: ' + this.x.toString(16, 2) +
' y: ' + this.y.toString(16, 2) +
' z: ' + this.z.toString(16, 2) + '>';
};
JPoint.prototype.isInfinity = function isInfinity() {
// XXX This code assumes that zero is always zero in red
return this.z.cmpn(0) === 0;
};
},{"../../elliptic":85,"../curve":88,"bn.js":34,"inherits":119}],91:[function(require,module,exports){
'use strict';
var curves = exports;
var hash = require('hash.js');
var elliptic = require('../elliptic');
var assert = elliptic.utils.assert;
function PresetCurve(options) {
if (options.type === 'short')
this.curve = new elliptic.curve.short(options);
else if (options.type === 'edwards')
this.curve = new elliptic.curve.edwards(options);
else
this.curve = new elliptic.curve.mont(options);
this.g = this.curve.g;
this.n = this.curve.n;
this.hash = options.hash;
assert(this.g.validate(), 'Invalid curve');
assert(this.g.mul(this.n).isInfinity(), 'Invalid curve, G*N != O');
}
curves.PresetCurve = PresetCurve;
function defineCurve(name, options) {
Object.defineProperty(curves, name, {
configurable: true,
enumerable: true,
get: function() {
var curve = new PresetCurve(options);
Object.defineProperty(curves, name, {
configurable: true,
enumerable: true,
value: curve
});
return curve;
}
});
}
defineCurve('p192', {
type: 'short',
prime: 'p192',
p: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff',
a: 'ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc',
b: '64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1',
n: 'ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831',
hash: hash.sha256,
gRed: false,
g: [
'188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012',
'07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811'
]
});
defineCurve('p224', {
type: 'short',
prime: 'p224',
p: 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001',
a: 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe',
b: 'b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4',
n: 'ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d',
hash: hash.sha256,
gRed: false,
g: [
'b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21',
'bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34'
]
});
defineCurve('p256', {
type: 'short',
prime: null,
p: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff',
a: 'ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc',
b: '5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b',
n: 'ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551',
hash: hash.sha256,
gRed: false,
g: [
'6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296',
'4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5'
]
});
defineCurve('p384', {
type: 'short',
prime: null,
p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
'fffffffe ffffffff 00000000 00000000 ffffffff',
a: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
'fffffffe ffffffff 00000000 00000000 fffffffc',
b: 'b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f ' +
'5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef',
n: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 ' +
'f4372ddf 581a0db2 48b0a77a ecec196a ccc52973',
hash: hash.sha384,
gRed: false,
g: [
'aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 ' +
'5502f25d bf55296c 3a545e38 72760ab7',
'3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 ' +
'0a60b1ce 1d7e819d 7a431d7c 90ea0e5f'
]
});
defineCurve('p521', {
type: 'short',
prime: null,
p: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
'ffffffff ffffffff ffffffff ffffffff ffffffff',
a: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
'ffffffff ffffffff ffffffff ffffffff fffffffc',
b: '00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b ' +
'99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd ' +
'3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00',
n: '000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ' +
'ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 ' +
'f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409',
hash: hash.sha512,
gRed: false,
g: [
'000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 ' +
'053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 ' +
'a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66',
'00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 ' +
'579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 ' +
'3fad0761 353c7086 a272c240 88be9476 9fd16650'
]
});
defineCurve('curve25519', {
type: 'mont',
prime: 'p25519',
p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
a: '76d06',
b: '1',
n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
hash: hash.sha256,
gRed: false,
g: [
'9'
]
});
defineCurve('ed25519', {
type: 'edwards',
prime: 'p25519',
p: '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed',
a: '-1',
c: '1',
// -121665 * (121666^(-1)) (mod P)
d: '52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3',
n: '1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed',
hash: hash.sha256,
gRed: false,
g: [
'216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a',
// 4/5
'6666666666666666666666666666666666666666666666666666666666666658'
]
});
var pre;
try {
pre = require('./precomputed/secp256k1');
} catch (e) {
pre = undefined;
}
defineCurve('secp256k1', {
type: 'short',
prime: 'k256',
p: 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f',
a: '0',
b: '7',
n: 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141',
h: '1',
hash: hash.sha256,
// Precomputed endomorphism
beta: '7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee',
lambda: '5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72',
basis: [
{
a: '3086d221a7d46bcde86c90e49284eb15',
b: '-e4437ed6010e88286f547fa90abfe4c3'
},
{
a: '114ca50f7a8e2f3f657c1108d9d44cfd8',
b: '3086d221a7d46bcde86c90e49284eb15'
}
],
gRed: false,
g: [
'79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798',
'483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8',
pre
]
});
},{"../elliptic":85,"./precomputed/secp256k1":98,"hash.js":104}],92:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
var HmacDRBG = require('hmac-drbg');
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
var assert = utils.assert;
var KeyPair = require('./key');
var Signature = require('./signature');
function EC(options) {
if (!(this instanceof EC))
return new EC(options);
// Shortcut `elliptic.ec(curve-name)`
if (typeof options === 'string') {
assert(elliptic.curves.hasOwnProperty(options), 'Unknown curve ' + options);
options = elliptic.curves[options];
}
// Shortcut for `elliptic.ec(elliptic.curves.curveName)`
if (options instanceof elliptic.curves.PresetCurve)
options = { curve: options };
this.curve = options.curve.curve;
this.n = this.curve.n;
this.nh = this.n.ushrn(1);
this.g = this.curve.g;
// Point on curve
this.g = options.curve.g;
this.g.precompute(options.curve.n.bitLength() + 1);
// Hash for function for DRBG
this.hash = options.hash || options.curve.hash;
}
module.exports = EC;
EC.prototype.keyPair = function keyPair(options) {
return new KeyPair(this, options);
};
EC.prototype.keyFromPrivate = function keyFromPrivate(priv, enc) {
return KeyPair.fromPrivate(this, priv, enc);
};
EC.prototype.keyFromPublic = function keyFromPublic(pub, enc) {
return KeyPair.fromPublic(this, pub, enc);
};
EC.prototype.genKeyPair = function genKeyPair(options) {
if (!options)
options = {};
// Instantiate Hmac_DRBG
var drbg = new HmacDRBG({
hash: this.hash,
pers: options.pers,
persEnc: options.persEnc || 'utf8',
entropy: options.entropy || elliptic.rand(this.hash.hmacStrength),
entropyEnc: options.entropy && options.entropyEnc || 'utf8',
nonce: this.n.toArray()
});
var bytes = this.n.byteLength();
var ns2 = this.n.sub(new BN(2));
do {
var priv = new BN(drbg.generate(bytes));
if (priv.cmp(ns2) > 0)
continue;
priv.iaddn(1);
return this.keyFromPrivate(priv);
} while (true);
};
EC.prototype._truncateToN = function truncateToN(msg, truncOnly) {
var delta = msg.byteLength() * 8 - this.n.bitLength();
if (delta > 0)
msg = msg.ushrn(delta);
if (!truncOnly && msg.cmp(this.n) >= 0)
return msg.sub(this.n);
else
return msg;
};
EC.prototype.sign = function sign(msg, key, enc, options) {
if (typeof enc === 'object') {
options = enc;
enc = null;
}
if (!options)
options = {};
key = this.keyFromPrivate(key, enc);
msg = this._truncateToN(new BN(msg, 16));
// Zero-extend key to provide enough entropy
var bytes = this.n.byteLength();
var bkey = key.getPrivate().toArray('be', bytes);
// Zero-extend nonce to have the same byte size as N
var nonce = msg.toArray('be', bytes);
// Instantiate Hmac_DRBG
var drbg = new HmacDRBG({
hash: this.hash,
entropy: bkey,
nonce: nonce,
pers: options.pers,
persEnc: options.persEnc || 'utf8'
});
// Number of bytes to generate
var ns1 = this.n.sub(new BN(1));
for (var iter = 0; true; iter++) {
var k = options.k ?
options.k(iter) :
new BN(drbg.generate(this.n.byteLength()));
k = this._truncateToN(k, true);
if (k.cmpn(1) <= 0 || k.cmp(ns1) >= 0)
continue;
var kp = this.g.mul(k);
if (kp.isInfinity())
continue;
var kpX = kp.getX();
var r = kpX.umod(this.n);
if (r.cmpn(0) === 0)
continue;
var s = k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));
s = s.umod(this.n);
if (s.cmpn(0) === 0)
continue;
var recoveryParam = (kp.getY().isOdd() ? 1 : 0) |
(kpX.cmp(r) !== 0 ? 2 : 0);
// Use complement of `s`, if it is > `n / 2`
if (options.canonical && s.cmp(this.nh) > 0) {
s = this.n.sub(s);
recoveryParam ^= 1;
}
return new Signature({ r: r, s: s, recoveryParam: recoveryParam });
}
};
EC.prototype.verify = function verify(msg, signature, key, enc) {
msg = this._truncateToN(new BN(msg, 16));
key = this.keyFromPublic(key, enc);
signature = new Signature(signature, 'hex');
// Perform primitive values validation
var r = signature.r;
var s = signature.s;
if (r.cmpn(1) < 0 || r.cmp(this.n) >= 0)
return false;
if (s.cmpn(1) < 0 || s.cmp(this.n) >= 0)
return false;
// Validate signature
var sinv = s.invm(this.n);
var u1 = sinv.mul(msg).umod(this.n);
var u2 = sinv.mul(r).umod(this.n);
if (!this.curve._maxwellTrick) {
var p = this.g.mulAdd(u1, key.getPublic(), u2);
if (p.isInfinity())
return false;
return p.getX().umod(this.n).cmp(r) === 0;
}
// NOTE: Greg Maxwell's trick, inspired by:
// https://git.io/vad3K
var p = this.g.jmulAdd(u1, key.getPublic(), u2);
if (p.isInfinity())
return false;
// Compare `p.x` of Jacobian point with `r`,
// this will do `p.x == r * p.z^2` instead of multiplying `p.x` by the
// inverse of `p.z^2`
return p.eqXToP(r);
};
EC.prototype.recoverPubKey = function(msg, signature, j, enc) {
assert((3 & j) === j, 'The recovery param is more than two bits');
signature = new Signature(signature, enc);
var n = this.n;
var e = new BN(msg);
var r = signature.r;
var s = signature.s;
// A set LSB signifies that the y-coordinate is odd
var isYOdd = j & 1;
var isSecondKey = j >> 1;
if (r.cmp(this.curve.p.umod(this.curve.n)) >= 0 && isSecondKey)
throw new Error('Unable to find sencond key candinate');
// 1.1. Let x = r + jn.
if (isSecondKey)
r = this.curve.pointFromX(r.add(this.curve.n), isYOdd);
else
r = this.curve.pointFromX(r, isYOdd);
var rInv = signature.r.invm(n);
var s1 = n.sub(e).mul(rInv).umod(n);
var s2 = s.mul(rInv).umod(n);
// 1.6.1 Compute Q = r^-1 (sR - eG)
// Q = r^-1 (sR + -eG)
return this.g.mulAdd(s1, r, s2);
};
EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) {
signature = new Signature(signature, enc);
if (signature.recoveryParam !== null)
return signature.recoveryParam;
for (var i = 0; i < 4; i++) {
var Qprime;
try {
Qprime = this.recoverPubKey(e, signature, i);
} catch (e) {
continue;
}
if (Qprime.eq(Q))
return i;
}
throw new Error('Unable to find valid recovery factor');
};
},{"../../elliptic":85,"./key":93,"./signature":94,"bn.js":34,"hmac-drbg":116}],93:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
var assert = utils.assert;
function KeyPair(ec, options) {
this.ec = ec;
this.priv = null;
this.pub = null;
// KeyPair(ec, { priv: ..., pub: ... })
if (options.priv)
this._importPrivate(options.priv, options.privEnc);
if (options.pub)
this._importPublic(options.pub, options.pubEnc);
}
module.exports = KeyPair;
KeyPair.fromPublic = function fromPublic(ec, pub, enc) {
if (pub instanceof KeyPair)
return pub;
return new KeyPair(ec, {
pub: pub,
pubEnc: enc
});
};
KeyPair.fromPrivate = function fromPrivate(ec, priv, enc) {
if (priv instanceof KeyPair)
return priv;
return new KeyPair(ec, {
priv: priv,
privEnc: enc
});
};
KeyPair.prototype.validate = function validate() {
var pub = this.getPublic();
if (pub.isInfinity())
return { result: false, reason: 'Invalid public key' };
if (!pub.validate())
return { result: false, reason: 'Public key is not a point' };
if (!pub.mul(this.ec.curve.n).isInfinity())
return { result: false, reason: 'Public key * N != O' };
return { result: true, reason: null };
};
KeyPair.prototype.getPublic = function getPublic(compact, enc) {
// compact is optional argument
if (typeof compact === 'string') {
enc = compact;
compact = null;
}
if (!this.pub)
this.pub = this.ec.g.mul(this.priv);
if (!enc)
return this.pub;
return this.pub.encode(enc, compact);
};
KeyPair.prototype.getPrivate = function getPrivate(enc) {
if (enc === 'hex')
return this.priv.toString(16, 2);
else
return this.priv;
};
KeyPair.prototype._importPrivate = function _importPrivate(key, enc) {
this.priv = new BN(key, enc || 16);
// Ensure that the priv won't be bigger than n, otherwise we may fail
// in fixed multiplication method
this.priv = this.priv.umod(this.ec.curve.n);
};
KeyPair.prototype._importPublic = function _importPublic(key, enc) {
if (key.x || key.y) {
// Montgomery points only have an `x` coordinate.
// Weierstrass/Edwards points on the other hand have both `x` and
// `y` coordinates.
if (this.ec.curve.type === 'mont') {
assert(key.x, 'Need x coordinate');
} else if (this.ec.curve.type === 'short' ||
this.ec.curve.type === 'edwards') {
assert(key.x && key.y, 'Need both x and y coordinate');
}
this.pub = this.ec.curve.point(key.x, key.y);
return;
}
this.pub = this.ec.curve.decodePoint(key, enc);
};
// ECDH
KeyPair.prototype.derive = function derive(pub) {
return pub.mul(this.priv).getX();
};
// ECDSA
KeyPair.prototype.sign = function sign(msg, enc, options) {
return this.ec.sign(msg, this, enc, options);
};
KeyPair.prototype.verify = function verify(msg, signature) {
return this.ec.verify(msg, signature, this);
};
KeyPair.prototype.inspect = function inspect() {
return '<Key priv: ' + (this.priv && this.priv.toString(16, 2)) +
' pub: ' + (this.pub && this.pub.inspect()) + ' >';
};
},{"../../elliptic":85,"bn.js":34}],94:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
var assert = utils.assert;
function Signature(options, enc) {
if (options instanceof Signature)
return options;
if (this._importDER(options, enc))
return;
assert(options.r && options.s, 'Signature without r or s');
this.r = new BN(options.r, 16);
this.s = new BN(options.s, 16);
if (options.recoveryParam === undefined)
this.recoveryParam = null;
else
this.recoveryParam = options.recoveryParam;
}
module.exports = Signature;
function Position() {
this.place = 0;
}
function getLength(buf, p) {
var initial = buf[p.place++];
if (!(initial & 0x80)) {
return initial;
}
var octetLen = initial & 0xf;
var val = 0;
for (var i = 0, off = p.place; i < octetLen; i++, off++) {
val <<= 8;
val |= buf[off];
}
p.place = off;
return val;
}
function rmPadding(buf) {
var i = 0;
var len = buf.length - 1;
while (!buf[i] && !(buf[i + 1] & 0x80) && i < len) {
i++;
}
if (i === 0) {
return buf;
}
return buf.slice(i);
}
Signature.prototype._importDER = function _importDER(data, enc) {
data = utils.toArray(data, enc);
var p = new Position();
if (data[p.place++] !== 0x30) {
return false;
}
var len = getLength(data, p);
if ((len + p.place) !== data.length) {
return false;
}
if (data[p.place++] !== 0x02) {
return false;
}
var rlen = getLength(data, p);
var r = data.slice(p.place, rlen + p.place);
p.place += rlen;
if (data[p.place++] !== 0x02) {
return false;
}
var slen = getLength(data, p);
if (data.length !== slen + p.place) {
return false;
}
var s = data.slice(p.place, slen + p.place);
if (r[0] === 0 && (r[1] & 0x80)) {
r = r.slice(1);
}
if (s[0] === 0 && (s[1] & 0x80)) {
s = s.slice(1);
}
this.r = new BN(r);
this.s = new BN(s);
this.recoveryParam = null;
return true;
};
function constructLength(arr, len) {
if (len < 0x80) {
arr.push(len);
return;
}
var octets = 1 + (Math.log(len) / Math.LN2 >>> 3);
arr.push(octets | 0x80);
while (--octets) {
arr.push((len >>> (octets << 3)) & 0xff);
}
arr.push(len);
}
Signature.prototype.toDER = function toDER(enc) {
var r = this.r.toArray();
var s = this.s.toArray();
// Pad values
if (r[0] & 0x80)
r = [ 0 ].concat(r);
// Pad values
if (s[0] & 0x80)
s = [ 0 ].concat(s);
r = rmPadding(r);
s = rmPadding(s);
while (!s[0] && !(s[1] & 0x80)) {
s = s.slice(1);
}
var arr = [ 0x02 ];
constructLength(arr, r.length);
arr = arr.concat(r);
arr.push(0x02);
constructLength(arr, s.length);
var backHalf = arr.concat(s);
var res = [ 0x30 ];
constructLength(res, backHalf.length);
res = res.concat(backHalf);
return utils.encode(res, enc);
};
},{"../../elliptic":85,"bn.js":34}],95:[function(require,module,exports){
'use strict';
var hash = require('hash.js');
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
var assert = utils.assert;
var parseBytes = utils.parseBytes;
var KeyPair = require('./key');
var Signature = require('./signature');
function EDDSA(curve) {
assert(curve === 'ed25519', 'only tested with ed25519 so far');
if (!(this instanceof EDDSA))
return new EDDSA(curve);
var curve = elliptic.curves[curve].curve;
this.curve = curve;
this.g = curve.g;
this.g.precompute(curve.n.bitLength() + 1);
this.pointClass = curve.point().constructor;
this.encodingLength = Math.ceil(curve.n.bitLength() / 8);
this.hash = hash.sha512;
}
module.exports = EDDSA;
/**
* @param {Array|String} message - message bytes
* @param {Array|String|KeyPair} secret - secret bytes or a keypair
* @returns {Signature} - signature
*/
EDDSA.prototype.sign = function sign(message, secret) {
message = parseBytes(message);
var key = this.keyFromSecret(secret);
var r = this.hashInt(key.messagePrefix(), message);
var R = this.g.mul(r);
var Rencoded = this.encodePoint(R);
var s_ = this.hashInt(Rencoded, key.pubBytes(), message)
.mul(key.priv());
var S = r.add(s_).umod(this.curve.n);
return this.makeSignature({ R: R, S: S, Rencoded: Rencoded });
};
/**
* @param {Array} message - message bytes
* @param {Array|String|Signature} sig - sig bytes
* @param {Array|String|Point|KeyPair} pub - public key
* @returns {Boolean} - true if public key matches sig of message
*/
EDDSA.prototype.verify = function verify(message, sig, pub) {
message = parseBytes(message);
sig = this.makeSignature(sig);
var key = this.keyFromPublic(pub);
var h = this.hashInt(sig.Rencoded(), key.pubBytes(), message);
var SG = this.g.mul(sig.S());
var RplusAh = sig.R().add(key.pub().mul(h));
return RplusAh.eq(SG);
};
EDDSA.prototype.hashInt = function hashInt() {
var hash = this.hash();
for (var i = 0; i < arguments.length; i++)
hash.update(arguments[i]);
return utils.intFromLE(hash.digest()).umod(this.curve.n);
};
EDDSA.prototype.keyFromPublic = function keyFromPublic(pub) {
return KeyPair.fromPublic(this, pub);
};
EDDSA.prototype.keyFromSecret = function keyFromSecret(secret) {
return KeyPair.fromSecret(this, secret);
};
EDDSA.prototype.makeSignature = function makeSignature(sig) {
if (sig instanceof Signature)
return sig;
return new Signature(this, sig);
};
/**
* * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03#section-5.2
*
* EDDSA defines methods for encoding and decoding points and integers. These are
* helper convenience methods, that pass along to utility functions implied
* parameters.
*
*/
EDDSA.prototype.encodePoint = function encodePoint(point) {
var enc = point.getY().toArray('le', this.encodingLength);
enc[this.encodingLength - 1] |= point.getX().isOdd() ? 0x80 : 0;
return enc;
};
EDDSA.prototype.decodePoint = function decodePoint(bytes) {
bytes = utils.parseBytes(bytes);
var lastIx = bytes.length - 1;
var normed = bytes.slice(0, lastIx).concat(bytes[lastIx] & ~0x80);
var xIsOdd = (bytes[lastIx] & 0x80) !== 0;
var y = utils.intFromLE(normed);
return this.curve.pointFromY(y, xIsOdd);
};
EDDSA.prototype.encodeInt = function encodeInt(num) {
return num.toArray('le', this.encodingLength);
};
EDDSA.prototype.decodeInt = function decodeInt(bytes) {
return utils.intFromLE(bytes);
};
EDDSA.prototype.isPoint = function isPoint(val) {
return val instanceof this.pointClass;
};
},{"../../elliptic":85,"./key":96,"./signature":97,"hash.js":104}],96:[function(require,module,exports){
'use strict';
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
var assert = utils.assert;
var parseBytes = utils.parseBytes;
var cachedProperty = utils.cachedProperty;
/**
* @param {EDDSA} eddsa - instance
* @param {Object} params - public/private key parameters
*
* @param {Array<Byte>} [params.secret] - secret seed bytes
* @param {Point} [params.pub] - public key point (aka `A` in eddsa terms)
* @param {Array<Byte>} [params.pub] - public key point encoded as bytes
*
*/
function KeyPair(eddsa, params) {
this.eddsa = eddsa;
this._secret = parseBytes(params.secret);
if (eddsa.isPoint(params.pub))
this._pub = params.pub;
else
this._pubBytes = parseBytes(params.pub);
}
KeyPair.fromPublic = function fromPublic(eddsa, pub) {
if (pub instanceof KeyPair)
return pub;
return new KeyPair(eddsa, { pub: pub });
};
KeyPair.fromSecret = function fromSecret(eddsa, secret) {
if (secret instanceof KeyPair)
return secret;
return new KeyPair(eddsa, { secret: secret });
};
KeyPair.prototype.secret = function secret() {
return this._secret;
};
cachedProperty(KeyPair, 'pubBytes', function pubBytes() {
return this.eddsa.encodePoint(this.pub());
});
cachedProperty(KeyPair, 'pub', function pub() {
if (this._pubBytes)
return this.eddsa.decodePoint(this._pubBytes);
return this.eddsa.g.mul(this.priv());
});
cachedProperty(KeyPair, 'privBytes', function privBytes() {
var eddsa = this.eddsa;
var hash = this.hash();
var lastIx = eddsa.encodingLength - 1;
var a = hash.slice(0, eddsa.encodingLength);
a[0] &= 248;
a[lastIx] &= 127;
a[lastIx] |= 64;
return a;
});
cachedProperty(KeyPair, 'priv', function priv() {
return this.eddsa.decodeInt(this.privBytes());
});
cachedProperty(KeyPair, 'hash', function hash() {
return this.eddsa.hash().update(this.secret()).digest();
});
cachedProperty(KeyPair, 'messagePrefix', function messagePrefix() {
return this.hash().slice(this.eddsa.encodingLength);
});
KeyPair.prototype.sign = function sign(message) {
assert(this._secret, 'KeyPair can only verify');
return this.eddsa.sign(message, this);
};
KeyPair.prototype.verify = function verify(message, sig) {
return this.eddsa.verify(message, sig, this);
};
KeyPair.prototype.getSecret = function getSecret(enc) {
assert(this._secret, 'KeyPair is public only');
return utils.encode(this.secret(), enc);
};
KeyPair.prototype.getPublic = function getPublic(enc) {
return utils.encode(this.pubBytes(), enc);
};
module.exports = KeyPair;
},{"../../elliptic":85}],97:[function(require,module,exports){
'use strict';
var BN = require('bn.js');
var elliptic = require('../../elliptic');
var utils = elliptic.utils;
var assert = utils.assert;
var cachedProperty = utils.cachedProperty;
var parseBytes = utils.parseBytes;
/**
* @param {EDDSA} eddsa - eddsa instance
* @param {Array<Bytes>|Object} sig -
* @param {Array<Bytes>|Point} [sig.R] - R point as Point or bytes
* @param {Array<Bytes>|bn} [sig.S] - S scalar as bn or bytes
* @param {Array<Bytes>} [sig.Rencoded] - R point encoded
* @param {Array<Bytes>} [sig.Sencoded] - S scalar encoded
*/
function Signature(eddsa, sig) {
this.eddsa = eddsa;
if (typeof sig !== 'object')
sig = parseBytes(sig);
if (Array.isArray(sig)) {
sig = {
R: sig.slice(0, eddsa.encodingLength),
S: sig.slice(eddsa.encodingLength)
};
}
assert(sig.R && sig.S, 'Signature without R or S');
if (eddsa.isPoint(sig.R))
this._R = sig.R;
if (sig.S instanceof BN)
this._S = sig.S;
this._Rencoded = Array.isArray(sig.R) ? sig.R : sig.Rencoded;
this._Sencoded = Array.isArray(sig.S) ? sig.S : sig.Sencoded;
}
cachedProperty(Signature, 'S', function S() {
return this.eddsa.decodeInt(this.Sencoded());
});
cachedProperty(Signature, 'R', function R() {
return this.eddsa.decodePoint(this.Rencoded());
});
cachedProperty(Signature, 'Rencoded', function Rencoded() {
return this.eddsa.encodePoint(this.R());
});
cachedProperty(Signature, 'Sencoded', function Sencoded() {
return this.eddsa.encodeInt(this.S());
});
Signature.prototype.toBytes = function toBytes() {
return this.Rencoded().concat(this.Sencoded());
};
Signature.prototype.toHex = function toHex() {
return utils.encode(this.toBytes(), 'hex').toUpperCase();
};
module.exports = Signature;
},{"../../elliptic":85,"bn.js":34}],98:[function(require,module,exports){
module.exports = {
doubles: {
step: 4,
points: [
[
'e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a',
'f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821'
],
[
'8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508',
'11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf'
],
[
'175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739',
'd3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695'
],
[
'363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640',
'4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9'
],
[
'8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c',
'4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36'
],
[
'723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda',
'96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f'
],
[
'eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa',
'5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999'
],
[
'100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0',
'cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09'
],
[
'e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d',
'9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d'
],
[
'feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d',
'e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088'
],
[
'da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1',
'9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d'
],
[
'53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0',
'5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8'
],
[
'8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047',
'10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a'
],
[
'385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862',
'283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453'
],
[
'6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7',
'7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160'
],
[
'3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd',
'56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0'
],
[
'85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83',
'7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6'
],
[
'948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a',
'53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589'
],
[
'6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8',
'bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17'
],
[
'e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d',
'4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda'
],
[
'e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725',
'7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd'
],
[
'213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754',
'4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2'
],
[
'4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c',
'17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6'
],
[
'fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6',
'6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f'
],
[
'76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39',
'c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01'
],
[
'c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891',
'893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3'
],
[
'd895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b',
'febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f'
],
[
'b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03',
'2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7'
],
[
'e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d',
'eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78'
],
[
'a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070',
'7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1'
],
[
'90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4',
'e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150'
],
[
'8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da',
'662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82'
],
[
'e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11',
'1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc'
],
[
'8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e',
'efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b'
],
[
'e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41',
'2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51'
],
[
'b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef',
'67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45'
],
[
'd68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8',
'db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120'
],
[
'324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d',
'648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84'
],
[
'4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96',
'35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d'
],
[
'9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd',
'ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d'
],
[
'6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5',
'9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8'
],
[
'a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266',
'40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8'
],
[
'7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71',
'34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac'
],
[
'928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac',
'c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f'
],
[
'85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751',
'1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962'
],
[
'ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e',
'493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907'
],
[
'827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241',
'c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec'
],
[
'eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3',
'be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d'
],
[
'e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f',
'4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414'
],
[
'1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19',
'aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd'
],
[
'146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be',
'b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0'
],
[
'fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9',
'6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811'
],
[
'da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2',
'8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1'
],
[
'a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13',
'7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c'
],
[
'174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c',
'ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73'
],
[
'959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba',
'2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd'
],
[
'd2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151',
'e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405'
],
[
'64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073',
'd99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589'
],
[
'8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458',
'38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e'
],
[
'13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b',
'69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27'
],
[
'bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366',
'd3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1'
],
[
'8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa',
'40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482'
],
[
'8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0',
'620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945'
],
[
'dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787',
'7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573'
],
[
'f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e',
'ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82'
]
]
},
naf: {
wnd: 7,
points: [
[
'f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9',
'388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672'
],
[
'2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4',
'd8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6'
],
[
'5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc',
'6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da'
],
[
'acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe',
'cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37'
],
[
'774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb',
'd984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b'
],
[
'f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8',
'ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81'
],
[
'd7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e',
'581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58'
],
[
'defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34',
'4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77'
],
[
'2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c',
'85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a'
],
[
'352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5',
'321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c'
],
[
'2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f',
'2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67'
],
[
'9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714',
'73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402'
],
[
'daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729',
'a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55'
],
[
'c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db',
'2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482'
],
[
'6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4',
'e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82'
],
[
'1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5',
'b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396'
],
[
'605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479',
'2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49'
],
[
'62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d',
'80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf'
],
[
'80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f',
'1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a'
],
[
'7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb',
'd0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7'
],
[
'd528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9',
'eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933'
],
[
'49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963',
'758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a'
],
[
'77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74',
'958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6'
],
[
'f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530',
'e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37'
],
[
'463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b',
'5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e'
],
[
'f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247',
'cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6'
],
[
'caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1',
'cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476'
],
[
'2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120',
'4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40'
],
[
'7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435',
'91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61'
],
[
'754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18',
'673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683'
],
[
'e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8',
'59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5'
],
[
'186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb',
'3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b'
],
[
'df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f',
'55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417'
],
[
'5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143',
'efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868'
],
[
'290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba',
'e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a'
],
[
'af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45',
'f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6'
],
[
'766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a',
'744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996'
],
[
'59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e',
'c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e'
],
[
'f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8',
'e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d'
],
[
'7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c',
'30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2'
],
[
'948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519',
'e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e'
],
[
'7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab',
'100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437'
],
[
'3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca',
'ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311'
],
[
'd3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf',
'8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4'
],
[
'1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610',
'68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575'
],
[
'733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4',
'f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d'
],
[
'15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c',
'd56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d'
],
[
'a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940',
'edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629'
],
[
'e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980',
'a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06'
],
[
'311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3',
'66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374'
],
[
'34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf',
'9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee'
],
[
'f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63',
'4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1'
],
[
'd7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448',
'fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b'
],
[
'32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf',
'5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661'
],
[
'7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5',
'8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6'
],
[
'ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6',
'8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e'
],
[
'16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5',
'5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d'
],
[
'eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99',
'f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc'
],
[
'78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51',
'f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4'
],
[
'494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5',
'42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c'
],
[
'a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5',
'204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b'
],
[
'c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997',
'4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913'
],
[
'841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881',
'73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154'
],
[
'5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5',
'39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865'
],
[
'36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66',
'd2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc'
],
[
'336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726',
'ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224'
],
[
'8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede',
'6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e'
],
[
'1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94',
'60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6'
],
[
'85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31',
'3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511'
],
[
'29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51',
'b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b'
],
[
'a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252',
'ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2'
],
[
'4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5',
'cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c'
],
[
'd24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b',
'6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3'
],
[
'ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4',
'322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d'
],
[
'af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f',
'6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700'
],
[
'e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889',
'2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4'
],
[
'591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246',
'b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196'
],
[
'11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984',
'998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4'
],
[
'3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a',
'b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257'
],
[
'cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030',
'bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13'
],
[
'c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197',
'6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096'
],
[
'c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593',
'c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38'
],
[
'a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef',
'21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f'
],
[
'347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38',
'60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448'
],
[
'da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a',
'49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a'
],
[
'c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111',
'5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4'
],
[
'4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502',
'7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437'
],
[
'3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea',
'be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7'
],
[
'cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26',
'8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d'
],
[
'b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986',
'39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a'
],
[
'd4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e',
'62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54'
],
[
'48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4',
'25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77'
],
[
'dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda',
'ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517'
],
[
'6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859',
'cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10'
],
[
'e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f',
'f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125'
],
[
'eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c',
'6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e'
],
[
'13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942',
'fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1'
],
[
'ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a',
'1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2'
],
[
'b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80',
'5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423'
],
[
'ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d',
'438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8'
],
[
'8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1',
'cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758'
],
[
'52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63',
'c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375'
],
[
'e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352',
'6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d'
],
[
'7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193',
'ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec'
],
[
'5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00',
'9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0'
],
[
'32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58',
'ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c'
],
[
'e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7',
'd3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4'
],
[
'8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8',
'c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f'
],
[
'4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e',
'67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649'
],
[
'3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d',
'cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826'
],
[
'674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b',
'299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5'
],
[
'd32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f',
'f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87'
],
[
'30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6',
'462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b'
],
[
'be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297',
'62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc'
],
[
'93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a',
'7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c'
],
[
'b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c',
'ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f'
],
[
'd5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52',
'4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a'
],
[
'd3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb',
'bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46'
],
[
'463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065',
'bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f'
],
[
'7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917',
'603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03'
],
[
'74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9',
'cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08'
],
[
'30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3',
'553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8'
],
[
'9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57',
'712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373'
],
[
'176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66',
'ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3'
],
[
'75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8',
'9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8'
],
[
'809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721',
'9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1'
],
[
'1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180',
'4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9'
]
]
}
};
},{}],99:[function(require,module,exports){
'use strict';
var utils = exports;
var BN = require('bn.js');
var minAssert = require('minimalistic-assert');
var minUtils = require('minimalistic-crypto-utils');
utils.assert = minAssert;
utils.toArray = minUtils.toArray;
utils.zero2 = minUtils.zero2;
utils.toHex = minUtils.toHex;
utils.encode = minUtils.encode;
// Represent num in a w-NAF form
function getNAF(num, w) {
var naf = [];
var ws = 1 << (w + 1);
var k = num.clone();
while (k.cmpn(1) >= 0) {
var z;
if (k.isOdd()) {
var mod = k.andln(ws - 1);
if (mod > (ws >> 1) - 1)
z = (ws >> 1) - mod;
else
z = mod;
k.isubn(z);
} else {
z = 0;
}
naf.push(z);
// Optimization, shift by word if possible
var shift = (k.cmpn(0) !== 0 && k.andln(ws - 1) === 0) ? (w + 1) : 1;
for (var i = 1; i < shift; i++)
naf.push(0);
k.iushrn(shift);
}
return naf;
}
utils.getNAF = getNAF;
// Represent k1, k2 in a Joint Sparse Form
function getJSF(k1, k2) {
var jsf = [
[],
[]
];
k1 = k1.clone();
k2 = k2.clone();
var d1 = 0;
var d2 = 0;
while (k1.cmpn(-d1) > 0 || k2.cmpn(-d2) > 0) {
// First phase
var m14 = (k1.andln(3) + d1) & 3;
var m24 = (k2.andln(3) + d2) & 3;
if (m14 === 3)
m14 = -1;
if (m24 === 3)
m24 = -1;
var u1;
if ((m14 & 1) === 0) {
u1 = 0;
} else {
var m8 = (k1.andln(7) + d1) & 7;
if ((m8 === 3 || m8 === 5) && m24 === 2)
u1 = -m14;
else
u1 = m14;
}
jsf[0].push(u1);
var u2;
if ((m24 & 1) === 0) {
u2 = 0;
} else {
var m8 = (k2.andln(7) + d2) & 7;
if ((m8 === 3 || m8 === 5) && m14 === 2)
u2 = -m24;
else
u2 = m24;
}
jsf[1].push(u2);
// Second phase
if (2 * d1 === u1 + 1)
d1 = 1 - d1;
if (2 * d2 === u2 + 1)
d2 = 1 - d2;
k1.iushrn(1);
k2.iushrn(1);
}
return jsf;
}
utils.getJSF = getJSF;
function cachedProperty(obj, name, computer) {
var key = '_' + name;
obj.prototype[name] = function cachedProperty() {
return this[key] !== undefined ? this[key] :
this[key] = computer.call(this);
};
}
utils.cachedProperty = cachedProperty;
function parseBytes(bytes) {
return typeof bytes === 'string' ? utils.toArray(bytes, 'hex') :
bytes;
}
utils.parseBytes = parseBytes;
function intFromLE(bytes) {
return new BN(bytes, 'hex', 'le');
}
utils.intFromLE = intFromLE;
},{"bn.js":34,"minimalistic-assert":125,"minimalistic-crypto-utils":126}],100:[function(require,module,exports){
module.exports={
"_args": [
[
{
"raw": "elliptic@^6.0.0",
"scope": null,
"escapedName": "elliptic",
"name": "elliptic",
"rawSpec": "^6.0.0",
"spec": ">=6.0.0 <7.0.0",
"type": "range"
},
"/usr/lib/node_modules/browserify/node_modules/browserify-sign"
]
],
"_from": "elliptic@>=6.0.0 <7.0.0",
"_id": "elliptic@6.4.0",
"_inCache": true,
"_location": "/browserify/elliptic",
"_nodeVersion": "7.0.0",
"_npmOperationalInternal": {
"host": "packages-18-east.internal.npmjs.com",
"tmp": "tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"
},
"_npmUser": {
"name": "indutny",
"email": "fedor@indutny.com"
},
"_npmVersion": "3.10.8",
"_phantomChildren": {},
"_requested": {
"raw": "elliptic@^6.0.0",
"scope": null,
"escapedName": "elliptic",
"name": "elliptic",
"rawSpec": "^6.0.0",
"spec": ">=6.0.0 <7.0.0",
"type": "range"
},
"_requiredBy": [
"/browserify/browserify-sign",
"/browserify/create-ecdh"
],
"_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",
"_shasum": "cac9af8762c85836187003c8dfe193e5e2eae5df",
"_shrinkwrap": null,
"_spec": "elliptic@^6.0.0",
"_where": "/usr/lib/node_modules/browserify/node_modules/browserify-sign",
"author": {
"name": "Fedor Indutny",
"email": "fedor@indutny.com"
},
"bugs": {
"url": "https://github.com/indutny/elliptic/issues"
},
"dependencies": {
"bn.js": "^4.4.0",
"brorand": "^1.0.1",
"hash.js": "^1.0.0",
"hmac-drbg": "^1.0.0",
"inherits": "^2.0.1",
"minimalistic-assert": "^1.0.0",
"minimalistic-crypto-utils": "^1.0.0"
},
"description": "EC cryptography",
"devDependencies": {
"brfs": "^1.4.3",
"coveralls": "^2.11.3",
"grunt": "^0.4.5",
"grunt-browserify": "^5.0.0",
"grunt-cli": "^1.2.0",
"grunt-contrib-connect": "^1.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-uglify": "^1.0.1",
"grunt-mocha-istanbul": "^3.0.1",
"grunt-saucelabs": "^8.6.2",
"istanbul": "^0.4.2",
"jscs": "^2.9.0",
"jshint": "^2.6.0",
"mocha": "^2.1.0"
},
"directories": {},
"dist": {
"shasum": "cac9af8762c85836187003c8dfe193e5e2eae5df",
"tarball": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"
},
"files": [
"lib"
],
"gitHead": "6b0d2b76caae91471649c8e21f0b1d3ba0f96090",
"homepage": "https://github.com/indutny/elliptic",
"keywords": [
"EC",
"Elliptic",
"curve",
"Cryptography"
],
"license": "MIT",
"main": "lib/elliptic.js",
"maintainers": [
{
"name": "indutny",
"email": "fedor@indutny.com"
}
],
"name": "elliptic",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/indutny/elliptic.git"
},
"scripts": {
"jscs": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",
"jshint": "jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",
"lint": "npm run jscs && npm run jshint",
"test": "npm run lint && npm run unit",
"unit": "istanbul test _mocha --reporter=spec test/index.js",
"version": "grunt dist && git add dist/"
},
"version": "6.4.0"
}
},{}],101:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
function EventEmitter() {
this._events = this._events || {};
this._maxListeners = this._maxListeners || undefined;
}
module.exports = EventEmitter;
// Backwards-compat with node 0.10.x
EventEmitter.EventEmitter = EventEmitter;
EventEmitter.prototype._events = undefined;
EventEmitter.prototype._maxListeners = undefined;
// By default EventEmitters will print a warning if more than 10 listeners are
// added to it. This is a useful default which helps finding memory leaks.
EventEmitter.defaultMaxListeners = 10;
// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.setMaxListeners = function(n) {
if (!isNumber(n) || n < 0 || isNaN(n))
throw TypeError('n must be a positive number');
this._maxListeners = n;
return this;
};
EventEmitter.prototype.emit = function(type) {
var er, handler, len, args, i, listeners;
if (!this._events)
this._events = {};
// If there is no 'error' event listener then throw.
if (type === 'error') {
if (!this._events.error ||
(isObject(this._events.error) && !this._events.error.length)) {
er = arguments[1];
if (er instanceof Error) {
throw er; // Unhandled 'error' event
} else {
// At least give some kind of context to the user
var err = new Error('Uncaught, unspecified "error" event. (' + er + ')');
err.context = er;
throw err;
}
}
}
handler = this._events[type];
if (isUndefined(handler))
return false;
if (isFunction(handler)) {
switch (arguments.length) {
// fast cases
case 1:
handler.call(this);
break;
case 2:
handler.call(this, arguments[1]);
break;
case 3:
handler.call(this, arguments[1], arguments[2]);
break;
// slower
default:
args = Array.prototype.slice.call(arguments, 1);
handler.apply(this, args);
}
} else if (isObject(handler)) {
args = Array.prototype.slice.call(arguments, 1);
listeners = handler.slice();
len = listeners.length;
for (i = 0; i < len; i++)
listeners[i].apply(this, args);
}
return true;
};
EventEmitter.prototype.addListener = function(type, listener) {
var m;
if (!isFunction(listener))
throw TypeError('listener must be a function');
if (!this._events)
this._events = {};
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (this._events.newListener)
this.emit('newListener', type,
isFunction(listener.listener) ?
listener.listener : listener);
if (!this._events[type])
// Optimize the case of one listener. Don't need the extra array object.
this._events[type] = listener;
else if (isObject(this._events[type]))
// If we've already got an array, just append.
this._events[type].push(listener);
else
// Adding the second element, need to change to array.
this._events[type] = [this._events[type], listener];
// Check for listener leak
if (isObject(this._events[type]) && !this._events[type].warned) {
if (!isUndefined(this._maxListeners)) {
m = this._maxListeners;
} else {
m = EventEmitter.defaultMaxListeners;
}
if (m && m > 0 && this._events[type].length > m) {
this._events[type].warned = true;
console.error('(node) warning: possible EventEmitter memory ' +
'leak detected. %d listeners added. ' +
'Use emitter.setMaxListeners() to increase limit.',
this._events[type].length);
if (typeof console.trace === 'function') {
// not supported in IE 10
console.trace();
}
}
}
return this;
};
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
EventEmitter.prototype.once = function(type, listener) {
if (!isFunction(listener))
throw TypeError('listener must be a function');
var fired = false;
function g() {
this.removeListener(type, g);
if (!fired) {
fired = true;
listener.apply(this, arguments);
}
}
g.listener = listener;
this.on(type, g);
return this;
};
// emits a 'removeListener' event iff the listener was removed
EventEmitter.prototype.removeListener = function(type, listener) {
var list, position, length, i;
if (!isFunction(listener))
throw TypeError('listener must be a function');
if (!this._events || !this._events[type])
return this;
list = this._events[type];
length = list.length;
position = -1;
if (list === listener ||
(isFunction(list.listener) && list.listener === listener)) {
delete this._events[type];
if (this._events.removeListener)
this.emit('removeListener', type, listener);
} else if (isObject(list)) {
for (i = length; i-- > 0;) {
if (list[i] === listener ||
(list[i].listener && list[i].listener === listener)) {
position = i;
break;
}
}
if (position < 0)
return this;
if (list.length === 1) {
list.length = 0;
delete this._events[type];
} else {
list.splice(position, 1);
}
if (this._events.removeListener)
this.emit('removeListener', type, listener);
}
return this;
};
EventEmitter.prototype.removeAllListeners = function(type) {
var key, listeners;
if (!this._events)
return this;
// not listening for removeListener, no need to emit
if (!this._events.removeListener) {
if (arguments.length === 0)
this._events = {};
else if (this._events[type])
delete this._events[type];
return this;
}
// emit removeListener for all listeners on all events
if (arguments.length === 0) {
for (key in this._events) {
if (key === 'removeListener') continue;
this.removeAllListeners(key);
}
this.removeAllListeners('removeListener');
this._events = {};
return this;
}
listeners = this._events[type];
if (isFunction(listeners)) {
this.removeListener(type, listeners);
} else if (listeners) {
// LIFO order
while (listeners.length)
this.removeListener(type, listeners[listeners.length - 1]);
}
delete this._events[type];
return this;
};
EventEmitter.prototype.listeners = function(type) {
var ret;
if (!this._events || !this._events[type])
ret = [];
else if (isFunction(this._events[type]))
ret = [this._events[type]];
else
ret = this._events[type].slice();
return ret;
};
EventEmitter.prototype.listenerCount = function(type) {
if (this._events) {
var evlistener = this._events[type];
if (isFunction(evlistener))
return 1;
else if (evlistener)
return evlistener.length;
}
return 0;
};
EventEmitter.listenerCount = function(emitter, type) {
return emitter.listenerCount(type);
};
function isFunction(arg) {
return typeof arg === 'function';
}
function isNumber(arg) {
return typeof arg === 'number';
}
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
function isUndefined(arg) {
return arg === void 0;
}
},{}],102:[function(require,module,exports){
var Buffer = require('safe-buffer').Buffer
var MD5 = require('md5.js')
/* eslint-disable camelcase */
function EVP_BytesToKey (password, salt, keyBits, ivLen) {
if (!Buffer.isBuffer(password)) password = Buffer.from(password, 'binary')
if (salt) {
if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, 'binary')
if (salt.length !== 8) throw new RangeError('salt should be Buffer with 8 byte length')
}
var keyLen = keyBits / 8
var key = Buffer.alloc(keyLen)
var iv = Buffer.alloc(ivLen || 0)
var tmp = Buffer.alloc(0)
while (keyLen > 0 || ivLen > 0) {
var hash = new MD5()
hash.update(tmp)
hash.update(password)
if (salt) hash.update(salt)
tmp = hash.digest()
var used = 0
if (keyLen > 0) {
var keyStart = key.length - keyLen
used = Math.min(keyLen, tmp.length)
tmp.copy(key, keyStart, 0, used)
keyLen -= used
}
if (used < tmp.length && ivLen > 0) {
var ivStart = iv.length - ivLen
var length = Math.min(ivLen, tmp.length - used)
tmp.copy(iv, ivStart, used, used + length)
ivLen -= length
}
}
tmp.fill(0)
return { key: key, iv: iv }
}
module.exports = EVP_BytesToKey
},{"md5.js":122,"safe-buffer":160}],103:[function(require,module,exports){
(function (Buffer){
'use strict'
var Transform = require('stream').Transform
var inherits = require('inherits')
function HashBase (blockSize) {
Transform.call(this)
this._block = new Buffer(blockSize)
this._blockSize = blockSize
this._blockOffset = 0
this._length = [0, 0, 0, 0]
this._finalized = false
}
inherits(HashBase, Transform)
HashBase.prototype._transform = function (chunk, encoding, callback) {
var error = null
try {
if (encoding !== 'buffer') chunk = new Buffer(chunk, encoding)
this.update(chunk)
} catch (err) {
error = err
}
callback(error)
}
HashBase.prototype._flush = function (callback) {
var error = null
try {
this.push(this._digest())
} catch (err) {
error = err
}
callback(error)
}
HashBase.prototype.update = function (data, encoding) {
if (!Buffer.isBuffer(data) && typeof data !== 'string') throw new TypeError('Data must be a string or a buffer')
if (this._finalized) throw new Error('Digest already called')
if (!Buffer.isBuffer(data)) data = new Buffer(data, encoding || 'binary')
// consume data
var block = this._block
var offset = 0
while (this._blockOffset + data.length - offset >= this._blockSize) {
for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
this._update()
this._blockOffset = 0
}
while (offset < data.length) block[this._blockOffset++] = data[offset++]
// update length
for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
this._length[j] += carry
carry = (this._length[j] / 0x0100000000) | 0
if (carry > 0) this._length[j] -= 0x0100000000 * carry
}
return this
}
HashBase.prototype._update = function (data) {
throw new Error('_update is not implemented')
}
HashBase.prototype.digest = function (encoding) {
if (this._finalized) throw new Error('Digest already called')
this._finalized = true
var digest = this._digest()
if (encoding !== undefined) digest = digest.toString(encoding)
return digest
}
HashBase.prototype._digest = function () {
throw new Error('_digest is not implemented')
}
module.exports = HashBase
}).call(this,require("buffer").Buffer)
},{"buffer":65,"inherits":119,"stream":169}],104:[function(require,module,exports){
var hash = exports;
hash.utils = require('./hash/utils');
hash.common = require('./hash/common');
hash.sha = require('./hash/sha');
hash.ripemd = require('./hash/ripemd');
hash.hmac = require('./hash/hmac');
// Proxy hash functions to the main object
hash.sha1 = hash.sha.sha1;
hash.sha256 = hash.sha.sha256;
hash.sha224 = hash.sha.sha224;
hash.sha384 = hash.sha.sha384;
hash.sha512 = hash.sha.sha512;
hash.ripemd160 = hash.ripemd.ripemd160;
},{"./hash/common":105,"./hash/hmac":106,"./hash/ripemd":107,"./hash/sha":108,"./hash/utils":115}],105:[function(require,module,exports){
'use strict';
var utils = require('./utils');
var assert = require('minimalistic-assert');
function BlockHash() {
this.pending = null;
this.pendingTotal = 0;
this.blockSize = this.constructor.blockSize;
this.outSize = this.constructor.outSize;
this.hmacStrength = this.constructor.hmacStrength;
this.padLength = this.constructor.padLength / 8;
this.endian = 'big';
this._delta8 = this.blockSize / 8;
this._delta32 = this.blockSize / 32;
}
exports.BlockHash = BlockHash;
BlockHash.prototype.update = function update(msg, enc) {
// Convert message to array, pad it, and join into 32bit blocks
msg = utils.toArray(msg, enc);
if (!this.pending)
this.pending = msg;
else
this.pending = this.pending.concat(msg);
this.pendingTotal += msg.length;
// Enough data, try updating
if (this.pending.length >= this._delta8) {
msg = this.pending;
// Process pending data in blocks
var r = msg.length % this._delta8;
this.pending = msg.slice(msg.length - r, msg.length);
if (this.pending.length === 0)
this.pending = null;
msg = utils.join32(msg, 0, msg.length - r, this.endian);
for (var i = 0; i < msg.length; i += this._delta32)
this._update(msg, i, i + this._delta32);
}
return this;
};
BlockHash.prototype.digest = function digest(enc) {
this.update(this._pad());
assert(this.pending === null);
return this._digest(enc);
};
BlockHash.prototype._pad = function pad() {
var len = this.pendingTotal;
var bytes = this._delta8;
var k = bytes - ((len + this.padLength) % bytes);
var res = new Array(k + this.padLength);
res[0] = 0x80;
for (var i = 1; i < k; i++)
res[i] = 0;
// Append length
len <<= 3;
if (this.endian === 'big') {
for (var t = 8; t < this.padLength; t++)
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = (len >>> 24) & 0xff;
res[i++] = (len >>> 16) & 0xff;
res[i++] = (len >>> 8) & 0xff;
res[i++] = len & 0xff;
} else {
res[i++] = len & 0xff;
res[i++] = (len >>> 8) & 0xff;
res[i++] = (len >>> 16) & 0xff;
res[i++] = (len >>> 24) & 0xff;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
for (t = 8; t < this.padLength; t++)
res[i++] = 0;
}
return res;
};
},{"./utils":115,"minimalistic-assert":125}],106:[function(require,module,exports){
'use strict';
var utils = require('./utils');
var assert = require('minimalistic-assert');
function Hmac(hash, key, enc) {
if (!(this instanceof Hmac))
return new Hmac(hash, key, enc);
this.Hash = hash;
this.blockSize = hash.blockSize / 8;
this.outSize = hash.outSize / 8;
this.inner = null;
this.outer = null;
this._init(utils.toArray(key, enc));
}
module.exports = Hmac;
Hmac.prototype._init = function init(key) {
// Shorten key, if needed
if (key.length > this.blockSize)
key = new this.Hash().update(key).digest();
assert(key.length <= this.blockSize);
// Add padding to key
for (var i = key.length; i < this.blockSize; i++)
key.push(0);
for (i = 0; i < key.length; i++)
key[i] ^= 0x36;
this.inner = new this.Hash().update(key);
// 0x36 ^ 0x5c = 0x6a
for (i = 0; i < key.length; i++)
key[i] ^= 0x6a;
this.outer = new this.Hash().update(key);
};
Hmac.prototype.update = function update(msg, enc) {
this.inner.update(msg, enc);
return this;
};
Hmac.prototype.digest = function digest(enc) {
this.outer.update(this.inner.digest());
return this.outer.digest(enc);
};
},{"./utils":115,"minimalistic-assert":125}],107:[function(require,module,exports){
'use strict';
var utils = require('./utils');
var common = require('./common');
var rotl32 = utils.rotl32;
var sum32 = utils.sum32;
var sum32_3 = utils.sum32_3;
var sum32_4 = utils.sum32_4;
var BlockHash = common.BlockHash;
function RIPEMD160() {
if (!(this instanceof RIPEMD160))
return new RIPEMD160();
BlockHash.call(this);
this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];
this.endian = 'little';
}
utils.inherits(RIPEMD160, BlockHash);
exports.ripemd160 = RIPEMD160;
RIPEMD160.blockSize = 512;
RIPEMD160.outSize = 160;
RIPEMD160.hmacStrength = 192;
RIPEMD160.padLength = 64;
RIPEMD160.prototype._update = function update(msg, start) {
var A = this.h[0];
var B = this.h[1];
var C = this.h[2];
var D = this.h[3];
var E = this.h[4];
var Ah = A;
var Bh = B;
var Ch = C;
var Dh = D;
var Eh = E;
for (var j = 0; j < 80; j++) {
var T = sum32(
rotl32(
sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),
s[j]),
E);
A = E;
E = D;
D = rotl32(C, 10);
C = B;
B = T;
T = sum32(
rotl32(
sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),
sh[j]),
Eh);
Ah = Eh;
Eh = Dh;
Dh = rotl32(Ch, 10);
Ch = Bh;
Bh = T;
}
T = sum32_3(this.h[1], C, Dh);
this.h[1] = sum32_3(this.h[2], D, Eh);
this.h[2] = sum32_3(this.h[3], E, Ah);
this.h[3] = sum32_3(this.h[4], A, Bh);
this.h[4] = sum32_3(this.h[0], B, Ch);
this.h[0] = T;
};
RIPEMD160.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'little');
else
return utils.split32(this.h, 'little');
};
function f(j, x, y, z) {
if (j <= 15)
return x ^ y ^ z;
else if (j <= 31)
return (x & y) | ((~x) & z);
else if (j <= 47)
return (x | (~y)) ^ z;
else if (j <= 63)
return (x & z) | (y & (~z));
else
return x ^ (y | (~z));
}
function K(j) {
if (j <= 15)
return 0x00000000;
else if (j <= 31)
return 0x5a827999;
else if (j <= 47)
return 0x6ed9eba1;
else if (j <= 63)
return 0x8f1bbcdc;
else
return 0xa953fd4e;
}
function Kh(j) {
if (j <= 15)
return 0x50a28be6;
else if (j <= 31)
return 0x5c4dd124;
else if (j <= 47)
return 0x6d703ef3;
else if (j <= 63)
return 0x7a6d76e9;
else
return 0x00000000;
}
var r = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
];
var rh = [
5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
];
var s = [
11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
];
var sh = [
8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
];
},{"./common":105,"./utils":115}],108:[function(require,module,exports){
'use strict';
exports.sha1 = require('./sha/1');
exports.sha224 = require('./sha/224');
exports.sha256 = require('./sha/256');
exports.sha384 = require('./sha/384');
exports.sha512 = require('./sha/512');
},{"./sha/1":109,"./sha/224":110,"./sha/256":111,"./sha/384":112,"./sha/512":113}],109:[function(require,module,exports){
'use strict';
var utils = require('../utils');
var common = require('../common');
var shaCommon = require('./common');
var rotl32 = utils.rotl32;
var sum32 = utils.sum32;
var sum32_5 = utils.sum32_5;
var ft_1 = shaCommon.ft_1;
var BlockHash = common.BlockHash;
var sha1_K = [
0x5A827999, 0x6ED9EBA1,
0x8F1BBCDC, 0xCA62C1D6
];
function SHA1() {
if (!(this instanceof SHA1))
return new SHA1();
BlockHash.call(this);
this.h = [
0x67452301, 0xefcdab89, 0x98badcfe,
0x10325476, 0xc3d2e1f0 ];
this.W = new Array(80);
}
utils.inherits(SHA1, BlockHash);
module.exports = SHA1;
SHA1.blockSize = 512;
SHA1.outSize = 160;
SHA1.hmacStrength = 80;
SHA1.padLength = 64;
SHA1.prototype._update = function _update(msg, start) {
var W = this.W;
for (var i = 0; i < 16; i++)
W[i] = msg[start + i];
for(; i < W.length; i++)
W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
var a = this.h[0];
var b = this.h[1];
var c = this.h[2];
var d = this.h[3];
var e = this.h[4];
for (i = 0; i < W.length; i++) {
var s = ~~(i / 20);
var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);
e = d;
d = c;
c = rotl32(b, 30);
b = a;
a = t;
}
this.h[0] = sum32(this.h[0], a);
this.h[1] = sum32(this.h[1], b);
this.h[2] = sum32(this.h[2], c);
this.h[3] = sum32(this.h[3], d);
this.h[4] = sum32(this.h[4], e);
};
SHA1.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
},{"../common":105,"../utils":115,"./common":114}],110:[function(require,module,exports){
'use strict';
var utils = require('../utils');
var SHA256 = require('./256');
function SHA224() {
if (!(this instanceof SHA224))
return new SHA224();
SHA256.call(this);
this.h = [
0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];
}
utils.inherits(SHA224, SHA256);
module.exports = SHA224;
SHA224.blockSize = 512;
SHA224.outSize = 224;
SHA224.hmacStrength = 192;
SHA224.padLength = 64;
SHA224.prototype._digest = function digest(enc) {
// Just truncate output
if (enc === 'hex')
return utils.toHex32(this.h.slice(0, 7), 'big');
else
return utils.split32(this.h.slice(0, 7), 'big');
};
},{"../utils":115,"./256":111}],111:[function(require,module,exports){
'use strict';
var utils = require('../utils');
var common = require('../common');
var shaCommon = require('./common');
var assert = require('minimalistic-assert');
var sum32 = utils.sum32;
var sum32_4 = utils.sum32_4;
var sum32_5 = utils.sum32_5;
var ch32 = shaCommon.ch32;
var maj32 = shaCommon.maj32;
var s0_256 = shaCommon.s0_256;
var s1_256 = shaCommon.s1_256;
var g0_256 = shaCommon.g0_256;
var g1_256 = shaCommon.g1_256;
var BlockHash = common.BlockHash;
var sha256_K = [
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
];
function SHA256() {
if (!(this instanceof SHA256))
return new SHA256();
BlockHash.call(this);
this.h = [
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
];
this.k = sha256_K;
this.W = new Array(64);
}
utils.inherits(SHA256, BlockHash);
module.exports = SHA256;
SHA256.blockSize = 512;
SHA256.outSize = 256;
SHA256.hmacStrength = 192;
SHA256.padLength = 64;
SHA256.prototype._update = function _update(msg, start) {
var W = this.W;
for (var i = 0; i < 16; i++)
W[i] = msg[start + i];
for (; i < W.length; i++)
W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);
var a = this.h[0];
var b = this.h[1];
var c = this.h[2];
var d = this.h[3];
var e = this.h[4];
var f = this.h[5];
var g = this.h[6];
var h = this.h[7];
assert(this.k.length === W.length);
for (i = 0; i < W.length; i++) {
var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);
var T2 = sum32(s0_256(a), maj32(a, b, c));
h = g;
g = f;
f = e;
e = sum32(d, T1);
d = c;
c = b;
b = a;
a = sum32(T1, T2);
}
this.h[0] = sum32(this.h[0], a);
this.h[1] = sum32(this.h[1], b);
this.h[2] = sum32(this.h[2], c);
this.h[3] = sum32(this.h[3], d);
this.h[4] = sum32(this.h[4], e);
this.h[5] = sum32(this.h[5], f);
this.h[6] = sum32(this.h[6], g);
this.h[7] = sum32(this.h[7], h);
};
SHA256.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
},{"../common":105,"../utils":115,"./common":114,"minimalistic-assert":125}],112:[function(require,module,exports){
'use strict';
var utils = require('../utils');
var SHA512 = require('./512');
function SHA384() {
if (!(this instanceof SHA384))
return new SHA384();
SHA512.call(this);
this.h = [
0xcbbb9d5d, 0xc1059ed8,
0x629a292a, 0x367cd507,
0x9159015a, 0x3070dd17,
0x152fecd8, 0xf70e5939,
0x67332667, 0xffc00b31,
0x8eb44a87, 0x68581511,
0xdb0c2e0d, 0x64f98fa7,
0x47b5481d, 0xbefa4fa4 ];
}
utils.inherits(SHA384, SHA512);
module.exports = SHA384;
SHA384.blockSize = 1024;
SHA384.outSize = 384;
SHA384.hmacStrength = 192;
SHA384.padLength = 128;
SHA384.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h.slice(0, 12), 'big');
else
return utils.split32(this.h.slice(0, 12), 'big');
};
},{"../utils":115,"./512":113}],113:[function(require,module,exports){
'use strict';
var utils = require('../utils');
var common = require('../common');
var assert = require('minimalistic-assert');
var rotr64_hi = utils.rotr64_hi;
var rotr64_lo = utils.rotr64_lo;
var shr64_hi = utils.shr64_hi;
var shr64_lo = utils.shr64_lo;
var sum64 = utils.sum64;
var sum64_hi = utils.sum64_hi;
var sum64_lo = utils.sum64_lo;
var sum64_4_hi = utils.sum64_4_hi;
var sum64_4_lo = utils.sum64_4_lo;
var sum64_5_hi = utils.sum64_5_hi;
var sum64_5_lo = utils.sum64_5_lo;
var BlockHash = common.BlockHash;
var sha512_K = [
0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
];
function SHA512() {
if (!(this instanceof SHA512))
return new SHA512();
BlockHash.call(this);
this.h = [
0x6a09e667, 0xf3bcc908,
0xbb67ae85, 0x84caa73b,
0x3c6ef372, 0xfe94f82b,
0xa54ff53a, 0x5f1d36f1,
0x510e527f, 0xade682d1,
0x9b05688c, 0x2b3e6c1f,
0x1f83d9ab, 0xfb41bd6b,
0x5be0cd19, 0x137e2179 ];
this.k = sha512_K;
this.W = new Array(160);
}
utils.inherits(SHA512, BlockHash);
module.exports = SHA512;
SHA512.blockSize = 1024;
SHA512.outSize = 512;
SHA512.hmacStrength = 192;
SHA512.padLength = 128;
SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {
var W = this.W;
// 32 x 32bit words
for (var i = 0; i < 32; i++)
W[i] = msg[start + i];
for (; i < W.length; i += 2) {
var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2
var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);
var c1_hi = W[i - 14]; // i - 7
var c1_lo = W[i - 13];
var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15
var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);
var c3_hi = W[i - 32]; // i - 16
var c3_lo = W[i - 31];
W[i] = sum64_4_hi(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo);
W[i + 1] = sum64_4_lo(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo);
}
};
SHA512.prototype._update = function _update(msg, start) {
this._prepareBlock(msg, start);
var W = this.W;
var ah = this.h[0];
var al = this.h[1];
var bh = this.h[2];
var bl = this.h[3];
var ch = this.h[4];
var cl = this.h[5];
var dh = this.h[6];
var dl = this.h[7];
var eh = this.h[8];
var el = this.h[9];
var fh = this.h[10];
var fl = this.h[11];
var gh = this.h[12];
var gl = this.h[13];
var hh = this.h[14];
var hl = this.h[15];
assert(this.k.length === W.length);
for (var i = 0; i < W.length; i += 2) {
var c0_hi = hh;
var c0_lo = hl;
var c1_hi = s1_512_hi(eh, el);
var c1_lo = s1_512_lo(eh, el);
var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
var c3_hi = this.k[i];
var c3_lo = this.k[i + 1];
var c4_hi = W[i];
var c4_lo = W[i + 1];
var T1_hi = sum64_5_hi(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo,
c4_hi, c4_lo);
var T1_lo = sum64_5_lo(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo,
c4_hi, c4_lo);
c0_hi = s0_512_hi(ah, al);
c0_lo = s0_512_lo(ah, al);
c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
hh = gh;
hl = gl;
gh = fh;
gl = fl;
fh = eh;
fl = el;
eh = sum64_hi(dh, dl, T1_hi, T1_lo);
el = sum64_lo(dl, dl, T1_hi, T1_lo);
dh = ch;
dl = cl;
ch = bh;
cl = bl;
bh = ah;
bl = al;
ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
}
sum64(this.h, 0, ah, al);
sum64(this.h, 2, bh, bl);
sum64(this.h, 4, ch, cl);
sum64(this.h, 6, dh, dl);
sum64(this.h, 8, eh, el);
sum64(this.h, 10, fh, fl);
sum64(this.h, 12, gh, gl);
sum64(this.h, 14, hh, hl);
};
SHA512.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
function ch64_hi(xh, xl, yh, yl, zh) {
var r = (xh & yh) ^ ((~xh) & zh);
if (r < 0)
r += 0x100000000;
return r;
}
function ch64_lo(xh, xl, yh, yl, zh, zl) {
var r = (xl & yl) ^ ((~xl) & zl);
if (r < 0)
r += 0x100000000;
return r;
}
function maj64_hi(xh, xl, yh, yl, zh) {
var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);
if (r < 0)
r += 0x100000000;
return r;
}
function maj64_lo(xh, xl, yh, yl, zh, zl) {
var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);
if (r < 0)
r += 0x100000000;
return r;
}
function s0_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 28);
var c1_hi = rotr64_hi(xl, xh, 2); // 34
var c2_hi = rotr64_hi(xl, xh, 7); // 39
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function s0_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 28);
var c1_lo = rotr64_lo(xl, xh, 2); // 34
var c2_lo = rotr64_lo(xl, xh, 7); // 39
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function s1_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 14);
var c1_hi = rotr64_hi(xh, xl, 18);
var c2_hi = rotr64_hi(xl, xh, 9); // 41
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function s1_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 14);
var c1_lo = rotr64_lo(xh, xl, 18);
var c2_lo = rotr64_lo(xl, xh, 9); // 41
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function g0_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 1);
var c1_hi = rotr64_hi(xh, xl, 8);
var c2_hi = shr64_hi(xh, xl, 7);
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function g0_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 1);
var c1_lo = rotr64_lo(xh, xl, 8);
var c2_lo = shr64_lo(xh, xl, 7);
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function g1_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 19);
var c1_hi = rotr64_hi(xl, xh, 29); // 61
var c2_hi = shr64_hi(xh, xl, 6);
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function g1_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 19);
var c1_lo = rotr64_lo(xl, xh, 29); // 61
var c2_lo = shr64_lo(xh, xl, 6);
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
},{"../common":105,"../utils":115,"minimalistic-assert":125}],114:[function(require,module,exports){
'use strict';
var utils = require('../utils');
var rotr32 = utils.rotr32;
function ft_1(s, x, y, z) {
if (s === 0)
return ch32(x, y, z);
if (s === 1 || s === 3)
return p32(x, y, z);
if (s === 2)
return maj32(x, y, z);
}
exports.ft_1 = ft_1;
function ch32(x, y, z) {
return (x & y) ^ ((~x) & z);
}
exports.ch32 = ch32;
function maj32(x, y, z) {
return (x & y) ^ (x & z) ^ (y & z);
}
exports.maj32 = maj32;
function p32(x, y, z) {
return x ^ y ^ z;
}
exports.p32 = p32;
function s0_256(x) {
return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
}
exports.s0_256 = s0_256;
function s1_256(x) {
return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
}
exports.s1_256 = s1_256;
function g0_256(x) {
return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);
}
exports.g0_256 = g0_256;
function g1_256(x) {
return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);
}
exports.g1_256 = g1_256;
},{"../utils":115}],115:[function(require,module,exports){
'use strict';
var assert = require('minimalistic-assert');
var inherits = require('inherits');
exports.inherits = inherits;
function toArray(msg, enc) {
if (Array.isArray(msg))
return msg.slice();
if (!msg)
return [];
var res = [];
if (typeof msg === 'string') {
if (!enc) {
for (var i = 0; i < msg.length; i++) {
var c = msg.charCodeAt(i);
var hi = c >> 8;
var lo = c & 0xff;
if (hi)
res.push(hi, lo);
else
res.push(lo);
}
} else if (enc === 'hex') {
msg = msg.replace(/[^a-z0-9]+/ig, '');
if (msg.length % 2 !== 0)
msg = '0' + msg;
for (i = 0; i < msg.length; i += 2)
res.push(parseInt(msg[i] + msg[i + 1], 16));
}
} else {
for (i = 0; i < msg.length; i++)
res[i] = msg[i] | 0;
}
return res;
}
exports.toArray = toArray;
function toHex(msg) {
var res = '';
for (var i = 0; i < msg.length; i++)
res += zero2(msg[i].toString(16));
return res;
}
exports.toHex = toHex;
function htonl(w) {
var res = (w >>> 24) |
((w >>> 8) & 0xff00) |
((w << 8) & 0xff0000) |
((w & 0xff) << 24);
return res >>> 0;
}
exports.htonl = htonl;
function toHex32(msg, endian) {
var res = '';
for (var i = 0; i < msg.length; i++) {
var w = msg[i];
if (endian === 'little')
w = htonl(w);
res += zero8(w.toString(16));
}
return res;
}
exports.toHex32 = toHex32;
function zero2(word) {
if (word.length === 1)
return '0' + word;
else
return word;
}
exports.zero2 = zero2;
function zero8(word) {
if (word.length === 7)
return '0' + word;
else if (word.length === 6)
return '00' + word;
else if (word.length === 5)
return '000' + word;
else if (word.length === 4)
return '0000' + word;
else if (word.length === 3)
return '00000' + word;
else if (word.length === 2)
return '000000' + word;
else if (word.length === 1)
return '0000000' + word;
else
return word;
}
exports.zero8 = zero8;
function join32(msg, start, end, endian) {
var len = end - start;
assert(len % 4 === 0);
var res = new Array(len / 4);
for (var i = 0, k = start; i < res.length; i++, k += 4) {
var w;
if (endian === 'big')
w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];
else
w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];
res[i] = w >>> 0;
}
return res;
}
exports.join32 = join32;
function split32(msg, endian) {
var res = new Array(msg.length * 4);
for (var i = 0, k = 0; i < msg.length; i++, k += 4) {
var m = msg[i];
if (endian === 'big') {
res[k] = m >>> 24;
res[k + 1] = (m >>> 16) & 0xff;
res[k + 2] = (m >>> 8) & 0xff;
res[k + 3] = m & 0xff;
} else {
res[k + 3] = m >>> 24;
res[k + 2] = (m >>> 16) & 0xff;
res[k + 1] = (m >>> 8) & 0xff;
res[k] = m & 0xff;
}
}
return res;
}
exports.split32 = split32;
function rotr32(w, b) {
return (w >>> b) | (w << (32 - b));
}
exports.rotr32 = rotr32;
function rotl32(w, b) {
return (w << b) | (w >>> (32 - b));
}
exports.rotl32 = rotl32;
function sum32(a, b) {
return (a + b) >>> 0;
}
exports.sum32 = sum32;
function sum32_3(a, b, c) {
return (a + b + c) >>> 0;
}
exports.sum32_3 = sum32_3;
function sum32_4(a, b, c, d) {
return (a + b + c + d) >>> 0;
}
exports.sum32_4 = sum32_4;
function sum32_5(a, b, c, d, e) {
return (a + b + c + d + e) >>> 0;
}
exports.sum32_5 = sum32_5;
function sum64(buf, pos, ah, al) {
var bh = buf[pos];
var bl = buf[pos + 1];
var lo = (al + bl) >>> 0;
var hi = (lo < al ? 1 : 0) + ah + bh;
buf[pos] = hi >>> 0;
buf[pos + 1] = lo;
}
exports.sum64 = sum64;
function sum64_hi(ah, al, bh, bl) {
var lo = (al + bl) >>> 0;
var hi = (lo < al ? 1 : 0) + ah + bh;
return hi >>> 0;
}
exports.sum64_hi = sum64_hi;
function sum64_lo(ah, al, bh, bl) {
var lo = al + bl;
return lo >>> 0;
}
exports.sum64_lo = sum64_lo;
function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
var carry = 0;
var lo = al;
lo = (lo + bl) >>> 0;
carry += lo < al ? 1 : 0;
lo = (lo + cl) >>> 0;
carry += lo < cl ? 1 : 0;
lo = (lo + dl) >>> 0;
carry += lo < dl ? 1 : 0;
var hi = ah + bh + ch + dh + carry;
return hi >>> 0;
}
exports.sum64_4_hi = sum64_4_hi;
function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
var lo = al + bl + cl + dl;
return lo >>> 0;
}
exports.sum64_4_lo = sum64_4_lo;
function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
var carry = 0;
var lo = al;
lo = (lo + bl) >>> 0;
carry += lo < al ? 1 : 0;
lo = (lo + cl) >>> 0;
carry += lo < cl ? 1 : 0;
lo = (lo + dl) >>> 0;
carry += lo < dl ? 1 : 0;
lo = (lo + el) >>> 0;
carry += lo < el ? 1 : 0;
var hi = ah + bh + ch + dh + eh + carry;
return hi >>> 0;
}
exports.sum64_5_hi = sum64_5_hi;
function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
var lo = al + bl + cl + dl + el;
return lo >>> 0;
}
exports.sum64_5_lo = sum64_5_lo;
function rotr64_hi(ah, al, num) {
var r = (al << (32 - num)) | (ah >>> num);
return r >>> 0;
}
exports.rotr64_hi = rotr64_hi;
function rotr64_lo(ah, al, num) {
var r = (ah << (32 - num)) | (al >>> num);
return r >>> 0;
}
exports.rotr64_lo = rotr64_lo;
function shr64_hi(ah, al, num) {
return ah >>> num;
}
exports.shr64_hi = shr64_hi;
function shr64_lo(ah, al, num) {
var r = (ah << (32 - num)) | (al >>> num);
return r >>> 0;
}
exports.shr64_lo = shr64_lo;
},{"inherits":119,"minimalistic-assert":125}],116:[function(require,module,exports){
'use strict';
var hash = require('hash.js');
var utils = require('minimalistic-crypto-utils');
var assert = require('minimalistic-assert');
function HmacDRBG(options) {
if (!(this instanceof HmacDRBG))
return new HmacDRBG(options);
this.hash = options.hash;
this.predResist = !!options.predResist;
this.outLen = this.hash.outSize;
this.minEntropy = options.minEntropy || this.hash.hmacStrength;
this._reseed = null;
this.reseedInterval = null;
this.K = null;
this.V = null;
var entropy = utils.toArray(options.entropy, options.entropyEnc || 'hex');
var nonce = utils.toArray(options.nonce, options.nonceEnc || 'hex');
var pers = utils.toArray(options.pers, options.persEnc || 'hex');
assert(entropy.length >= (this.minEntropy / 8),
'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
this._init(entropy, nonce, pers);
}
module.exports = HmacDRBG;
HmacDRBG.prototype._init = function init(entropy, nonce, pers) {
var seed = entropy.concat(nonce).concat(pers);
this.K = new Array(this.outLen / 8);
this.V = new Array(this.outLen / 8);
for (var i = 0; i < this.V.length; i++) {
this.K[i] = 0x00;
this.V[i] = 0x01;
}
this._update(seed);
this._reseed = 1;
this.reseedInterval = 0x1000000000000; // 2^48
};
HmacDRBG.prototype._hmac = function hmac() {
return new hash.hmac(this.hash, this.K);
};
HmacDRBG.prototype._update = function update(seed) {
var kmac = this._hmac()
.update(this.V)
.update([ 0x00 ]);
if (seed)
kmac = kmac.update(seed);
this.K = kmac.digest();
this.V = this._hmac().update(this.V).digest();
if (!seed)
return;
this.K = this._hmac()
.update(this.V)
.update([ 0x01 ])
.update(seed)
.digest();
this.V = this._hmac().update(this.V).digest();
};
HmacDRBG.prototype.reseed = function reseed(entropy, entropyEnc, add, addEnc) {
// Optional entropy enc
if (typeof entropyEnc !== 'string') {
addEnc = add;
add = entropyEnc;
entropyEnc = null;
}
entropy = utils.toArray(entropy, entropyEnc);
add = utils.toArray(add, addEnc);
assert(entropy.length >= (this.minEntropy / 8),
'Not enough entropy. Minimum is: ' + this.minEntropy + ' bits');
this._update(entropy.concat(add || []));
this._reseed = 1;
};
HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) {
if (this._reseed > this.reseedInterval)
throw new Error('Reseed is required');
// Optional encoding
if (typeof enc !== 'string') {
addEnc = add;
add = enc;
enc = null;
}
// Optional additional data
if (add) {
add = utils.toArray(add, addEnc || 'hex');
this._update(add);
}
var temp = [];
while (temp.length < len) {
this.V = this._hmac().update(this.V).digest();
temp = temp.concat(this.V);
}
var res = temp.slice(0, len);
this._update(add);
this._reseed++;
return utils.encode(res, enc);
};
},{"hash.js":104,"minimalistic-assert":125,"minimalistic-crypto-utils":126}],117:[function(require,module,exports){
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
var i = isLE ? (nBytes - 1) : 0
var d = isLE ? -1 : 1
var s = buffer[offset + i]
i += d
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1)
e >>= (-nBits)
nBits += mLen
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity)
} else {
m = m + Math.pow(2, mLen)
e = e - eBias
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
var i = isLE ? 0 : (nBytes - 1)
var d = isLE ? 1 : -1
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
value = Math.abs(value)
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0
e = eMax
} else {
e = Math.floor(Math.log(value) / Math.LN2)
if (value * (c = Math.pow(2, -e)) < 1) {
e--
c *= 2
}
if (e + eBias >= 1) {
value += rt / c
} else {
value += rt * Math.pow(2, 1 - eBias)
}
if (value * c >= 2) {
e++
c /= 2
}
if (e + eBias >= eMax) {
m = 0
e = eMax
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
e = 0
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = (e << mLen) | m
eLen += mLen
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128
}
},{}],118:[function(require,module,exports){
var indexOf = [].indexOf;
module.exports = function(arr, obj){
if (indexOf) return arr.indexOf(obj);
for (var i = 0; i < arr.length; ++i) {
if (arr[i] === obj) return i;
}
return -1;
};
},{}],119:[function(require,module,exports){
arguments[4][1][0].apply(exports,arguments)
},{"dup":1}],120:[function(require,module,exports){
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
// The _isBuffer check is for Safari 5-7 support, because it's missing
// Object.prototype.constructor. Remove this eventually
module.exports = function (obj) {
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
}
function isBuffer (obj) {
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
}
// For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) {
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
}
},{}],121:[function(require,module,exports){
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
},{}],122:[function(require,module,exports){
(function (Buffer){
'use strict'
var inherits = require('inherits')
var HashBase = require('hash-base')
var ARRAY16 = new Array(16)
function MD5 () {
HashBase.call(this, 64)
// state
this._a = 0x67452301
this._b = 0xefcdab89
this._c = 0x98badcfe
this._d = 0x10325476
}
inherits(MD5, HashBase)
MD5.prototype._update = function () {
var M = ARRAY16
for (var i = 0; i < 16; ++i) M[i] = this._block.readInt32LE(i * 4)
var a = this._a
var b = this._b
var c = this._c
var d = this._d
a = fnF(a, b, c, d, M[0], 0xd76aa478, 7)
d = fnF(d, a, b, c, M[1], 0xe8c7b756, 12)
c = fnF(c, d, a, b, M[2], 0x242070db, 17)
b = fnF(b, c, d, a, M[3], 0xc1bdceee, 22)
a = fnF(a, b, c, d, M[4], 0xf57c0faf, 7)
d = fnF(d, a, b, c, M[5], 0x4787c62a, 12)
c = fnF(c, d, a, b, M[6], 0xa8304613, 17)
b = fnF(b, c, d, a, M[7], 0xfd469501, 22)
a = fnF(a, b, c, d, M[8], 0x698098d8, 7)
d = fnF(d, a, b, c, M[9], 0x8b44f7af, 12)
c = fnF(c, d, a, b, M[10], 0xffff5bb1, 17)
b = fnF(b, c, d, a, M[11], 0x895cd7be, 22)
a = fnF(a, b, c, d, M[12], 0x6b901122, 7)
d = fnF(d, a, b, c, M[13], 0xfd987193, 12)
c = fnF(c, d, a, b, M[14], 0xa679438e, 17)
b = fnF(b, c, d, a, M[15], 0x49b40821, 22)
a = fnG(a, b, c, d, M[1], 0xf61e2562, 5)
d = fnG(d, a, b, c, M[6], 0xc040b340, 9)
c = fnG(c, d, a, b, M[11], 0x265e5a51, 14)
b = fnG(b, c, d, a, M[0], 0xe9b6c7aa, 20)
a = fnG(a, b, c, d, M[5], 0xd62f105d, 5)
d = fnG(d, a, b, c, M[10], 0x02441453, 9)
c = fnG(c, d, a, b, M[15], 0xd8a1e681, 14)
b = fnG(b, c, d, a, M[4], 0xe7d3fbc8, 20)
a = fnG(a, b, c, d, M[9], 0x21e1cde6, 5)
d = fnG(d, a, b, c, M[14], 0xc33707d6, 9)
c = fnG(c, d, a, b, M[3], 0xf4d50d87, 14)
b = fnG(b, c, d, a, M[8], 0x455a14ed, 20)
a = fnG(a, b, c, d, M[13], 0xa9e3e905, 5)
d = fnG(d, a, b, c, M[2], 0xfcefa3f8, 9)
c = fnG(c, d, a, b, M[7], 0x676f02d9, 14)
b = fnG(b, c, d, a, M[12], 0x8d2a4c8a, 20)
a = fnH(a, b, c, d, M[5], 0xfffa3942, 4)
d = fnH(d, a, b, c, M[8], 0x8771f681, 11)
c = fnH(c, d, a, b, M[11], 0x6d9d6122, 16)
b = fnH(b, c, d, a, M[14], 0xfde5380c, 23)
a = fnH(a, b, c, d, M[1], 0xa4beea44, 4)
d = fnH(d, a, b, c, M[4], 0x4bdecfa9, 11)
c = fnH(c, d, a, b, M[7], 0xf6bb4b60, 16)
b = fnH(b, c, d, a, M[10], 0xbebfbc70, 23)
a = fnH(a, b, c, d, M[13], 0x289b7ec6, 4)
d = fnH(d, a, b, c, M[0], 0xeaa127fa, 11)
c = fnH(c, d, a, b, M[3], 0xd4ef3085, 16)
b = fnH(b, c, d, a, M[6], 0x04881d05, 23)
a = fnH(a, b, c, d, M[9], 0xd9d4d039, 4)
d = fnH(d, a, b, c, M[12], 0xe6db99e5, 11)
c = fnH(c, d, a, b, M[15], 0x1fa27cf8, 16)
b = fnH(b, c, d, a, M[2], 0xc4ac5665, 23)
a = fnI(a, b, c, d, M[0], 0xf4292244, 6)
d = fnI(d, a, b, c, M[7], 0x432aff97, 10)
c = fnI(c, d, a, b, M[14], 0xab9423a7, 15)
b = fnI(b, c, d, a, M[5], 0xfc93a039, 21)
a = fnI(a, b, c, d, M[12], 0x655b59c3, 6)
d = fnI(d, a, b, c, M[3], 0x8f0ccc92, 10)
c = fnI(c, d, a, b, M[10], 0xffeff47d, 15)
b = fnI(b, c, d, a, M[1], 0x85845dd1, 21)
a = fnI(a, b, c, d, M[8], 0x6fa87e4f, 6)
d = fnI(d, a, b, c, M[15], 0xfe2ce6e0, 10)
c = fnI(c, d, a, b, M[6], 0xa3014314, 15)
b = fnI(b, c, d, a, M[13], 0x4e0811a1, 21)
a = fnI(a, b, c, d, M[4], 0xf7537e82, 6)
d = fnI(d, a, b, c, M[11], 0xbd3af235, 10)
c = fnI(c, d, a, b, M[2], 0x2ad7d2bb, 15)
b = fnI(b, c, d, a, M[9], 0xeb86d391, 21)
this._a = (this._a + a) | 0
this._b = (this._b + b) | 0
this._c = (this._c + c) | 0
this._d = (this._d + d) | 0
}
MD5.prototype._digest = function () {
// create padding and handle blocks
this._block[this._blockOffset++] = 0x80
if (this._blockOffset > 56) {
this._block.fill(0, this._blockOffset, 64)
this._update()
this._blockOffset = 0
}
this._block.fill(0, this._blockOffset, 56)
this._block.writeUInt32LE(this._length[0], 56)
this._block.writeUInt32LE(this._length[1], 60)
this._update()
// produce result
var buffer = new Buffer(16)
buffer.writeInt32LE(this._a, 0)
buffer.writeInt32LE(this._b, 4)
buffer.writeInt32LE(this._c, 8)
buffer.writeInt32LE(this._d, 12)
return buffer
}
function rotl (x, n) {
return (x << n) | (x >>> (32 - n))
}
function fnF (a, b, c, d, m, k, s) {
return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + b) | 0
}
function fnG (a, b, c, d, m, k, s) {
return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + b) | 0
}
function fnH (a, b, c, d, m, k, s) {
return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + b) | 0
}
function fnI (a, b, c, d, m, k, s) {
return (rotl((a + ((c ^ (b | (~d)))) + m + k) | 0, s) + b) | 0
}
module.exports = MD5
}).call(this,require("buffer").Buffer)
},{"buffer":65,"hash-base":123,"inherits":119}],123:[function(require,module,exports){
'use strict'
var Buffer = require('safe-buffer').Buffer
var Transform = require('stream').Transform
var inherits = require('inherits')
function throwIfNotStringOrBuffer (val, prefix) {
if (!Buffer.isBuffer(val) && typeof val !== 'string') {
throw new TypeError(prefix + ' must be a string or a buffer')
}
}
function HashBase (blockSize) {
Transform.call(this)
this._block = Buffer.allocUnsafe(blockSize)
this._blockSize = blockSize
this._blockOffset = 0
this._length = [0, 0, 0, 0]
this._finalized = false
}
inherits(HashBase, Transform)
HashBase.prototype._transform = function (chunk, encoding, callback) {
var error = null
try {
this.update(chunk, encoding)
} catch (err) {
error = err
}
callback(error)
}
HashBase.prototype._flush = function (callback) {
var error = null
try {
this.push(this.digest())
} catch (err) {
error = err
}
callback(error)
}
HashBase.prototype.update = function (data, encoding) {
throwIfNotStringOrBuffer(data, 'Data')
if (this._finalized) throw new Error('Digest already called')
if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)
// consume data
var block = this._block
var offset = 0
while (this._blockOffset + data.length - offset >= this._blockSize) {
for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
this._update()
this._blockOffset = 0
}
while (offset < data.length) block[this._blockOffset++] = data[offset++]
// update length
for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
this._length[j] += carry
carry = (this._length[j] / 0x0100000000) | 0
if (carry > 0) this._length[j] -= 0x0100000000 * carry
}
return this
}
HashBase.prototype._update = function () {
throw new Error('_update is not implemented')
}
HashBase.prototype.digest = function (encoding) {
if (this._finalized) throw new Error('Digest already called')
this._finalized = true
var digest = this._digest()
if (encoding !== undefined) digest = digest.toString(encoding)
// reset state
this._block.fill(0)
this._blockOffset = 0
for (var i = 0; i < 4; ++i) this._length[i] = 0
return digest
}
HashBase.prototype._digest = function () {
throw new Error('_digest is not implemented')
}
module.exports = HashBase
},{"inherits":119,"safe-buffer":160,"stream":169}],124:[function(require,module,exports){
var bn = require('bn.js');
var brorand = require('brorand');
function MillerRabin(rand) {
this.rand = rand || new brorand.Rand();
}
module.exports = MillerRabin;
MillerRabin.create = function create(rand) {
return new MillerRabin(rand);
};
MillerRabin.prototype._randbelow = function _randbelow(n) {
var len = n.bitLength();
var min_bytes = Math.ceil(len / 8);
// Generage random bytes until a number less than n is found.
// This ensures that 0..n-1 have an equal probability of being selected.
do
var a = new bn(this.rand.generate(min_bytes));
while (a.cmp(n) >= 0);
return a;
};
MillerRabin.prototype._randrange = function _randrange(start, stop) {
// Generate a random number greater than or equal to start and less than stop.
var size = stop.sub(start);
return start.add(this._randbelow(size));
};
MillerRabin.prototype.test = function test(n, k, cb) {
var len = n.bitLength();
var red = bn.mont(n);
var rone = new bn(1).toRed(red);
if (!k)
k = Math.max(1, (len / 48) | 0);
// Find d and s, (n - 1) = (2 ^ s) * d;
var n1 = n.subn(1);
for (var s = 0; !n1.testn(s); s++) {}
var d = n.shrn(s);
var rn1 = n1.toRed(red);
var prime = true;
for (; k > 0; k--) {
var a = this._randrange(new bn(2), n1);
if (cb)
cb(a);
var x = a.toRed(red).redPow(d);
if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
continue;
for (var i = 1; i < s; i++) {
x = x.redSqr();
if (x.cmp(rone) === 0)
return false;
if (x.cmp(rn1) === 0)
break;
}
if (i === s)
return false;
}
return prime;
};
MillerRabin.prototype.getDivisor = function getDivisor(n, k) {
var len = n.bitLength();
var red = bn.mont(n);
var rone = new bn(1).toRed(red);
if (!k)
k = Math.max(1, (len / 48) | 0);
// Find d and s, (n - 1) = (2 ^ s) * d;
var n1 = n.subn(1);
for (var s = 0; !n1.testn(s); s++) {}
var d = n.shrn(s);
var rn1 = n1.toRed(red);
for (; k > 0; k--) {
var a = this._randrange(new bn(2), n1);
var g = n.gcd(a);
if (g.cmpn(1) !== 0)
return g;
var x = a.toRed(red).redPow(d);
if (x.cmp(rone) === 0 || x.cmp(rn1) === 0)
continue;
for (var i = 1; i < s; i++) {
x = x.redSqr();
if (x.cmp(rone) === 0)
return x.fromRed().subn(1).gcd(n);
if (x.cmp(rn1) === 0)
break;
}
if (i === s) {
x = x.redSqr();
return x.fromRed().subn(1).gcd(n);
}
}
return false;
};
},{"bn.js":34,"brorand":35}],125:[function(require,module,exports){
arguments[4][2][0].apply(exports,arguments)
},{"dup":2}],126:[function(require,module,exports){
'use strict';
var utils = exports;
function toArray(msg, enc) {
if (Array.isArray(msg))
return msg.slice();
if (!msg)
return [];
var res = [];
if (typeof msg !== 'string') {
for (var i = 0; i < msg.length; i++)
res[i] = msg[i] | 0;
return res;
}
if (enc === 'hex') {
msg = msg.replace(/[^a-z0-9]+/ig, '');
if (msg.length % 2 !== 0)
msg = '0' + msg;
for (var i = 0; i < msg.length; i += 2)
res.push(parseInt(msg[i] + msg[i + 1], 16));
} else {
for (var i = 0; i < msg.length; i++) {
var c = msg.charCodeAt(i);
var hi = c >> 8;
var lo = c & 0xff;
if (hi)
res.push(hi, lo);
else
res.push(lo);
}
}
return res;
}
utils.toArray = toArray;
function zero2(word) {
if (word.length === 1)
return '0' + word;
else
return word;
}
utils.zero2 = zero2;
function toHex(msg) {
var res = '';
for (var i = 0; i < msg.length; i++)
res += zero2(msg[i].toString(16));
return res;
}
utils.toHex = toHex;
utils.encode = function encode(arr, enc) {
if (enc === 'hex')
return toHex(arr);
else
return arr;
};
},{}],127:[function(require,module,exports){
module.exports={"2.16.840.1.101.3.4.1.1": "aes-128-ecb",
"2.16.840.1.101.3.4.1.2": "aes-128-cbc",
"2.16.840.1.101.3.4.1.3": "aes-128-ofb",
"2.16.840.1.101.3.4.1.4": "aes-128-cfb",
"2.16.840.1.101.3.4.1.21": "aes-192-ecb",
"2.16.840.1.101.3.4.1.22": "aes-192-cbc",
"2.16.840.1.101.3.4.1.23": "aes-192-ofb",
"2.16.840.1.101.3.4.1.24": "aes-192-cfb",
"2.16.840.1.101.3.4.1.41": "aes-256-ecb",
"2.16.840.1.101.3.4.1.42": "aes-256-cbc",
"2.16.840.1.101.3.4.1.43": "aes-256-ofb",
"2.16.840.1.101.3.4.1.44": "aes-256-cfb"
}
},{}],128:[function(require,module,exports){
// from https://github.com/indutny/self-signed/blob/gh-pages/lib/asn1.js
// Fedor, you are amazing.
'use strict'
var asn1 = require('asn1.js')
exports.certificate = require('./certificate')
var RSAPrivateKey = asn1.define('RSAPrivateKey', function () {
this.seq().obj(
this.key('version').int(),
this.key('modulus').int(),
this.key('publicExponent').int(),
this.key('privateExponent').int(),
this.key('prime1').int(),
this.key('prime2').int(),
this.key('exponent1').int(),
this.key('exponent2').int(),
this.key('coefficient').int()
)
})
exports.RSAPrivateKey = RSAPrivateKey
var RSAPublicKey = asn1.define('RSAPublicKey', function () {
this.seq().obj(
this.key('modulus').int(),
this.key('publicExponent').int()
)
})
exports.RSAPublicKey = RSAPublicKey
var PublicKey = asn1.define('SubjectPublicKeyInfo', function () {
this.seq().obj(
this.key('algorithm').use(AlgorithmIdentifier),
this.key('subjectPublicKey').bitstr()
)
})
exports.PublicKey = PublicKey
var AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', function () {
this.seq().obj(
this.key('algorithm').objid(),
this.key('none').null_().optional(),
this.key('curve').objid().optional(),
this.key('params').seq().obj(
this.key('p').int(),
this.key('q').int(),
this.key('g').int()
).optional()
)
})
var PrivateKeyInfo = asn1.define('PrivateKeyInfo', function () {
this.seq().obj(
this.key('version').int(),
this.key('algorithm').use(AlgorithmIdentifier),
this.key('subjectPrivateKey').octstr()
)
})
exports.PrivateKey = PrivateKeyInfo
var EncryptedPrivateKeyInfo = asn1.define('EncryptedPrivateKeyInfo', function () {
this.seq().obj(
this.key('algorithm').seq().obj(
this.key('id').objid(),
this.key('decrypt').seq().obj(
this.key('kde').seq().obj(
this.key('id').objid(),
this.key('kdeparams').seq().obj(
this.key('salt').octstr(),
this.key('iters').int()
)
),
this.key('cipher').seq().obj(
this.key('algo').objid(),
this.key('iv').octstr()
)
)
),
this.key('subjectPrivateKey').octstr()
)
})
exports.EncryptedPrivateKey = EncryptedPrivateKeyInfo
var DSAPrivateKey = asn1.define('DSAPrivateKey', function () {
this.seq().obj(
this.key('version').int(),
this.key('p').int(),
this.key('q').int(),
this.key('g').int(),
this.key('pub_key').int(),
this.key('priv_key').int()
)
})
exports.DSAPrivateKey = DSAPrivateKey
exports.DSAparam = asn1.define('DSAparam', function () {
this.int()
})
var ECPrivateKey = asn1.define('ECPrivateKey', function () {
this.seq().obj(
this.key('version').int(),
this.key('privateKey').octstr(),
this.key('parameters').optional().explicit(0).use(ECParameters),
this.key('publicKey').optional().explicit(1).bitstr()
)
})
exports.ECPrivateKey = ECPrivateKey
var ECParameters = asn1.define('ECParameters', function () {
this.choice({
namedCurve: this.objid()
})
})
exports.signature = asn1.define('signature', function () {
this.seq().obj(
this.key('r').int(),
this.key('s').int()
)
})
},{"./certificate":129,"asn1.js":19}],129:[function(require,module,exports){
// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js
// thanks to @Rantanen
'use strict'
var asn = require('asn1.js')
var Time = asn.define('Time', function () {
this.choice({
utcTime: this.utctime(),
generalTime: this.gentime()
})
})
var AttributeTypeValue = asn.define('AttributeTypeValue', function () {
this.seq().obj(
this.key('type').objid(),
this.key('value').any()
)
})
var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {
this.seq().obj(
this.key('algorithm').objid(),
this.key('parameters').optional()
)
})
var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {
this.seq().obj(
this.key('algorithm').use(AlgorithmIdentifier),
this.key('subjectPublicKey').bitstr()
)
})
var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {
this.setof(AttributeTypeValue)
})
var RDNSequence = asn.define('RDNSequence', function () {
this.seqof(RelativeDistinguishedName)
})
var Name = asn.define('Name', function () {
this.choice({
rdnSequence: this.use(RDNSequence)
})
})
var Validity = asn.define('Validity', function () {
this.seq().obj(
this.key('notBefore').use(Time),
this.key('notAfter').use(Time)
)
})
var Extension = asn.define('Extension', function () {
this.seq().obj(
this.key('extnID').objid(),
this.key('critical').bool().def(false),
this.key('extnValue').octstr()
)
})
var TBSCertificate = asn.define('TBSCertificate', function () {
this.seq().obj(
this.key('version').explicit(0).int(),
this.key('serialNumber').int(),
this.key('signature').use(AlgorithmIdentifier),
this.key('issuer').use(Name),
this.key('validity').use(Validity),
this.key('subject').use(Name),
this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),
this.key('issuerUniqueID').implicit(1).bitstr().optional(),
this.key('subjectUniqueID').implicit(2).bitstr().optional(),
this.key('extensions').explicit(3).seqof(Extension).optional()
)
})
var X509Certificate = asn.define('X509Certificate', function () {
this.seq().obj(
this.key('tbsCertificate').use(TBSCertificate),
this.key('signatureAlgorithm').use(AlgorithmIdentifier),
this.key('signatureValue').bitstr()
)
})
module.exports = X509Certificate
},{"asn1.js":19}],130:[function(require,module,exports){
(function (Buffer){
// adapted from https://github.com/apatil/pemstrip
var findProc = /Proc-Type: 4,ENCRYPTED\n\r?DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\n\r?\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?/m
var startRegex = /^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n/m
var fullRegex = /^-----BEGIN ((?:.* KEY)|CERTIFICATE)-----\n\r?([0-9A-z\n\r\+\/\=]+)\n\r?-----END \1-----$/m
var evp = require('evp_bytestokey')
var ciphers = require('browserify-aes')
module.exports = function (okey, password) {
var key = okey.toString()
var match = key.match(findProc)
var decrypted
if (!match) {
var match2 = key.match(fullRegex)
decrypted = new Buffer(match2[2].replace(/\r?\n/g, ''), 'base64')
} else {
var suite = 'aes' + match[1]
var iv = new Buffer(match[2], 'hex')
var cipherText = new Buffer(match[3].replace(/\r?\n/g, ''), 'base64')
var cipherKey = evp(password, iv.slice(0, 8), parseInt(match[1], 10)).key
var out = []
var cipher = ciphers.createDecipheriv(suite, cipherKey, iv)
out.push(cipher.update(cipherText))
out.push(cipher.final())
decrypted = Buffer.concat(out)
}
var tag = key.match(startRegex)[1]
return {
tag: tag,
data: decrypted
}
}
}).call(this,require("buffer").Buffer)
},{"browserify-aes":39,"buffer":65,"evp_bytestokey":102}],131:[function(require,module,exports){
(function (Buffer){
var asn1 = require('./asn1')
var aesid = require('./aesid.json')
var fixProc = require('./fixProc')
var ciphers = require('browserify-aes')
var compat = require('pbkdf2')
module.exports = parseKeys
function parseKeys (buffer) {
var password
if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {
password = buffer.passphrase
buffer = buffer.key
}
if (typeof buffer === 'string') {
buffer = new Buffer(buffer)
}
var stripped = fixProc(buffer, password)
var type = stripped.tag
var data = stripped.data
var subtype, ndata
switch (type) {
case 'CERTIFICATE':
ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo
// falls through
case 'PUBLIC KEY':
if (!ndata) {
ndata = asn1.PublicKey.decode(data, 'der')
}
subtype = ndata.algorithm.algorithm.join('.')
switch (subtype) {
case '1.2.840.113549.1.1.1':
return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')
case '1.2.840.10045.2.1':
ndata.subjectPrivateKey = ndata.subjectPublicKey
return {
type: 'ec',
data: ndata
}
case '1.2.840.10040.4.1':
ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')
return {
type: 'dsa',
data: ndata.algorithm.params
}
default: throw new Error('unknown key id ' + subtype)
}
throw new Error('unknown key type ' + type)
case 'ENCRYPTED PRIVATE KEY':
data = asn1.EncryptedPrivateKey.decode(data, 'der')
data = decrypt(data, password)
// falls through
case 'PRIVATE KEY':
ndata = asn1.PrivateKey.decode(data, 'der')
subtype = ndata.algorithm.algorithm.join('.')
switch (subtype) {
case '1.2.840.113549.1.1.1':
return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')
case '1.2.840.10045.2.1':
return {
curve: ndata.algorithm.curve,
privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey
}
case '1.2.840.10040.4.1':
ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')
return {
type: 'dsa',
params: ndata.algorithm.params
}
default: throw new Error('unknown key id ' + subtype)
}
throw new Error('unknown key type ' + type)
case 'RSA PUBLIC KEY':
return asn1.RSAPublicKey.decode(data, 'der')
case 'RSA PRIVATE KEY':
return asn1.RSAPrivateKey.decode(data, 'der')
case 'DSA PRIVATE KEY':
return {
type: 'dsa',
params: asn1.DSAPrivateKey.decode(data, 'der')
}
case 'EC PRIVATE KEY':
data = asn1.ECPrivateKey.decode(data, 'der')
return {
curve: data.parameters.value,
privateKey: data.privateKey
}
default: throw new Error('unknown key type ' + type)
}
}
parseKeys.signature = asn1.signature
function decrypt (data, password) {
var salt = data.algorithm.decrypt.kde.kdeparams.salt
var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)
var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]
var iv = data.algorithm.decrypt.cipher.iv
var cipherText = data.subjectPrivateKey
var keylen = parseInt(algo.split('-')[1], 10) / 8
var key = compat.pbkdf2Sync(password, salt, iters, keylen)
var cipher = ciphers.createDecipheriv(algo, key, iv)
var out = []
out.push(cipher.update(cipherText))
out.push(cipher.final())
return Buffer.concat(out)
}
}).call(this,require("buffer").Buffer)
},{"./aesid.json":127,"./asn1":128,"./fixProc":130,"browserify-aes":39,"buffer":65,"pbkdf2":132}],132:[function(require,module,exports){
exports.pbkdf2 = require('./lib/async')
exports.pbkdf2Sync = require('./lib/sync')
},{"./lib/async":133,"./lib/sync":136}],133:[function(require,module,exports){
(function (process,global){
var checkParameters = require('./precondition')
var defaultEncoding = require('./default-encoding')
var sync = require('./sync')
var Buffer = require('safe-buffer').Buffer
var ZERO_BUF
var subtle = global.crypto && global.crypto.subtle
var toBrowser = {
'sha': 'SHA-1',
'sha-1': 'SHA-1',
'sha1': 'SHA-1',
'sha256': 'SHA-256',
'sha-256': 'SHA-256',
'sha384': 'SHA-384',
'sha-384': 'SHA-384',
'sha-512': 'SHA-512',
'sha512': 'SHA-512'
}
var checks = []
function checkNative (algo) {
if (global.process && !global.process.browser) {
return Promise.resolve(false)
}
if (!subtle || !subtle.importKey || !subtle.deriveBits) {
return Promise.resolve(false)
}
if (checks[algo] !== undefined) {
return checks[algo]
}
ZERO_BUF = ZERO_BUF || Buffer.alloc(8)
var prom = browserPbkdf2(ZERO_BUF, ZERO_BUF, 10, 128, algo)
.then(function () {
return true
}).catch(function () {
return false
})
checks[algo] = prom
return prom
}
function browserPbkdf2 (password, salt, iterations, length, algo) {
return subtle.importKey(
'raw', password, {name: 'PBKDF2'}, false, ['deriveBits']
).then(function (key) {
return subtle.deriveBits({
name: 'PBKDF2',
salt: salt,
iterations: iterations,
hash: {
name: algo
}
}, key, length << 3)
}).then(function (res) {
return Buffer.from(res)
})
}
function resolvePromise (promise, callback) {
promise.then(function (out) {
process.nextTick(function () {
callback(null, out)
})
}, function (e) {
process.nextTick(function () {
callback(e)
})
})
}
module.exports = function (password, salt, iterations, keylen, digest, callback) {
if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding)
if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding)
checkParameters(iterations, keylen)
if (typeof digest === 'function') {
callback = digest
digest = undefined
}
if (typeof callback !== 'function') throw new Error('No callback provided to pbkdf2')
digest = digest || 'sha1'
var algo = toBrowser[digest.toLowerCase()]
if (!algo || typeof global.Promise !== 'function') {
return process.nextTick(function () {
var out
try {
out = sync(password, salt, iterations, keylen, digest)
} catch (e) {
return callback(e)
}
callback(null, out)
})
}
resolvePromise(checkNative(algo).then(function (resp) {
if (resp) {
return browserPbkdf2(password, salt, iterations, keylen, algo)
} else {
return sync(password, salt, iterations, keylen, digest)
}
}), callback)
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./default-encoding":134,"./precondition":135,"./sync":136,"_process":138,"safe-buffer":160}],134:[function(require,module,exports){
(function (process){
var defaultEncoding
/* istanbul ignore next */
if (process.browser) {
defaultEncoding = 'utf-8'
} else {
var pVersionMajor = parseInt(process.version.split('.')[0].slice(1), 10)
defaultEncoding = pVersionMajor >= 6 ? 'utf-8' : 'binary'
}
module.exports = defaultEncoding
}).call(this,require('_process'))
},{"_process":138}],135:[function(require,module,exports){
var MAX_ALLOC = Math.pow(2, 30) - 1 // default in iojs
module.exports = function (iterations, keylen) {
if (typeof iterations !== 'number') {
throw new TypeError('Iterations not a number')
}
if (iterations < 0) {
throw new TypeError('Bad iterations')
}
if (typeof keylen !== 'number') {
throw new TypeError('Key length not a number')
}
if (keylen < 0 || keylen > MAX_ALLOC || keylen !== keylen) { /* eslint no-self-compare: 0 */
throw new TypeError('Bad key length')
}
}
},{}],136:[function(require,module,exports){
var md5 = require('create-hash/md5')
var rmd160 = require('ripemd160')
var sha = require('sha.js')
var checkParameters = require('./precondition')
var defaultEncoding = require('./default-encoding')
var Buffer = require('safe-buffer').Buffer
var ZEROS = Buffer.alloc(128)
var sizes = {
md5: 16,
sha1: 20,
sha224: 28,
sha256: 32,
sha384: 48,
sha512: 64,
rmd160: 20,
ripemd160: 20
}
function Hmac (alg, key, saltLen) {
var hash = getDigest(alg)
var blocksize = (alg === 'sha512' || alg === 'sha384') ? 128 : 64
if (key.length > blocksize) {
key = hash(key)
} else if (key.length < blocksize) {
key = Buffer.concat([key, ZEROS], blocksize)
}
var ipad = Buffer.allocUnsafe(blocksize + sizes[alg])
var opad = Buffer.allocUnsafe(blocksize + sizes[alg])
for (var i = 0; i < blocksize; i++) {
ipad[i] = key[i] ^ 0x36
opad[i] = key[i] ^ 0x5C
}
var ipad1 = Buffer.allocUnsafe(blocksize + saltLen + 4)
ipad.copy(ipad1, 0, 0, blocksize)
this.ipad1 = ipad1
this.ipad2 = ipad
this.opad = opad
this.alg = alg
this.blocksize = blocksize
this.hash = hash
this.size = sizes[alg]
}
Hmac.prototype.run = function (data, ipad) {
data.copy(ipad, this.blocksize)
var h = this.hash(ipad)
h.copy(this.opad, this.blocksize)
return this.hash(this.opad)
}
function getDigest (alg) {
function shaFunc (data) {
return sha(alg).update(data).digest()
}
if (alg === 'rmd160' || alg === 'ripemd160') return rmd160
if (alg === 'md5') return md5
return shaFunc
}
function pbkdf2 (password, salt, iterations, keylen, digest) {
if (!Buffer.isBuffer(password)) password = Buffer.from(password, defaultEncoding)
if (!Buffer.isBuffer(salt)) salt = Buffer.from(salt, defaultEncoding)
checkParameters(iterations, keylen)
digest = digest || 'sha1'
var hmac = new Hmac(digest, password, salt.length)
var DK = Buffer.allocUnsafe(keylen)
var block1 = Buffer.allocUnsafe(salt.length + 4)
salt.copy(block1, 0, 0, salt.length)
var destPos = 0
var hLen = sizes[digest]
var l = Math.ceil(keylen / hLen)
for (var i = 1; i <= l; i++) {
block1.writeUInt32BE(i, salt.length)
var T = hmac.run(block1, hmac.ipad1)
var U = T
for (var j = 1; j < iterations; j++) {
U = hmac.run(U, hmac.ipad2)
for (var k = 0; k < hLen; k++) T[k] ^= U[k]
}
T.copy(DK, destPos)
destPos += hLen
}
return DK
}
module.exports = pbkdf2
},{"./default-encoding":134,"./precondition":135,"create-hash/md5":71,"ripemd160":159,"safe-buffer":160,"sha.js":162}],137:[function(require,module,exports){
(function (process){
'use strict';
if (!process.version ||
process.version.indexOf('v0.') === 0 ||
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
module.exports = nextTick;
} else {
module.exports = process.nextTick;
}
function nextTick(fn, arg1, arg2, arg3) {
if (typeof fn !== 'function') {
throw new TypeError('"callback" argument must be a function');
}
var len = arguments.length;
var args, i;
switch (len) {
case 0:
case 1:
return process.nextTick(fn);
case 2:
return process.nextTick(function afterTickOne() {
fn.call(null, arg1);
});
case 3:
return process.nextTick(function afterTickTwo() {
fn.call(null, arg1, arg2);
});
case 4:
return process.nextTick(function afterTickThree() {
fn.call(null, arg1, arg2, arg3);
});
default:
args = new Array(len - 1);
i = 0;
while (i < args.length) {
args[i++] = arguments[i];
}
return process.nextTick(function afterTick() {
fn.apply(null, args);
});
}
}
}).call(this,require('_process'))
},{"_process":138}],138:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) { return [] }
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
},{}],139:[function(require,module,exports){
exports.publicEncrypt = require('./publicEncrypt');
exports.privateDecrypt = require('./privateDecrypt');
exports.privateEncrypt = function privateEncrypt(key, buf) {
return exports.publicEncrypt(key, buf, true);
};
exports.publicDecrypt = function publicDecrypt(key, buf) {
return exports.privateDecrypt(key, buf, true);
};
},{"./privateDecrypt":141,"./publicEncrypt":142}],140:[function(require,module,exports){
(function (Buffer){
var createHash = require('create-hash');
module.exports = function (seed, len) {
var t = new Buffer('');
var i = 0, c;
while (t.length < len) {
c = i2ops(i++);
t = Buffer.concat([t, createHash('sha1').update(seed).update(c).digest()]);
}
return t.slice(0, len);
};
function i2ops(c) {
var out = new Buffer(4);
out.writeUInt32BE(c,0);
return out;
}
}).call(this,require("buffer").Buffer)
},{"buffer":65,"create-hash":69}],141:[function(require,module,exports){
(function (Buffer){
var parseKeys = require('parse-asn1');
var mgf = require('./mgf');
var xor = require('./xor');
var bn = require('bn.js');
var crt = require('browserify-rsa');
var createHash = require('create-hash');
var withPublic = require('./withPublic');
module.exports = function privateDecrypt(private_key, enc, reverse) {
var padding;
if (private_key.padding) {
padding = private_key.padding;
} else if (reverse) {
padding = 1;
} else {
padding = 4;
}
var key = parseKeys(private_key);
var k = key.modulus.byteLength();
if (enc.length > k || new bn(enc).cmp(key.modulus) >= 0) {
throw new Error('decryption error');
}
var msg;
if (reverse) {
msg = withPublic(new bn(enc), key);
} else {
msg = crt(enc, key);
}
var zBuffer = new Buffer(k - msg.length);
zBuffer.fill(0);
msg = Buffer.concat([zBuffer, msg], k);
if (padding === 4) {
return oaep(key, msg);
} else if (padding === 1) {
return pkcs1(key, msg, reverse);
} else if (padding === 3) {
return msg;
} else {
throw new Error('unknown padding');
}
};
function oaep(key, msg){
var n = key.modulus;
var k = key.modulus.byteLength();
var mLen = msg.length;
var iHash = createHash('sha1').update(new Buffer('')).digest();
var hLen = iHash.length;
var hLen2 = 2 * hLen;
if (msg[0] !== 0) {
throw new Error('decryption error');
}
var maskedSeed = msg.slice(1, hLen + 1);
var maskedDb = msg.slice(hLen + 1);
var seed = xor(maskedSeed, mgf(maskedDb, hLen));
var db = xor(maskedDb, mgf(seed, k - hLen - 1));
if (compare(iHash, db.slice(0, hLen))) {
throw new Error('decryption error');
}
var i = hLen;
while (db[i] === 0) {
i++;
}
if (db[i++] !== 1) {
throw new Error('decryption error');
}
return db.slice(i);
}
function pkcs1(key, msg, reverse){
var p1 = msg.slice(0, 2);
var i = 2;
var status = 0;
while (msg[i++] !== 0) {
if (i >= msg.length) {
status++;
break;
}
}
var ps = msg.slice(2, i - 1);
var p2 = msg.slice(i - 1, i);
if ((p1.toString('hex') !== '0002' && !reverse) || (p1.toString('hex') !== '0001' && reverse)){
status++;
}
if (ps.length < 8) {
status++;
}
if (status) {
throw new Error('decryption error');
}
return msg.slice(i);
}
function compare(a, b){
a = new Buffer(a);
b = new Buffer(b);
var dif = 0;
var len = a.length;
if (a.length !== b.length) {
dif++;
len = Math.min(a.length, b.length);
}
var i = -1;
while (++i < len) {
dif += (a[i] ^ b[i]);
}
return dif;
}
}).call(this,require("buffer").Buffer)
},{"./mgf":140,"./withPublic":143,"./xor":144,"bn.js":34,"browserify-rsa":57,"buffer":65,"create-hash":69,"parse-asn1":131}],142:[function(require,module,exports){
(function (Buffer){
var parseKeys = require('parse-asn1');
var randomBytes = require('randombytes');
var createHash = require('create-hash');
var mgf = require('./mgf');
var xor = require('./xor');
var bn = require('bn.js');
var withPublic = require('./withPublic');
var crt = require('browserify-rsa');
var constants = {
RSA_PKCS1_OAEP_PADDING: 4,
RSA_PKCS1_PADDIN: 1,
RSA_NO_PADDING: 3
};
module.exports = function publicEncrypt(public_key, msg, reverse) {
var padding;
if (public_key.padding) {
padding = public_key.padding;
} else if (reverse) {
padding = 1;
} else {
padding = 4;
}
var key = parseKeys(public_key);
var paddedMsg;
if (padding === 4) {
paddedMsg = oaep(key, msg);
} else if (padding === 1) {
paddedMsg = pkcs1(key, msg, reverse);
} else if (padding === 3) {
paddedMsg = new bn(msg);
if (paddedMsg.cmp(key.modulus) >= 0) {
throw new Error('data too long for modulus');
}
} else {
throw new Error('unknown padding');
}
if (reverse) {
return crt(paddedMsg, key);
} else {
return withPublic(paddedMsg, key);
}
};
function oaep(key, msg){
var k = key.modulus.byteLength();
var mLen = msg.length;
var iHash = createHash('sha1').update(new Buffer('')).digest();
var hLen = iHash.length;
var hLen2 = 2 * hLen;
if (mLen > k - hLen2 - 2) {
throw new Error('message too long');
}
var ps = new Buffer(k - mLen - hLen2 - 2);
ps.fill(0);
var dblen = k - hLen - 1;
var seed = randomBytes(hLen);
var maskedDb = xor(Buffer.concat([iHash, ps, new Buffer([1]), msg], dblen), mgf(seed, dblen));
var maskedSeed = xor(seed, mgf(maskedDb, hLen));
return new bn(Buffer.concat([new Buffer([0]), maskedSeed, maskedDb], k));
}
function pkcs1(key, msg, reverse){
var mLen = msg.length;
var k = key.modulus.byteLength();
if (mLen > k - 11) {
throw new Error('message too long');
}
var ps;
if (reverse) {
ps = new Buffer(k - mLen - 3);
ps.fill(0xff);
} else {
ps = nonZero(k - mLen - 3);
}
return new bn(Buffer.concat([new Buffer([0, reverse?1:2]), ps, new Buffer([0]), msg], k));
}
function nonZero(len, crypto) {
var out = new Buffer(len);
var i = 0;
var cache = randomBytes(len*2);
var cur = 0;
var num;
while (i < len) {
if (cur === cache.length) {
cache = randomBytes(len*2);
cur = 0;
}
num = cache[cur++];
if (num) {
out[i++] = num;
}
}
return out;
}
}).call(this,require("buffer").Buffer)
},{"./mgf":140,"./withPublic":143,"./xor":144,"bn.js":34,"browserify-rsa":57,"buffer":65,"create-hash":69,"parse-asn1":131,"randombytes":145}],143:[function(require,module,exports){
(function (Buffer){
var bn = require('bn.js');
function withPublic(paddedMsg, key) {
return new Buffer(paddedMsg
.toRed(bn.mont(key.modulus))
.redPow(new bn(key.publicExponent))
.fromRed()
.toArray());
}
module.exports = withPublic;
}).call(this,require("buffer").Buffer)
},{"bn.js":34,"buffer":65}],144:[function(require,module,exports){
module.exports = function xor(a, b) {
var len = a.length;
var i = -1;
while (++i < len) {
a[i] ^= b[i];
}
return a
};
},{}],145:[function(require,module,exports){
(function (process,global){
'use strict'
function oldBrowser () {
throw new Error('secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11')
}
var Buffer = require('safe-buffer').Buffer
var crypto = global.crypto || global.msCrypto
if (crypto && crypto.getRandomValues) {
module.exports = randomBytes
} else {
module.exports = oldBrowser
}
function randomBytes (size, cb) {
// phantomjs needs to throw
if (size > 65536) throw new Error('requested too many random bytes')
// in case browserify isn't using the Uint8Array version
var rawBytes = new global.Uint8Array(size)
// This will not work in older browsers.
// See https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues
if (size > 0) { // getRandomValues fails on IE if size == 0
crypto.getRandomValues(rawBytes)
}
// XXX: phantomjs doesn't like a buffer being passed here
var bytes = Buffer.from(rawBytes.buffer)
if (typeof cb === 'function') {
return process.nextTick(function () {
cb(null, bytes)
})
}
return bytes
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"_process":138,"safe-buffer":160}],146:[function(require,module,exports){
module.exports = require('./lib/_stream_duplex.js');
},{"./lib/_stream_duplex.js":147}],147:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.
'use strict';
/*<replacement>*/
var processNextTick = require('process-nextick-args');
/*</replacement>*/
/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
var keys = [];
for (var key in obj) {
keys.push(key);
}return keys;
};
/*</replacement>*/
module.exports = Duplex;
/*<replacement>*/
var util = require('core-util-is');
util.inherits = require('inherits');
/*</replacement>*/
var Readable = require('./_stream_readable');
var Writable = require('./_stream_writable');
util.inherits(Duplex, Readable);
var keys = objectKeys(Writable.prototype);
for (var v = 0; v < keys.length; v++) {
var method = keys[v];
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
}
function Duplex(options) {
if (!(this instanceof Duplex)) return new Duplex(options);
Readable.call(this, options);
Writable.call(this, options);
if (options && options.readable === false) this.readable = false;
if (options && options.writable === false) this.writable = false;
this.allowHalfOpen = true;
if (options && options.allowHalfOpen === false) this.allowHalfOpen = false;
this.once('end', onend);
}
// the no-half-open enforcer
function onend() {
// if we allow half-open state, or if the writable side ended,
// then we're ok.
if (this.allowHalfOpen || this._writableState.ended) return;
// no more data can be written.
// But allow more writes to happen in this tick.
processNextTick(onEndNT, this);
}
function onEndNT(self) {
self.end();
}
Object.defineProperty(Duplex.prototype, 'destroyed', {
get: function () {
if (this._readableState === undefined || this._writableState === undefined) {
return false;
}
return this._readableState.destroyed && this._writableState.destroyed;
},
set: function (value) {
// we ignore the value if the stream
// has not been initialized yet
if (this._readableState === undefined || this._writableState === undefined) {
return;
}
// backward compatibility, the user is explicitly
// managing destroyed
this._readableState.destroyed = value;
this._writableState.destroyed = value;
}
});
Duplex.prototype._destroy = function (err, cb) {
this.push(null);
this.end();
processNextTick(cb, err);
};
function forEach(xs, f) {
for (var i = 0, l = xs.length; i < l; i++) {
f(xs[i], i);
}
}
},{"./_stream_readable":149,"./_stream_writable":151,"core-util-is":67,"inherits":119,"process-nextick-args":137}],148:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a passthrough stream.
// basically just the most minimal sort of Transform stream.
// Every written chunk gets output as-is.
'use strict';
module.exports = PassThrough;
var Transform = require('./_stream_transform');
/*<replacement>*/
var util = require('core-util-is');
util.inherits = require('inherits');
/*</replacement>*/
util.inherits(PassThrough, Transform);
function PassThrough(options) {
if (!(this instanceof PassThrough)) return new PassThrough(options);
Transform.call(this, options);
}
PassThrough.prototype._transform = function (chunk, encoding, cb) {
cb(null, chunk);
};
},{"./_stream_transform":150,"core-util-is":67,"inherits":119}],149:[function(require,module,exports){
(function (process,global){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
/*<replacement>*/
var processNextTick = require('process-nextick-args');
/*</replacement>*/
module.exports = Readable;
/*<replacement>*/
var isArray = require('isarray');
/*</replacement>*/
/*<replacement>*/
var Duplex;
/*</replacement>*/
Readable.ReadableState = ReadableState;
/*<replacement>*/
var EE = require('events').EventEmitter;
var EElistenerCount = function (emitter, type) {
return emitter.listeners(type).length;
};
/*</replacement>*/
/*<replacement>*/
var Stream = require('./internal/streams/stream');
/*</replacement>*/
// TODO(bmeurer): Change this back to const once hole checks are
// properly optimized away early in Ignition+TurboFan.
/*<replacement>*/
var Buffer = require('safe-buffer').Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
function _isUint8Array(obj) {
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
/*</replacement>*/
/*<replacement>*/
var util = require('core-util-is');
util.inherits = require('inherits');
/*</replacement>*/
/*<replacement>*/
var debugUtil = require('util');
var debug = void 0;
if (debugUtil && debugUtil.debuglog) {
debug = debugUtil.debuglog('stream');
} else {
debug = function () {};
}
/*</replacement>*/
var BufferList = require('./internal/streams/BufferList');
var destroyImpl = require('./internal/streams/destroy');
var StringDecoder;
util.inherits(Readable, Stream);
var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
function prependListener(emitter, event, fn) {
// Sadly this is not cacheable as some libraries bundle their own
// event emitter implementation with them.
if (typeof emitter.prependListener === 'function') {
return emitter.prependListener(event, fn);
} else {
// This is a hack to make sure that our error handler is attached before any
// userland ones. NEVER DO THIS. This is here only because this code needs
// to continue to work with older versions of Node.js that do not include
// the prependListener() method. The goal is to eventually remove this hack.
if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
}
}
function ReadableState(options, stream) {
Duplex = Duplex || require('./_stream_duplex');
options = options || {};
// object stream flag. Used to make read(n) ignore n and to
// make all the buffer merging and length checks go away
this.objectMode = !!options.objectMode;
if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
// the point at which it stops calling _read() to fill the buffer
// Note: 0 is a valid value, means "don't call _read preemptively ever"
var hwm = options.highWaterMark;
var defaultHwm = this.objectMode ? 16 : 16 * 1024;
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
// cast to ints.
this.highWaterMark = Math.floor(this.highWaterMark);
// A linked list is used to store data chunks instead of an array because the
// linked list can remove elements from the beginning faster than
// array.shift()
this.buffer = new BufferList();
this.length = 0;
this.pipes = null;
this.pipesCount = 0;
this.flowing = null;
this.ended = false;
this.endEmitted = false;
this.reading = false;
// a flag to be able to tell if the event 'readable'/'data' is emitted
// immediately, or on a later tick. We set this to true at first, because
// any actions that shouldn't happen until "later" should generally also
// not happen before the first read call.
this.sync = true;
// whenever we return null, then we set a flag to say
// that we're awaiting a 'readable' event emission.
this.needReadable = false;
this.emittedReadable = false;
this.readableListening = false;
this.resumeScheduled = false;
// has it been destroyed
this.destroyed = false;
// Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
this.defaultEncoding = options.defaultEncoding || 'utf8';
// the number of writers that are awaiting a drain event in .pipe()s
this.awaitDrain = 0;
// if true, a maybeReadMore has been scheduled
this.readingMore = false;
this.decoder = null;
this.encoding = null;
if (options.encoding) {
if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
this.decoder = new StringDecoder(options.encoding);
this.encoding = options.encoding;
}
}
function Readable(options) {
Duplex = Duplex || require('./_stream_duplex');
if (!(this instanceof Readable)) return new Readable(options);
this._readableState = new ReadableState(options, this);
// legacy
this.readable = true;
if (options) {
if (typeof options.read === 'function') this._read = options.read;
if (typeof options.destroy === 'function') this._destroy = options.destroy;
}
Stream.call(this);
}
Object.defineProperty(Readable.prototype, 'destroyed', {
get: function () {
if (this._readableState === undefined) {
return false;
}
return this._readableState.destroyed;
},
set: function (value) {
// we ignore the value if the stream
// has not been initialized yet
if (!this._readableState) {
return;
}
// backward compatibility, the user is explicitly
// managing destroyed
this._readableState.destroyed = value;
}
});
Readable.prototype.destroy = destroyImpl.destroy;
Readable.prototype._undestroy = destroyImpl.undestroy;
Readable.prototype._destroy = function (err, cb) {
this.push(null);
cb(err);
};
// Manually shove something into the read() buffer.
// This returns true if the highWaterMark has not been hit yet,
// similar to how Writable.write() returns true if you should
// write() some more.
Readable.prototype.push = function (chunk, encoding) {
var state = this._readableState;
var skipChunkCheck;
if (!state.objectMode) {
if (typeof chunk === 'string') {
encoding = encoding || state.defaultEncoding;
if (encoding !== state.encoding) {
chunk = Buffer.from(chunk, encoding);
encoding = '';
}
skipChunkCheck = true;
}
} else {
skipChunkCheck = true;
}
return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
};
// Unshift should *always* be something directly out of read()
Readable.prototype.unshift = function (chunk) {
return readableAddChunk(this, chunk, null, true, false);
};
function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
var state = stream._readableState;
if (chunk === null) {
state.reading = false;
onEofChunk(stream, state);
} else {
var er;
if (!skipChunkCheck) er = chunkInvalid(state, chunk);
if (er) {
stream.emit('error', er);
} else if (state.objectMode || chunk && chunk.length > 0) {
if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
chunk = _uint8ArrayToBuffer(chunk);
}
if (addToFront) {
if (state.endEmitted) stream.emit('error', new Error('stream.unshift() after end event'));else addChunk(stream, state, chunk, true);
} else if (state.ended) {
stream.emit('error', new Error('stream.push() after EOF'));
} else {
state.reading = false;
if (state.decoder && !encoding) {
chunk = state.decoder.write(chunk);
if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
} else {
addChunk(stream, state, chunk, false);
}
}
} else if (!addToFront) {
state.reading = false;
}
}
return needMoreData(state);
}
function addChunk(stream, state, chunk, addToFront) {
if (state.flowing && state.length === 0 && !state.sync) {
stream.emit('data', chunk);
stream.read(0);
} else {
// update the buffer info.
state.length += state.objectMode ? 1 : chunk.length;
if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
if (state.needReadable) emitReadable(stream);
}
maybeReadMore(stream, state);
}
function chunkInvalid(state, chunk) {
var er;
if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
er = new TypeError('Invalid non-string/buffer chunk');
}
return er;
}
// if it's past the high water mark, we can push in some more.
// Also, if we have no data yet, we can stand some
// more bytes. This is to work around cases where hwm=0,
// such as the repl. Also, if the push() triggered a
// readable event, and the user called read(largeNumber) such that
// needReadable was set, then we ought to push more, so that another
// 'readable' event will be triggered.
function needMoreData(state) {
return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0);
}
Readable.prototype.isPaused = function () {
return this._readableState.flowing === false;
};
// backwards compatibility.
Readable.prototype.setEncoding = function (enc) {
if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
this._readableState.decoder = new StringDecoder(enc);
this._readableState.encoding = enc;
return this;
};
// Don't raise the hwm > 8MB
var MAX_HWM = 0x800000;
function computeNewHighWaterMark(n) {
if (n >= MAX_HWM) {
n = MAX_HWM;
} else {
// Get the next highest power of 2 to prevent increasing hwm excessively in
// tiny amounts
n--;
n |= n >>> 1;
n |= n >>> 2;
n |= n >>> 4;
n |= n >>> 8;
n |= n >>> 16;
n++;
}
return n;
}
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function howMuchToRead(n, state) {
if (n <= 0 || state.length === 0 && state.ended) return 0;
if (state.objectMode) return 1;
if (n !== n) {
// Only flow one buffer at a time
if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
}
// If we're asking for more than the current hwm, then raise the hwm.
if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
if (n <= state.length) return n;
// Don't have enough
if (!state.ended) {
state.needReadable = true;
return 0;
}
return state.length;
}
// you can override either this method, or the async _read(n) below.
Readable.prototype.read = function (n) {
debug('read', n);
n = parseInt(n, 10);
var state = this._readableState;
var nOrig = n;
if (n !== 0) state.emittedReadable = false;
// if we're doing read(0) to trigger a readable event, but we
// already have a bunch of data in the buffer, then just trigger
// the 'readable' event and move on.
if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
debug('read: emitReadable', state.length, state.ended);
if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
return null;
}
n = howMuchToRead(n, state);
// if we've ended, and we're now clear, then finish it up.
if (n === 0 && state.ended) {
if (state.length === 0) endReadable(this);
return null;
}
// All the actual chunk generation logic needs to be
// *below* the call to _read. The reason is that in certain
// synthetic stream cases, such as passthrough streams, _read
// may be a completely synchronous operation which may change
// the state of the read buffer, providing enough data when
// before there was *not* enough.
//
// So, the steps are:
// 1. Figure out what the state of things will be after we do
// a read from the buffer.
//
// 2. If that resulting state will trigger a _read, then call _read.
// Note that this may be asynchronous, or synchronous. Yes, it is
// deeply ugly to write APIs this way, but that still doesn't mean
// that the Readable class should behave improperly, as streams are
// designed to be sync/async agnostic.
// Take note if the _read call is sync or async (ie, if the read call
// has returned yet), so that we know whether or not it's safe to emit
// 'readable' etc.
//
// 3. Actually pull the requested chunks out of the buffer and return.
// if we need a readable event, then we need to do some reading.
var doRead = state.needReadable;
debug('need readable', doRead);
// if we currently have less than the highWaterMark, then also read some
if (state.length === 0 || state.length - n < state.highWaterMark) {
doRead = true;
debug('length less than watermark', doRead);
}
// however, if we've ended, then there's no point, and if we're already
// reading, then it's unnecessary.
if (state.ended || state.reading) {
doRead = false;
debug('reading or ended', doRead);
} else if (doRead) {
debug('do read');
state.reading = true;
state.sync = true;
// if the length is currently zero, then we *need* a readable event.
if (state.length === 0) state.needReadable = true;
// call internal read method
this._read(state.highWaterMark);
state.sync = false;
// If _read pushed data synchronously, then `reading` will be false,
// and we need to re-evaluate how much data we can return to the user.
if (!state.reading) n = howMuchToRead(nOrig, state);
}
var ret;
if (n > 0) ret = fromList(n, state);else ret = null;
if (ret === null) {
state.needReadable = true;
n = 0;
} else {
state.length -= n;
}
if (state.length === 0) {
// If we have nothing in the buffer, then we want to know
// as soon as we *do* get something into the buffer.
if (!state.ended) state.needReadable = true;
// If we tried to read() past the EOF, then emit end on the next tick.
if (nOrig !== n && state.ended) endReadable(this);
}
if (ret !== null) this.emit('data', ret);
return ret;
};
function onEofChunk(stream, state) {
if (state.ended) return;
if (state.decoder) {
var chunk = state.decoder.end();
if (chunk && chunk.length) {
state.buffer.push(chunk);
state.length += state.objectMode ? 1 : chunk.length;
}
}
state.ended = true;
// emit 'readable' now to make sure it gets picked up.
emitReadable(stream);
}
// Don't emit readable right away in sync mode, because this can trigger
// another read() call => stack overflow. This way, it might trigger
// a nextTick recursion warning, but that's not so bad.
function emitReadable(stream) {
var state = stream._readableState;
state.needReadable = false;
if (!state.emittedReadable) {
debug('emitReadable', state.flowing);
state.emittedReadable = true;
if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
}
}
function emitReadable_(stream) {
debug('emit readable');
stream.emit('readable');
flow(stream);
}
// at this point, the user has presumably seen the 'readable' event,
// and called read() to consume some data. that may have triggered
// in turn another _read(n) call, in which case reading = true if
// it's in progress.
// However, if we're not ended, or reading, and the length < hwm,
// then go ahead and try to read some more preemptively.
function maybeReadMore(stream, state) {
if (!state.readingMore) {
state.readingMore = true;
processNextTick(maybeReadMore_, stream, state);
}
}
function maybeReadMore_(stream, state) {
var len = state.length;
while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
debug('maybeReadMore read 0');
stream.read(0);
if (len === state.length)
// didn't get any data, stop spinning.
break;else len = state.length;
}
state.readingMore = false;
}
// abstract method. to be overridden in specific implementation classes.
// call cb(er, data) where data is <= n in length.
// for virtual (non-string, non-buffer) streams, "length" is somewhat
// arbitrary, and perhaps not very meaningful.
Readable.prototype._read = function (n) {
this.emit('error', new Error('_read() is not implemented'));
};
Readable.prototype.pipe = function (dest, pipeOpts) {
var src = this;
var state = this._readableState;
switch (state.pipesCount) {
case 0:
state.pipes = dest;
break;
case 1:
state.pipes = [state.pipes, dest];
break;
default:
state.pipes.push(dest);
break;
}
state.pipesCount += 1;
debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
var endFn = doEnd ? onend : unpipe;
if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
dest.on('unpipe', onunpipe);
function onunpipe(readable, unpipeInfo) {
debug('onunpipe');
if (readable === src) {
if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
unpipeInfo.hasUnpiped = true;
cleanup();
}
}
}
function onend() {
debug('onend');
dest.end();
}
// when the dest drains, it reduces the awaitDrain counter
// on the source. This would be more elegant with a .once()
// handler in flow(), but adding and removing repeatedly is
// too slow.
var ondrain = pipeOnDrain(src);
dest.on('drain', ondrain);
var cleanedUp = false;
function cleanup() {
debug('cleanup');
// cleanup event handlers once the pipe is broken
dest.removeListener('close', onclose);
dest.removeListener('finish', onfinish);
dest.removeListener('drain', ondrain);
dest.removeListener('error', onerror);
dest.removeListener('unpipe', onunpipe);
src.removeListener('end', onend);
src.removeListener('end', unpipe);
src.removeListener('data', ondata);
cleanedUp = true;
// if the reader is waiting for a drain event from this
// specific writer, then it would cause it to never start
// flowing again.
// So, if this is awaiting a drain, then we just call it now.
// If we don't know, then assume that we are waiting for one.
if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
}
// If the user pushes more data while we're writing to dest then we'll end up
// in ondata again. However, we only want to increase awaitDrain once because
// dest will only emit one 'drain' event for the multiple writes.
// => Introduce a guard on increasing awaitDrain.
var increasedAwaitDrain = false;
src.on('data', ondata);
function ondata(chunk) {
debug('ondata');
increasedAwaitDrain = false;
var ret = dest.write(chunk);
if (false === ret && !increasedAwaitDrain) {
// If the user unpiped during `dest.write()`, it is possible
// to get stuck in a permanently paused state if that write
// also returned false.
// => Check whether `dest` is still a piping destination.
if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
debug('false write response, pause', src._readableState.awaitDrain);
src._readableState.awaitDrain++;
increasedAwaitDrain = true;
}
src.pause();
}
}
// if the dest has an error, then stop piping into it.
// however, don't suppress the throwing behavior for this.
function onerror(er) {
debug('onerror', er);
unpipe();
dest.removeListener('error', onerror);
if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
}
// Make sure our error handler is attached before userland ones.
prependListener(dest, 'error', onerror);
// Both close and finish should trigger unpipe, but only once.
function onclose() {
dest.removeListener('finish', onfinish);
unpipe();
}
dest.once('close', onclose);
function onfinish() {
debug('onfinish');
dest.removeListener('close', onclose);
unpipe();
}
dest.once('finish', onfinish);
function unpipe() {
debug('unpipe');
src.unpipe(dest);
}
// tell the dest that it's being piped to
dest.emit('pipe', src);
// start the flow if it hasn't been started already.
if (!state.flowing) {
debug('pipe resume');
src.resume();
}
return dest;
};
function pipeOnDrain(src) {
return function () {
var state = src._readableState;
debug('pipeOnDrain', state.awaitDrain);
if (state.awaitDrain) state.awaitDrain--;
if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
state.flowing = true;
flow(src);
}
};
}
Readable.prototype.unpipe = function (dest) {
var state = this._readableState;
var unpipeInfo = { hasUnpiped: false };
// if we're not piping anywhere, then do nothing.
if (state.pipesCount === 0) return this;
// just one destination. most common case.
if (state.pipesCount === 1) {
// passed in one, but it's not the right one.
if (dest && dest !== state.pipes) return this;
if (!dest) dest = state.pipes;
// got a match.
state.pipes = null;
state.pipesCount = 0;
state.flowing = false;
if (dest) dest.emit('unpipe', this, unpipeInfo);
return this;
}
// slow case. multiple pipe destinations.
if (!dest) {
// remove all.
var dests = state.pipes;
var len = state.pipesCount;
state.pipes = null;
state.pipesCount = 0;
state.flowing = false;
for (var i = 0; i < len; i++) {
dests[i].emit('unpipe', this, unpipeInfo);
}return this;
}
// try to find the right one.
var index = indexOf(state.pipes, dest);
if (index === -1) return this;
state.pipes.splice(index, 1);
state.pipesCount -= 1;
if (state.pipesCount === 1) state.pipes = state.pipes[0];
dest.emit('unpipe', this, unpipeInfo);
return this;
};
// set up data events if they are asked for
// Ensure readable listeners eventually get something
Readable.prototype.on = function (ev, fn) {
var res = Stream.prototype.on.call(this, ev, fn);
if (ev === 'data') {
// Start flowing on next tick if stream isn't explicitly paused
if (this._readableState.flowing !== false) this.resume();
} else if (ev === 'readable') {
var state = this._readableState;
if (!state.endEmitted && !state.readableListening) {
state.readableListening = state.needReadable = true;
state.emittedReadable = false;
if (!state.reading) {
processNextTick(nReadingNextTick, this);
} else if (state.length) {
emitReadable(this);
}
}
}
return res;
};
Readable.prototype.addListener = Readable.prototype.on;
function nReadingNextTick(self) {
debug('readable nexttick read 0');
self.read(0);
}
// pause() and resume() are remnants of the legacy readable stream API
// If the user uses them, then switch into old mode.
Readable.prototype.resume = function () {
var state = this._readableState;
if (!state.flowing) {
debug('resume');
state.flowing = true;
resume(this, state);
}
return this;
};
function resume(stream, state) {
if (!state.resumeScheduled) {
state.resumeScheduled = true;
processNextTick(resume_, stream, state);
}
}
function resume_(stream, state) {
if (!state.reading) {
debug('resume read 0');
stream.read(0);
}
state.resumeScheduled = false;
state.awaitDrain = 0;
stream.emit('resume');
flow(stream);
if (state.flowing && !state.reading) stream.read(0);
}
Readable.prototype.pause = function () {
debug('call pause flowing=%j', this._readableState.flowing);
if (false !== this._readableState.flowing) {
debug('pause');
this._readableState.flowing = false;
this.emit('pause');
}
return this;
};
function flow(stream) {
var state = stream._readableState;
debug('flow', state.flowing);
while (state.flowing && stream.read() !== null) {}
}
// wrap an old-style stream as the async data source.
// This is *not* part of the readable stream interface.
// It is an ugly unfortunate mess of history.
Readable.prototype.wrap = function (stream) {
var state = this._readableState;
var paused = false;
var self = this;
stream.on('end', function () {
debug('wrapped end');
if (state.decoder && !state.ended) {
var chunk = state.decoder.end();
if (chunk && chunk.length) self.push(chunk);
}
self.push(null);
});
stream.on('data', function (chunk) {
debug('wrapped data');
if (state.decoder) chunk = state.decoder.write(chunk);
// don't skip over falsy values in objectMode
if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
var ret = self.push(chunk);
if (!ret) {
paused = true;
stream.pause();
}
});
// proxy all the other methods.
// important when wrapping filters and duplexes.
for (var i in stream) {
if (this[i] === undefined && typeof stream[i] === 'function') {
this[i] = function (method) {
return function () {
return stream[method].apply(stream, arguments);
};
}(i);
}
}
// proxy certain important events.
for (var n = 0; n < kProxyEvents.length; n++) {
stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n]));
}
// when we try to consume some more bytes, simply unpause the
// underlying stream.
self._read = function (n) {
debug('wrapped _read', n);
if (paused) {
paused = false;
stream.resume();
}
};
return self;
};
// exposed for testing purposes only.
Readable._fromList = fromList;
// Pluck off n bytes from an array of buffers.
// Length is the combined lengths of all the buffers in the list.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromList(n, state) {
// nothing buffered
if (state.length === 0) return null;
var ret;
if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
// read it all, truncate the list
if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length);
state.buffer.clear();
} else {
// read part of list
ret = fromListPartial(n, state.buffer, state.decoder);
}
return ret;
}
// Extracts only enough buffered data to satisfy the amount requested.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function fromListPartial(n, list, hasStrings) {
var ret;
if (n < list.head.data.length) {
// slice is the same for buffers and strings
ret = list.head.data.slice(0, n);
list.head.data = list.head.data.slice(n);
} else if (n === list.head.data.length) {
// first chunk is a perfect match
ret = list.shift();
} else {
// result spans more than one buffer
ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list);
}
return ret;
}
// Copies a specified amount of characters from the list of buffered data
// chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBufferString(n, list) {
var p = list.head;
var c = 1;
var ret = p.data;
n -= ret.length;
while (p = p.next) {
var str = p.data;
var nb = n > str.length ? str.length : n;
if (nb === str.length) ret += str;else ret += str.slice(0, n);
n -= nb;
if (n === 0) {
if (nb === str.length) {
++c;
if (p.next) list.head = p.next;else list.head = list.tail = null;
} else {
list.head = p;
p.data = str.slice(nb);
}
break;
}
++c;
}
list.length -= c;
return ret;
}
// Copies a specified amount of bytes from the list of buffered data chunks.
// This function is designed to be inlinable, so please take care when making
// changes to the function body.
function copyFromBuffer(n, list) {
var ret = Buffer.allocUnsafe(n);
var p = list.head;
var c = 1;
p.data.copy(ret);
n -= p.data.length;
while (p = p.next) {
var buf = p.data;
var nb = n > buf.length ? buf.length : n;
buf.copy(ret, ret.length - n, 0, nb);
n -= nb;
if (n === 0) {
if (nb === buf.length) {
++c;
if (p.next) list.head = p.next;else list.head = list.tail = null;
} else {
list.head = p;
p.data = buf.slice(nb);
}
break;
}
++c;
}
list.length -= c;
return ret;
}
function endReadable(stream) {
var state = stream._readableState;
// If we get here before consuming all the bytes, then that is a
// bug in node. Should never happen.
if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
if (!state.endEmitted) {
state.ended = true;
processNextTick(endReadableNT, state, stream);
}
}
function endReadableNT(state, stream) {
// Check that we didn't get one last unshift.
if (!state.endEmitted && state.length === 0) {
state.endEmitted = true;
stream.readable = false;
stream.emit('end');
}
}
function forEach(xs, f) {
for (var i = 0, l = xs.length; i < l; i++) {
f(xs[i], i);
}
}
function indexOf(xs, x) {
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) return i;
}
return -1;
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./_stream_duplex":147,"./internal/streams/BufferList":152,"./internal/streams/destroy":153,"./internal/streams/stream":154,"_process":138,"core-util-is":67,"events":101,"inherits":119,"isarray":121,"process-nextick-args":137,"safe-buffer":160,"string_decoder/":170,"util":36}],150:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// a transform stream is a readable/writable stream where you do
// something with the data. Sometimes it's called a "filter",
// but that's not a great name for it, since that implies a thing where
// some bits pass through, and others are simply ignored. (That would
// be a valid example of a transform, of course.)
//
// While the output is causally related to the input, it's not a
// necessarily symmetric or synchronous transformation. For example,
// a zlib stream might take multiple plain-text writes(), and then
// emit a single compressed chunk some time in the future.
//
// Here's how this works:
//
// The Transform stream has all the aspects of the readable and writable
// stream classes. When you write(chunk), that calls _write(chunk,cb)
// internally, and returns false if there's a lot of pending writes
// buffered up. When you call read(), that calls _read(n) until
// there's enough pending readable data buffered up.
//
// In a transform stream, the written data is placed in a buffer. When
// _read(n) is called, it transforms the queued up data, calling the
// buffered _write cb's as it consumes chunks. If consuming a single
// written chunk would result in multiple output chunks, then the first
// outputted bit calls the readcb, and subsequent chunks just go into
// the read buffer, and will cause it to emit 'readable' if necessary.
//
// This way, back-pressure is actually determined by the reading side,
// since _read has to be called to start processing a new chunk. However,
// a pathological inflate type of transform can cause excessive buffering
// here. For example, imagine a stream where every byte of input is
// interpreted as an integer from 0-255, and then results in that many
// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
// 1kb of data being output. In this case, you could write a very small
// amount of input, and end up with a very large amount of output. In
// such a pathological inflating mechanism, there'd be no way to tell
// the system to stop doing the transform. A single 4MB write could
// cause the system to run out of memory.
//
// However, even in such a pathological case, only a single written chunk
// would be consumed, and then the rest would wait (un-transformed) until
// the results of the previous transformed chunk were consumed.
'use strict';
module.exports = Transform;
var Duplex = require('./_stream_duplex');
/*<replacement>*/
var util = require('core-util-is');
util.inherits = require('inherits');
/*</replacement>*/
util.inherits(Transform, Duplex);
function TransformState(stream) {
this.afterTransform = function (er, data) {
return afterTransform(stream, er, data);
};
this.needTransform = false;
this.transforming = false;
this.writecb = null;
this.writechunk = null;
this.writeencoding = null;
}
function afterTransform(stream, er, data) {
var ts = stream._transformState;
ts.transforming = false;
var cb = ts.writecb;
if (!cb) {
return stream.emit('error', new Error('write callback called multiple times'));
}
ts.writechunk = null;
ts.writecb = null;
if (data !== null && data !== undefined) stream.push(data);
cb(er);
var rs = stream._readableState;
rs.reading = false;
if (rs.needReadable || rs.length < rs.highWaterMark) {
stream._read(rs.highWaterMark);
}
}
function Transform(options) {
if (!(this instanceof Transform)) return new Transform(options);
Duplex.call(this, options);
this._transformState = new TransformState(this);
var stream = this;
// start out asking for a readable event once data is transformed.
this._readableState.needReadable = true;
// we have implemented the _read method, and done the other things
// that Readable wants before the first _read call, so unset the
// sync guard flag.
this._readableState.sync = false;
if (options) {
if (typeof options.transform === 'function') this._transform = options.transform;
if (typeof options.flush === 'function') this._flush = options.flush;
}
// When the writable side finishes, then flush out anything remaining.
this.once('prefinish', function () {
if (typeof this._flush === 'function') this._flush(function (er, data) {
done(stream, er, data);
});else done(stream);
});
}
Transform.prototype.push = function (chunk, encoding) {
this._transformState.needTransform = false;
return Duplex.prototype.push.call(this, chunk, encoding);
};
// This is the part where you do stuff!
// override this function in implementation classes.
// 'chunk' is an input chunk.
//
// Call `push(newChunk)` to pass along transformed output
// to the readable side. You may call 'push' zero or more times.
//
// Call `cb(err)` when you are done with this chunk. If you pass
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function (chunk, encoding, cb) {
throw new Error('_transform() is not implemented');
};
Transform.prototype._write = function (chunk, encoding, cb) {
var ts = this._transformState;
ts.writecb = cb;
ts.writechunk = chunk;
ts.writeencoding = encoding;
if (!ts.transforming) {
var rs = this._readableState;
if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
}
};
// Doesn't matter what the args are here.
// _transform does all the work.
// That we got here means that the readable side wants more data.
Transform.prototype._read = function (n) {
var ts = this._transformState;
if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
ts.transforming = true;
this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
} else {
// mark that we need a transform, so that any data that comes in
// will get processed, now that we've asked for it.
ts.needTransform = true;
}
};
Transform.prototype._destroy = function (err, cb) {
var _this = this;
Duplex.prototype._destroy.call(this, err, function (err2) {
cb(err2);
_this.emit('close');
});
};
function done(stream, er, data) {
if (er) return stream.emit('error', er);
if (data !== null && data !== undefined) stream.push(data);
// if there's nothing in the write buffer, then that means
// that nothing more will ever be provided
var ws = stream._writableState;
var ts = stream._transformState;
if (ws.length) throw new Error('Calling transform done when ws.length != 0');
if (ts.transforming) throw new Error('Calling transform done when still transforming');
return stream.push(null);
}
},{"./_stream_duplex":147,"core-util-is":67,"inherits":119}],151:[function(require,module,exports){
(function (process,global){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// A bit simpler than readable streams.
// Implement an async ._write(chunk, encoding, cb), and it'll handle all
// the drain event emission and buffering.
'use strict';
/*<replacement>*/
var processNextTick = require('process-nextick-args');
/*</replacement>*/
module.exports = Writable;
/* <replacement> */
function WriteReq(chunk, encoding, cb) {
this.chunk = chunk;
this.encoding = encoding;
this.callback = cb;
this.next = null;
}
// It seems a linked list but it is not
// there will be only 2 of these for each stream
function CorkedRequest(state) {
var _this = this;
this.next = null;
this.entry = null;
this.finish = function () {
onCorkedFinish(_this, state);
};
}
/* </replacement> */
/*<replacement>*/
var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
/*</replacement>*/
/*<replacement>*/
var Duplex;
/*</replacement>*/
Writable.WritableState = WritableState;
/*<replacement>*/
var util = require('core-util-is');
util.inherits = require('inherits');
/*</replacement>*/
/*<replacement>*/
var internalUtil = {
deprecate: require('util-deprecate')
};
/*</replacement>*/
/*<replacement>*/
var Stream = require('./internal/streams/stream');
/*</replacement>*/
/*<replacement>*/
var Buffer = require('safe-buffer').Buffer;
var OurUint8Array = global.Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
function _isUint8Array(obj) {
return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
}
/*</replacement>*/
var destroyImpl = require('./internal/streams/destroy');
util.inherits(Writable, Stream);
function nop() {}
function WritableState(options, stream) {
Duplex = Duplex || require('./_stream_duplex');
options = options || {};
// object stream flag to indicate whether or not this stream
// contains buffers or objects.
this.objectMode = !!options.objectMode;
if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
// the point at which write() starts returning false
// Note: 0 is a valid value, means that we always return false if
// the entire buffer is not flushed immediately on write()
var hwm = options.highWaterMark;
var defaultHwm = this.objectMode ? 16 : 16 * 1024;
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
// cast to ints.
this.highWaterMark = Math.floor(this.highWaterMark);
// if _final has been called
this.finalCalled = false;
// drain event flag.
this.needDrain = false;
// at the start of calling end()
this.ending = false;
// when end() has been called, and returned
this.ended = false;
// when 'finish' is emitted
this.finished = false;
// has it been destroyed
this.destroyed = false;
// should we decode strings into buffers before passing to _write?
// this is here so that some node-core streams can optimize string
// handling at a lower level.
var noDecode = options.decodeStrings === false;
this.decodeStrings = !noDecode;
// Crypto is kind of old and crusty. Historically, its default string
// encoding is 'binary' so we have to make this configurable.
// Everything else in the universe uses 'utf8', though.
this.defaultEncoding = options.defaultEncoding || 'utf8';
// not an actual buffer we keep track of, but a measurement
// of how much we're waiting to get pushed to some underlying
// socket or file.
this.length = 0;
// a flag to see when we're in the middle of a write.
this.writing = false;
// when true all writes will be buffered until .uncork() call
this.corked = 0;
// a flag to be able to tell if the onwrite cb is called immediately,
// or on a later tick. We set this to true at first, because any
// actions that shouldn't happen until "later" should generally also
// not happen before the first write call.
this.sync = true;
// a flag to know if we're processing previously buffered items, which
// may call the _write() callback in the same tick, so that we don't
// end up in an overlapped onwrite situation.
this.bufferProcessing = false;
// the callback that's passed to _write(chunk,cb)
this.onwrite = function (er) {
onwrite(stream, er);
};
// the callback that the user supplies to write(chunk,encoding,cb)
this.writecb = null;
// the amount that is being written when _write is called.
this.writelen = 0;
this.bufferedRequest = null;
this.lastBufferedRequest = null;
// number of pending user-supplied write callbacks
// this must be 0 before 'finish' can be emitted
this.pendingcb = 0;
// emit prefinish if the only thing we're waiting for is _write cbs
// This is relevant for synchronous Transform streams
this.prefinished = false;
// True if the error was already emitted and should not be thrown again
this.errorEmitted = false;
// count buffered requests
this.bufferedRequestCount = 0;
// allocate the first CorkedRequest, there is always
// one allocated and free to use, and we maintain at most two
this.corkedRequestsFree = new CorkedRequest(this);
}
WritableState.prototype.getBuffer = function getBuffer() {
var current = this.bufferedRequest;
var out = [];
while (current) {
out.push(current);
current = current.next;
}
return out;
};
(function () {
try {
Object.defineProperty(WritableState.prototype, 'buffer', {
get: internalUtil.deprecate(function () {
return this.getBuffer();
}, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
});
} catch (_) {}
})();
// Test _writableState for inheritance to account for Duplex streams,
// whose prototype chain only points to Readable.
var realHasInstance;
if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
realHasInstance = Function.prototype[Symbol.hasInstance];
Object.defineProperty(Writable, Symbol.hasInstance, {
value: function (object) {
if (realHasInstance.call(this, object)) return true;
return object && object._writableState instanceof WritableState;
}
});
} else {
realHasInstance = function (object) {
return object instanceof this;
};
}
function Writable(options) {
Duplex = Duplex || require('./_stream_duplex');
// Writable ctor is applied to Duplexes, too.
// `realHasInstance` is necessary because using plain `instanceof`
// would return false, as no `_writableState` property is attached.
// Trying to use the custom `instanceof` for Writable here will also break the
// Node.js LazyTransform implementation, which has a non-trivial getter for
// `_writableState` that would lead to infinite recursion.
if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) {
return new Writable(options);
}
this._writableState = new WritableState(options, this);
// legacy.
this.writable = true;
if (options) {
if (typeof options.write === 'function') this._write = options.write;
if (typeof options.writev === 'function') this._writev = options.writev;
if (typeof options.destroy === 'function') this._destroy = options.destroy;
if (typeof options.final === 'function') this._final = options.final;
}
Stream.call(this);
}
// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function () {
this.emit('error', new Error('Cannot pipe, not readable'));
};
function writeAfterEnd(stream, cb) {
var er = new Error('write after end');
// TODO: defer error events consistently everywhere, not just the cb
stream.emit('error', er);
processNextTick(cb, er);
}
// Checks that a user-supplied chunk is valid, especially for the particular
// mode the stream is in. Currently this means that `null` is never accepted
// and undefined/non-string values are only allowed in object mode.
function validChunk(stream, state, chunk, cb) {
var valid = true;
var er = false;
if (chunk === null) {
er = new TypeError('May not write null values to stream');
} else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
er = new TypeError('Invalid non-string/buffer chunk');
}
if (er) {
stream.emit('error', er);
processNextTick(cb, er);
valid = false;
}
return valid;
}
Writable.prototype.write = function (chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
var isBuf = _isUint8Array(chunk) && !state.objectMode;
if (isBuf && !Buffer.isBuffer(chunk)) {
chunk = _uint8ArrayToBuffer(chunk);
}
if (typeof encoding === 'function') {
cb = encoding;
encoding = null;
}
if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
if (typeof cb !== 'function') cb = nop;
if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
state.pendingcb++;
ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
}
return ret;
};
Writable.prototype.cork = function () {
var state = this._writableState;
state.corked++;
};
Writable.prototype.uncork = function () {
var state = this._writableState;
if (state.corked) {
state.corked--;
if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
}
};
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
// node::ParseEncoding() requires lower case.
if (typeof encoding === 'string') encoding = encoding.toLowerCase();
if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
this._writableState.defaultEncoding = encoding;
return this;
};
function decodeChunk(state, chunk, encoding) {
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
chunk = Buffer.from(chunk, encoding);
}
return chunk;
}
// if we're already writing something, then just put this
// in the queue, and wait our turn. Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
if (!isBuf) {
var newChunk = decodeChunk(state, chunk, encoding);
if (chunk !== newChunk) {
isBuf = true;
encoding = 'buffer';
chunk = newChunk;
}
}
var len = state.objectMode ? 1 : chunk.length;
state.length += len;
var ret = state.length < state.highWaterMark;
// we must ensure that previous needDrain will not be reset to false.
if (!ret) state.needDrain = true;
if (state.writing || state.corked) {
var last = state.lastBufferedRequest;
state.lastBufferedRequest = {
chunk: chunk,
encoding: encoding,
isBuf: isBuf,
callback: cb,
next: null
};
if (last) {
last.next = state.lastBufferedRequest;
} else {
state.bufferedRequest = state.lastBufferedRequest;
}
state.bufferedRequestCount += 1;
} else {
doWrite(stream, state, false, len, chunk, encoding, cb);
}
return ret;
}
function doWrite(stream, state, writev, len, chunk, encoding, cb) {
state.writelen = len;
state.writecb = cb;
state.writing = true;
state.sync = true;
if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
state.sync = false;
}
function onwriteError(stream, state, sync, er, cb) {
--state.pendingcb;
if (sync) {
// defer the callback if we are being called synchronously
// to avoid piling up things on the stack
processNextTick(cb, er);
// this can emit finish, and it will always happen
// after error
processNextTick(finishMaybe, stream, state);
stream._writableState.errorEmitted = true;
stream.emit('error', er);
} else {
// the caller expect this to happen before if
// it is async
cb(er);
stream._writableState.errorEmitted = true;
stream.emit('error', er);
// this can emit finish, but finish must
// always follow error
finishMaybe(stream, state);
}
}
function onwriteStateUpdate(state) {
state.writing = false;
state.writecb = null;
state.length -= state.writelen;
state.writelen = 0;
}
function onwrite(stream, er) {
var state = stream._writableState;
var sync = state.sync;
var cb = state.writecb;
onwriteStateUpdate(state);
if (er) onwriteError(stream, state, sync, er, cb);else {
// Check if we're actually ready to finish, but don't emit yet
var finished = needFinish(state);
if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
clearBuffer(stream, state);
}
if (sync) {
/*<replacement>*/
asyncWrite(afterWrite, stream, state, finished, cb);
/*</replacement>*/
} else {
afterWrite(stream, state, finished, cb);
}
}
}
function afterWrite(stream, state, finished, cb) {
if (!finished) onwriteDrain(stream, state);
state.pendingcb--;
cb();
finishMaybe(stream, state);
}
// Must force callback to be called on nextTick, so that we don't
// emit 'drain' before the write() consumer gets the 'false' return
// value, and has a chance to attach a 'drain' listener.
function onwriteDrain(stream, state) {
if (state.length === 0 && state.needDrain) {
state.needDrain = false;
stream.emit('drain');
}
}
// if there's something in the buffer waiting, then process it
function clearBuffer(stream, state) {
state.bufferProcessing = true;
var entry = state.bufferedRequest;
if (stream._writev && entry && entry.next) {
// Fast case, write everything using _writev()
var l = state.bufferedRequestCount;
var buffer = new Array(l);
var holder = state.corkedRequestsFree;
holder.entry = entry;
var count = 0;
var allBuffers = true;
while (entry) {
buffer[count] = entry;
if (!entry.isBuf) allBuffers = false;
entry = entry.next;
count += 1;
}
buffer.allBuffers = allBuffers;
doWrite(stream, state, true, state.length, buffer, '', holder.finish);
// doWrite is almost always async, defer these to save a bit of time
// as the hot path ends with doWrite
state.pendingcb++;
state.lastBufferedRequest = null;
if (holder.next) {
state.corkedRequestsFree = holder.next;
holder.next = null;
} else {
state.corkedRequestsFree = new CorkedRequest(state);
}
} else {
// Slow case, write chunks one-by-one
while (entry) {
var chunk = entry.chunk;
var encoding = entry.encoding;
var cb = entry.callback;
var len = state.objectMode ? 1 : chunk.length;
doWrite(stream, state, false, len, chunk, encoding, cb);
entry = entry.next;
// if we didn't call the onwrite immediately, then
// it means that we need to wait until it does.
// also, that means that the chunk and cb are currently
// being processed, so move the buffer counter past them.
if (state.writing) {
break;
}
}
if (entry === null) state.lastBufferedRequest = null;
}
state.bufferedRequestCount = 0;
state.bufferedRequest = entry;
state.bufferProcessing = false;
}
Writable.prototype._write = function (chunk, encoding, cb) {
cb(new Error('_write() is not implemented'));
};
Writable.prototype._writev = null;
Writable.prototype.end = function (chunk, encoding, cb) {
var state = this._writableState;
if (typeof chunk === 'function') {
cb = chunk;
chunk = null;
encoding = null;
} else if (typeof encoding === 'function') {
cb = encoding;
encoding = null;
}
if (chunk !== null && chunk !== undefined) this.write(chunk, encoding);
// .end() fully uncorks
if (state.corked) {
state.corked = 1;
this.uncork();
}
// ignore unnecessary end() calls.
if (!state.ending && !state.finished) endWritable(this, state, cb);
};
function needFinish(state) {
return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
}
function callFinal(stream, state) {
stream._final(function (err) {
state.pendingcb--;
if (err) {
stream.emit('error', err);
}
state.prefinished = true;
stream.emit('prefinish');
finishMaybe(stream, state);
});
}
function prefinish(stream, state) {
if (!state.prefinished && !state.finalCalled) {
if (typeof stream._final === 'function') {
state.pendingcb++;
state.finalCalled = true;
processNextTick(callFinal, stream, state);
} else {
state.prefinished = true;
stream.emit('prefinish');
}
}
}
function finishMaybe(stream, state) {
var need = needFinish(state);
if (need) {
prefinish(stream, state);
if (state.pendingcb === 0) {
state.finished = true;
stream.emit('finish');
}
}
return need;
}
function endWritable(stream, state, cb) {
state.ending = true;
finishMaybe(stream, state);
if (cb) {
if (state.finished) processNextTick(cb);else stream.once('finish', cb);
}
state.ended = true;
stream.writable = false;
}
function onCorkedFinish(corkReq, state, err) {
var entry = corkReq.entry;
corkReq.entry = null;
while (entry) {
var cb = entry.callback;
state.pendingcb--;
cb(err);
entry = entry.next;
}
if (state.corkedRequestsFree) {
state.corkedRequestsFree.next = corkReq;
} else {
state.corkedRequestsFree = corkReq;
}
}
Object.defineProperty(Writable.prototype, 'destroyed', {
get: function () {
if (this._writableState === undefined) {
return false;
}
return this._writableState.destroyed;
},
set: function (value) {
// we ignore the value if the stream
// has not been initialized yet
if (!this._writableState) {
return;
}
// backward compatibility, the user is explicitly
// managing destroyed
this._writableState.destroyed = value;
}
});
Writable.prototype.destroy = destroyImpl.destroy;
Writable.prototype._undestroy = destroyImpl.undestroy;
Writable.prototype._destroy = function (err, cb) {
this.end();
cb(err);
};
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./_stream_duplex":147,"./internal/streams/destroy":153,"./internal/streams/stream":154,"_process":138,"core-util-is":67,"inherits":119,"process-nextick-args":137,"safe-buffer":160,"util-deprecate":171}],152:[function(require,module,exports){
'use strict';
/*<replacement>*/
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Buffer = require('safe-buffer').Buffer;
/*</replacement>*/
function copyBuffer(src, target, offset) {
src.copy(target, offset);
}
module.exports = function () {
function BufferList() {
_classCallCheck(this, BufferList);
this.head = null;
this.tail = null;
this.length = 0;
}
BufferList.prototype.push = function push(v) {
var entry = { data: v, next: null };
if (this.length > 0) this.tail.next = entry;else this.head = entry;
this.tail = entry;
++this.length;
};
BufferList.prototype.unshift = function unshift(v) {
var entry = { data: v, next: this.head };
if (this.length === 0) this.tail = entry;
this.head = entry;
++this.length;
};
BufferList.prototype.shift = function shift() {
if (this.length === 0) return;
var ret = this.head.data;
if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
--this.length;
return ret;
};
BufferList.prototype.clear = function clear() {
this.head = this.tail = null;
this.length = 0;
};
BufferList.prototype.join = function join(s) {
if (this.length === 0) return '';
var p = this.head;
var ret = '' + p.data;
while (p = p.next) {
ret += s + p.data;
}return ret;
};
BufferList.prototype.concat = function concat(n) {
if (this.length === 0) return Buffer.alloc(0);
if (this.length === 1) return this.head.data;
var ret = Buffer.allocUnsafe(n >>> 0);
var p = this.head;
var i = 0;
while (p) {
copyBuffer(p.data, ret, i);
i += p.data.length;
p = p.next;
}
return ret;
};
return BufferList;
}();
},{"safe-buffer":160}],153:[function(require,module,exports){
'use strict';
/*<replacement>*/
var processNextTick = require('process-nextick-args');
/*</replacement>*/
// undocumented cb() API, needed for core, not for public API
function destroy(err, cb) {
var _this = this;
var readableDestroyed = this._readableState && this._readableState.destroyed;
var writableDestroyed = this._writableState && this._writableState.destroyed;
if (readableDestroyed || writableDestroyed) {
if (cb) {
cb(err);
} else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
processNextTick(emitErrorNT, this, err);
}
return;
}
// we set destroyed to true before firing error callbacks in order
// to make it re-entrance safe in case destroy() is called within callbacks
if (this._readableState) {
this._readableState.destroyed = true;
}
// if this is a duplex stream mark the writable part as destroyed as well
if (this._writableState) {
this._writableState.destroyed = true;
}
this._destroy(err || null, function (err) {
if (!cb && err) {
processNextTick(emitErrorNT, _this, err);
if (_this._writableState) {
_this._writableState.errorEmitted = true;
}
} else if (cb) {
cb(err);
}
});
}
function undestroy() {
if (this._readableState) {
this._readableState.destroyed = false;
this._readableState.reading = false;
this._readableState.ended = false;
this._readableState.endEmitted = false;
}
if (this._writableState) {
this._writableState.destroyed = false;
this._writableState.ended = false;
this._writableState.ending = false;
this._writableState.finished = false;
this._writableState.errorEmitted = false;
}
}
function emitErrorNT(self, err) {
self.emit('error', err);
}
module.exports = {
destroy: destroy,
undestroy: undestroy
};
},{"process-nextick-args":137}],154:[function(require,module,exports){
module.exports = require('events').EventEmitter;
},{"events":101}],155:[function(require,module,exports){
module.exports = require('./readable').PassThrough
},{"./readable":156}],156:[function(require,module,exports){
exports = module.exports = require('./lib/_stream_readable.js');
exports.Stream = exports;
exports.Readable = exports;
exports.Writable = require('./lib/_stream_writable.js');
exports.Duplex = require('./lib/_stream_duplex.js');
exports.Transform = require('./lib/_stream_transform.js');
exports.PassThrough = require('./lib/_stream_passthrough.js');
},{"./lib/_stream_duplex.js":147,"./lib/_stream_passthrough.js":148,"./lib/_stream_readable.js":149,"./lib/_stream_transform.js":150,"./lib/_stream_writable.js":151}],157:[function(require,module,exports){
module.exports = require('./readable').Transform
},{"./readable":156}],158:[function(require,module,exports){
module.exports = require('./lib/_stream_writable.js');
},{"./lib/_stream_writable.js":151}],159:[function(require,module,exports){
(function (Buffer){
'use strict'
var inherits = require('inherits')
var HashBase = require('hash-base')
function RIPEMD160 () {
HashBase.call(this, 64)
// state
this._a = 0x67452301
this._b = 0xefcdab89
this._c = 0x98badcfe
this._d = 0x10325476
this._e = 0xc3d2e1f0
}
inherits(RIPEMD160, HashBase)
RIPEMD160.prototype._update = function () {
var m = new Array(16)
for (var i = 0; i < 16; ++i) m[i] = this._block.readInt32LE(i * 4)
var al = this._a
var bl = this._b
var cl = this._c
var dl = this._d
var el = this._e
// Mj = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
// K = 0x00000000
// Sj = 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8
al = fn1(al, bl, cl, dl, el, m[0], 0x00000000, 11); cl = rotl(cl, 10)
el = fn1(el, al, bl, cl, dl, m[1], 0x00000000, 14); bl = rotl(bl, 10)
dl = fn1(dl, el, al, bl, cl, m[2], 0x00000000, 15); al = rotl(al, 10)
cl = fn1(cl, dl, el, al, bl, m[3], 0x00000000, 12); el = rotl(el, 10)
bl = fn1(bl, cl, dl, el, al, m[4], 0x00000000, 5); dl = rotl(dl, 10)
al = fn1(al, bl, cl, dl, el, m[5], 0x00000000, 8); cl = rotl(cl, 10)
el = fn1(el, al, bl, cl, dl, m[6], 0x00000000, 7); bl = rotl(bl, 10)
dl = fn1(dl, el, al, bl, cl, m[7], 0x00000000, 9); al = rotl(al, 10)
cl = fn1(cl, dl, el, al, bl, m[8], 0x00000000, 11); el = rotl(el, 10)
bl = fn1(bl, cl, dl, el, al, m[9], 0x00000000, 13); dl = rotl(dl, 10)
al = fn1(al, bl, cl, dl, el, m[10], 0x00000000, 14); cl = rotl(cl, 10)
el = fn1(el, al, bl, cl, dl, m[11], 0x00000000, 15); bl = rotl(bl, 10)
dl = fn1(dl, el, al, bl, cl, m[12], 0x00000000, 6); al = rotl(al, 10)
cl = fn1(cl, dl, el, al, bl, m[13], 0x00000000, 7); el = rotl(el, 10)
bl = fn1(bl, cl, dl, el, al, m[14], 0x00000000, 9); dl = rotl(dl, 10)
al = fn1(al, bl, cl, dl, el, m[15], 0x00000000, 8); cl = rotl(cl, 10)
// Mj = 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8
// K = 0x5a827999
// Sj = 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12
el = fn2(el, al, bl, cl, dl, m[7], 0x5a827999, 7); bl = rotl(bl, 10)
dl = fn2(dl, el, al, bl, cl, m[4], 0x5a827999, 6); al = rotl(al, 10)
cl = fn2(cl, dl, el, al, bl, m[13], 0x5a827999, 8); el = rotl(el, 10)
bl = fn2(bl, cl, dl, el, al, m[1], 0x5a827999, 13); dl = rotl(dl, 10)
al = fn2(al, bl, cl, dl, el, m[10], 0x5a827999, 11); cl = rotl(cl, 10)
el = fn2(el, al, bl, cl, dl, m[6], 0x5a827999, 9); bl = rotl(bl, 10)
dl = fn2(dl, el, al, bl, cl, m[15], 0x5a827999, 7); al = rotl(al, 10)
cl = fn2(cl, dl, el, al, bl, m[3], 0x5a827999, 15); el = rotl(el, 10)
bl = fn2(bl, cl, dl, el, al, m[12], 0x5a827999, 7); dl = rotl(dl, 10)
al = fn2(al, bl, cl, dl, el, m[0], 0x5a827999, 12); cl = rotl(cl, 10)
el = fn2(el, al, bl, cl, dl, m[9], 0x5a827999, 15); bl = rotl(bl, 10)
dl = fn2(dl, el, al, bl, cl, m[5], 0x5a827999, 9); al = rotl(al, 10)
cl = fn2(cl, dl, el, al, bl, m[2], 0x5a827999, 11); el = rotl(el, 10)
bl = fn2(bl, cl, dl, el, al, m[14], 0x5a827999, 7); dl = rotl(dl, 10)
al = fn2(al, bl, cl, dl, el, m[11], 0x5a827999, 13); cl = rotl(cl, 10)
el = fn2(el, al, bl, cl, dl, m[8], 0x5a827999, 12); bl = rotl(bl, 10)
// Mj = 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12
// K = 0x6ed9eba1
// Sj = 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5
dl = fn3(dl, el, al, bl, cl, m[3], 0x6ed9eba1, 11); al = rotl(al, 10)
cl = fn3(cl, dl, el, al, bl, m[10], 0x6ed9eba1, 13); el = rotl(el, 10)
bl = fn3(bl, cl, dl, el, al, m[14], 0x6ed9eba1, 6); dl = rotl(dl, 10)
al = fn3(al, bl, cl, dl, el, m[4], 0x6ed9eba1, 7); cl = rotl(cl, 10)
el = fn3(el, al, bl, cl, dl, m[9], 0x6ed9eba1, 14); bl = rotl(bl, 10)
dl = fn3(dl, el, al, bl, cl, m[15], 0x6ed9eba1, 9); al = rotl(al, 10)
cl = fn3(cl, dl, el, al, bl, m[8], 0x6ed9eba1, 13); el = rotl(el, 10)
bl = fn3(bl, cl, dl, el, al, m[1], 0x6ed9eba1, 15); dl = rotl(dl, 10)
al = fn3(al, bl, cl, dl, el, m[2], 0x6ed9eba1, 14); cl = rotl(cl, 10)
el = fn3(el, al, bl, cl, dl, m[7], 0x6ed9eba1, 8); bl = rotl(bl, 10)
dl = fn3(dl, el, al, bl, cl, m[0], 0x6ed9eba1, 13); al = rotl(al, 10)
cl = fn3(cl, dl, el, al, bl, m[6], 0x6ed9eba1, 6); el = rotl(el, 10)
bl = fn3(bl, cl, dl, el, al, m[13], 0x6ed9eba1, 5); dl = rotl(dl, 10)
al = fn3(al, bl, cl, dl, el, m[11], 0x6ed9eba1, 12); cl = rotl(cl, 10)
el = fn3(el, al, bl, cl, dl, m[5], 0x6ed9eba1, 7); bl = rotl(bl, 10)
dl = fn3(dl, el, al, bl, cl, m[12], 0x6ed9eba1, 5); al = rotl(al, 10)
// Mj = 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2
// K = 0x8f1bbcdc
// Sj = 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12
cl = fn4(cl, dl, el, al, bl, m[1], 0x8f1bbcdc, 11); el = rotl(el, 10)
bl = fn4(bl, cl, dl, el, al, m[9], 0x8f1bbcdc, 12); dl = rotl(dl, 10)
al = fn4(al, bl, cl, dl, el, m[11], 0x8f1bbcdc, 14); cl = rotl(cl, 10)
el = fn4(el, al, bl, cl, dl, m[10], 0x8f1bbcdc, 15); bl = rotl(bl, 10)
dl = fn4(dl, el, al, bl, cl, m[0], 0x8f1bbcdc, 14); al = rotl(al, 10)
cl = fn4(cl, dl, el, al, bl, m[8], 0x8f1bbcdc, 15); el = rotl(el, 10)
bl = fn4(bl, cl, dl, el, al, m[12], 0x8f1bbcdc, 9); dl = rotl(dl, 10)
al = fn4(al, bl, cl, dl, el, m[4], 0x8f1bbcdc, 8); cl = rotl(cl, 10)
el = fn4(el, al, bl, cl, dl, m[13], 0x8f1bbcdc, 9); bl = rotl(bl, 10)
dl = fn4(dl, el, al, bl, cl, m[3], 0x8f1bbcdc, 14); al = rotl(al, 10)
cl = fn4(cl, dl, el, al, bl, m[7], 0x8f1bbcdc, 5); el = rotl(el, 10)
bl = fn4(bl, cl, dl, el, al, m[15], 0x8f1bbcdc, 6); dl = rotl(dl, 10)
al = fn4(al, bl, cl, dl, el, m[14], 0x8f1bbcdc, 8); cl = rotl(cl, 10)
el = fn4(el, al, bl, cl, dl, m[5], 0x8f1bbcdc, 6); bl = rotl(bl, 10)
dl = fn4(dl, el, al, bl, cl, m[6], 0x8f1bbcdc, 5); al = rotl(al, 10)
cl = fn4(cl, dl, el, al, bl, m[2], 0x8f1bbcdc, 12); el = rotl(el, 10)
// Mj = 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
// K = 0xa953fd4e
// Sj = 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
bl = fn5(bl, cl, dl, el, al, m[4], 0xa953fd4e, 9); dl = rotl(dl, 10)
al = fn5(al, bl, cl, dl, el, m[0], 0xa953fd4e, 15); cl = rotl(cl, 10)
el = fn5(el, al, bl, cl, dl, m[5], 0xa953fd4e, 5); bl = rotl(bl, 10)
dl = fn5(dl, el, al, bl, cl, m[9], 0xa953fd4e, 11); al = rotl(al, 10)
cl = fn5(cl, dl, el, al, bl, m[7], 0xa953fd4e, 6); el = rotl(el, 10)
bl = fn5(bl, cl, dl, el, al, m[12], 0xa953fd4e, 8); dl = rotl(dl, 10)
al = fn5(al, bl, cl, dl, el, m[2], 0xa953fd4e, 13); cl = rotl(cl, 10)
el = fn5(el, al, bl, cl, dl, m[10], 0xa953fd4e, 12); bl = rotl(bl, 10)
dl = fn5(dl, el, al, bl, cl, m[14], 0xa953fd4e, 5); al = rotl(al, 10)
cl = fn5(cl, dl, el, al, bl, m[1], 0xa953fd4e, 12); el = rotl(el, 10)
bl = fn5(bl, cl, dl, el, al, m[3], 0xa953fd4e, 13); dl = rotl(dl, 10)
al = fn5(al, bl, cl, dl, el, m[8], 0xa953fd4e, 14); cl = rotl(cl, 10)
el = fn5(el, al, bl, cl, dl, m[11], 0xa953fd4e, 11); bl = rotl(bl, 10)
dl = fn5(dl, el, al, bl, cl, m[6], 0xa953fd4e, 8); al = rotl(al, 10)
cl = fn5(cl, dl, el, al, bl, m[15], 0xa953fd4e, 5); el = rotl(el, 10)
bl = fn5(bl, cl, dl, el, al, m[13], 0xa953fd4e, 6); dl = rotl(dl, 10)
var ar = this._a
var br = this._b
var cr = this._c
var dr = this._d
var er = this._e
// M'j = 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12
// K' = 0x50a28be6
// S'j = 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6
ar = fn5(ar, br, cr, dr, er, m[5], 0x50a28be6, 8); cr = rotl(cr, 10)
er = fn5(er, ar, br, cr, dr, m[14], 0x50a28be6, 9); br = rotl(br, 10)
dr = fn5(dr, er, ar, br, cr, m[7], 0x50a28be6, 9); ar = rotl(ar, 10)
cr = fn5(cr, dr, er, ar, br, m[0], 0x50a28be6, 11); er = rotl(er, 10)
br = fn5(br, cr, dr, er, ar, m[9], 0x50a28be6, 13); dr = rotl(dr, 10)
ar = fn5(ar, br, cr, dr, er, m[2], 0x50a28be6, 15); cr = rotl(cr, 10)
er = fn5(er, ar, br, cr, dr, m[11], 0x50a28be6, 15); br = rotl(br, 10)
dr = fn5(dr, er, ar, br, cr, m[4], 0x50a28be6, 5); ar = rotl(ar, 10)
cr = fn5(cr, dr, er, ar, br, m[13], 0x50a28be6, 7); er = rotl(er, 10)
br = fn5(br, cr, dr, er, ar, m[6], 0x50a28be6, 7); dr = rotl(dr, 10)
ar = fn5(ar, br, cr, dr, er, m[15], 0x50a28be6, 8); cr = rotl(cr, 10)
er = fn5(er, ar, br, cr, dr, m[8], 0x50a28be6, 11); br = rotl(br, 10)
dr = fn5(dr, er, ar, br, cr, m[1], 0x50a28be6, 14); ar = rotl(ar, 10)
cr = fn5(cr, dr, er, ar, br, m[10], 0x50a28be6, 14); er = rotl(er, 10)
br = fn5(br, cr, dr, er, ar, m[3], 0x50a28be6, 12); dr = rotl(dr, 10)
ar = fn5(ar, br, cr, dr, er, m[12], 0x50a28be6, 6); cr = rotl(cr, 10)
// M'j = 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2
// K' = 0x5c4dd124
// S'j = 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11
er = fn4(er, ar, br, cr, dr, m[6], 0x5c4dd124, 9); br = rotl(br, 10)
dr = fn4(dr, er, ar, br, cr, m[11], 0x5c4dd124, 13); ar = rotl(ar, 10)
cr = fn4(cr, dr, er, ar, br, m[3], 0x5c4dd124, 15); er = rotl(er, 10)
br = fn4(br, cr, dr, er, ar, m[7], 0x5c4dd124, 7); dr = rotl(dr, 10)
ar = fn4(ar, br, cr, dr, er, m[0], 0x5c4dd124, 12); cr = rotl(cr, 10)
er = fn4(er, ar, br, cr, dr, m[13], 0x5c4dd124, 8); br = rotl(br, 10)
dr = fn4(dr, er, ar, br, cr, m[5], 0x5c4dd124, 9); ar = rotl(ar, 10)
cr = fn4(cr, dr, er, ar, br, m[10], 0x5c4dd124, 11); er = rotl(er, 10)
br = fn4(br, cr, dr, er, ar, m[14], 0x5c4dd124, 7); dr = rotl(dr, 10)
ar = fn4(ar, br, cr, dr, er, m[15], 0x5c4dd124, 7); cr = rotl(cr, 10)
er = fn4(er, ar, br, cr, dr, m[8], 0x5c4dd124, 12); br = rotl(br, 10)
dr = fn4(dr, er, ar, br, cr, m[12], 0x5c4dd124, 7); ar = rotl(ar, 10)
cr = fn4(cr, dr, er, ar, br, m[4], 0x5c4dd124, 6); er = rotl(er, 10)
br = fn4(br, cr, dr, er, ar, m[9], 0x5c4dd124, 15); dr = rotl(dr, 10)
ar = fn4(ar, br, cr, dr, er, m[1], 0x5c4dd124, 13); cr = rotl(cr, 10)
er = fn4(er, ar, br, cr, dr, m[2], 0x5c4dd124, 11); br = rotl(br, 10)
// M'j = 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13
// K' = 0x6d703ef3
// S'j = 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5
dr = fn3(dr, er, ar, br, cr, m[15], 0x6d703ef3, 9); ar = rotl(ar, 10)
cr = fn3(cr, dr, er, ar, br, m[5], 0x6d703ef3, 7); er = rotl(er, 10)
br = fn3(br, cr, dr, er, ar, m[1], 0x6d703ef3, 15); dr = rotl(dr, 10)
ar = fn3(ar, br, cr, dr, er, m[3], 0x6d703ef3, 11); cr = rotl(cr, 10)
er = fn3(er, ar, br, cr, dr, m[7], 0x6d703ef3, 8); br = rotl(br, 10)
dr = fn3(dr, er, ar, br, cr, m[14], 0x6d703ef3, 6); ar = rotl(ar, 10)
cr = fn3(cr, dr, er, ar, br, m[6], 0x6d703ef3, 6); er = rotl(er, 10)
br = fn3(br, cr, dr, er, ar, m[9], 0x6d703ef3, 14); dr = rotl(dr, 10)
ar = fn3(ar, br, cr, dr, er, m[11], 0x6d703ef3, 12); cr = rotl(cr, 10)
er = fn3(er, ar, br, cr, dr, m[8], 0x6d703ef3, 13); br = rotl(br, 10)
dr = fn3(dr, er, ar, br, cr, m[12], 0x6d703ef3, 5); ar = rotl(ar, 10)
cr = fn3(cr, dr, er, ar, br, m[2], 0x6d703ef3, 14); er = rotl(er, 10)
br = fn3(br, cr, dr, er, ar, m[10], 0x6d703ef3, 13); dr = rotl(dr, 10)
ar = fn3(ar, br, cr, dr, er, m[0], 0x6d703ef3, 13); cr = rotl(cr, 10)
er = fn3(er, ar, br, cr, dr, m[4], 0x6d703ef3, 7); br = rotl(br, 10)
dr = fn3(dr, er, ar, br, cr, m[13], 0x6d703ef3, 5); ar = rotl(ar, 10)
// M'j = 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14
// K' = 0x7a6d76e9
// S'j = 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8
cr = fn2(cr, dr, er, ar, br, m[8], 0x7a6d76e9, 15); er = rotl(er, 10)
br = fn2(br, cr, dr, er, ar, m[6], 0x7a6d76e9, 5); dr = rotl(dr, 10)
ar = fn2(ar, br, cr, dr, er, m[4], 0x7a6d76e9, 8); cr = rotl(cr, 10)
er = fn2(er, ar, br, cr, dr, m[1], 0x7a6d76e9, 11); br = rotl(br, 10)
dr = fn2(dr, er, ar, br, cr, m[3], 0x7a6d76e9, 14); ar = rotl(ar, 10)
cr = fn2(cr, dr, er, ar, br, m[11], 0x7a6d76e9, 14); er = rotl(er, 10)
br = fn2(br, cr, dr, er, ar, m[15], 0x7a6d76e9, 6); dr = rotl(dr, 10)
ar = fn2(ar, br, cr, dr, er, m[0], 0x7a6d76e9, 14); cr = rotl(cr, 10)
er = fn2(er, ar, br, cr, dr, m[5], 0x7a6d76e9, 6); br = rotl(br, 10)
dr = fn2(dr, er, ar, br, cr, m[12], 0x7a6d76e9, 9); ar = rotl(ar, 10)
cr = fn2(cr, dr, er, ar, br, m[2], 0x7a6d76e9, 12); er = rotl(er, 10)
br = fn2(br, cr, dr, er, ar, m[13], 0x7a6d76e9, 9); dr = rotl(dr, 10)
ar = fn2(ar, br, cr, dr, er, m[9], 0x7a6d76e9, 12); cr = rotl(cr, 10)
er = fn2(er, ar, br, cr, dr, m[7], 0x7a6d76e9, 5); br = rotl(br, 10)
dr = fn2(dr, er, ar, br, cr, m[10], 0x7a6d76e9, 15); ar = rotl(ar, 10)
cr = fn2(cr, dr, er, ar, br, m[14], 0x7a6d76e9, 8); er = rotl(er, 10)
// M'j = 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
// K' = 0x00000000
// S'j = 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
br = fn1(br, cr, dr, er, ar, m[12], 0x00000000, 8); dr = rotl(dr, 10)
ar = fn1(ar, br, cr, dr, er, m[15], 0x00000000, 5); cr = rotl(cr, 10)
er = fn1(er, ar, br, cr, dr, m[10], 0x00000000, 12); br = rotl(br, 10)
dr = fn1(dr, er, ar, br, cr, m[4], 0x00000000, 9); ar = rotl(ar, 10)
cr = fn1(cr, dr, er, ar, br, m[1], 0x00000000, 12); er = rotl(er, 10)
br = fn1(br, cr, dr, er, ar, m[5], 0x00000000, 5); dr = rotl(dr, 10)
ar = fn1(ar, br, cr, dr, er, m[8], 0x00000000, 14); cr = rotl(cr, 10)
er = fn1(er, ar, br, cr, dr, m[7], 0x00000000, 6); br = rotl(br, 10)
dr = fn1(dr, er, ar, br, cr, m[6], 0x00000000, 8); ar = rotl(ar, 10)
cr = fn1(cr, dr, er, ar, br, m[2], 0x00000000, 13); er = rotl(er, 10)
br = fn1(br, cr, dr, er, ar, m[13], 0x00000000, 6); dr = rotl(dr, 10)
ar = fn1(ar, br, cr, dr, er, m[14], 0x00000000, 5); cr = rotl(cr, 10)
er = fn1(er, ar, br, cr, dr, m[0], 0x00000000, 15); br = rotl(br, 10)
dr = fn1(dr, er, ar, br, cr, m[3], 0x00000000, 13); ar = rotl(ar, 10)
cr = fn1(cr, dr, er, ar, br, m[9], 0x00000000, 11); er = rotl(er, 10)
br = fn1(br, cr, dr, er, ar, m[11], 0x00000000, 11); dr = rotl(dr, 10)
// change state
var t = (this._b + cl + dr) | 0
this._b = (this._c + dl + er) | 0
this._c = (this._d + el + ar) | 0
this._d = (this._e + al + br) | 0
this._e = (this._a + bl + cr) | 0
this._a = t
}
RIPEMD160.prototype._digest = function () {
// create padding and handle blocks
this._block[this._blockOffset++] = 0x80
if (this._blockOffset > 56) {
this._block.fill(0, this._blockOffset, 64)
this._update()
this._blockOffset = 0
}
this._block.fill(0, this._blockOffset, 56)
this._block.writeUInt32LE(this._length[0], 56)
this._block.writeUInt32LE(this._length[1], 60)
this._update()
// produce result
var buffer = new Buffer(20)
buffer.writeInt32LE(this._a, 0)
buffer.writeInt32LE(this._b, 4)
buffer.writeInt32LE(this._c, 8)
buffer.writeInt32LE(this._d, 12)
buffer.writeInt32LE(this._e, 16)
return buffer
}
function rotl (x, n) {
return (x << n) | (x >>> (32 - n))
}
function fn1 (a, b, c, d, e, m, k, s) {
return (rotl((a + (b ^ c ^ d) + m + k) | 0, s) + e) | 0
}
function fn2 (a, b, c, d, e, m, k, s) {
return (rotl((a + ((b & c) | ((~b) & d)) + m + k) | 0, s) + e) | 0
}
function fn3 (a, b, c, d, e, m, k, s) {
return (rotl((a + ((b | (~c)) ^ d) + m + k) | 0, s) + e) | 0
}
function fn4 (a, b, c, d, e, m, k, s) {
return (rotl((a + ((b & d) | (c & (~d))) + m + k) | 0, s) + e) | 0
}
function fn5 (a, b, c, d, e, m, k, s) {
return (rotl((a + (b ^ (c | (~d))) + m + k) | 0, s) + e) | 0
}
module.exports = RIPEMD160
}).call(this,require("buffer").Buffer)
},{"buffer":65,"hash-base":103,"inherits":119}],160:[function(require,module,exports){
/* eslint-disable node/no-deprecated-api */
var buffer = require('buffer')
var Buffer = buffer.Buffer
// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
for (var key in src) {
dst[key] = src[key]
}
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
module.exports = buffer
} else {
// Copy properties from require('buffer')
copyProps(buffer, exports)
exports.Buffer = SafeBuffer
}
function SafeBuffer (arg, encodingOrOffset, length) {
return Buffer(arg, encodingOrOffset, length)
}
// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)
SafeBuffer.from = function (arg, encodingOrOffset, length) {
if (typeof arg === 'number') {
throw new TypeError('Argument must not be a number')
}
return Buffer(arg, encodingOrOffset, length)
}
SafeBuffer.alloc = function (size, fill, encoding) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
var buf = Buffer(size)
if (fill !== undefined) {
if (typeof encoding === 'string') {
buf.fill(fill, encoding)
} else {
buf.fill(fill)
}
} else {
buf.fill(0)
}
return buf
}
SafeBuffer.allocUnsafe = function (size) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
return Buffer(size)
}
SafeBuffer.allocUnsafeSlow = function (size) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
return buffer.SlowBuffer(size)
}
},{"buffer":65}],161:[function(require,module,exports){
var Buffer = require('safe-buffer').Buffer
// prototype class for hash functions
function Hash (blockSize, finalSize) {
this._block = Buffer.alloc(blockSize)
this._finalSize = finalSize
this._blockSize = blockSize
this._len = 0
}
Hash.prototype.update = function (data, enc) {
if (typeof data === 'string') {
enc = enc || 'utf8'
data = Buffer.from(data, enc)
}
var block = this._block
var blockSize = this._blockSize
var length = data.length
var accum = this._len
for (var offset = 0; offset < length;) {
var assigned = accum % blockSize
var remainder = Math.min(length - offset, blockSize - assigned)
for (var i = 0; i < remainder; i++) {
block[assigned + i] = data[offset + i]
}
accum += remainder
offset += remainder
if ((accum % blockSize) === 0) {
this._update(block)
}
}
this._len += length
return this
}
Hash.prototype.digest = function (enc) {
var rem = this._len % this._blockSize
this._block[rem] = 0x80
// zero (rem + 1) trailing bits, where (rem + 1) is the smallest
// non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize
this._block.fill(0, rem + 1)
if (rem >= this._finalSize) {
this._update(this._block)
this._block.fill(0)
}
var bits = this._len * 8
// uint32
if (bits <= 0xffffffff) {
this._block.writeUInt32BE(bits, this._blockSize - 4)
// uint64
} else {
var lowBits = bits & 0xffffffff
var highBits = (bits - lowBits) / 0x100000000
this._block.writeUInt32BE(highBits, this._blockSize - 8)
this._block.writeUInt32BE(lowBits, this._blockSize - 4)
}
this._update(this._block)
var hash = this._hash()
return enc ? hash.toString(enc) : hash
}
Hash.prototype._update = function () {
throw new Error('_update must be implemented by subclass')
}
module.exports = Hash
},{"safe-buffer":160}],162:[function(require,module,exports){
var exports = module.exports = function SHA (algorithm) {
algorithm = algorithm.toLowerCase()
var Algorithm = exports[algorithm]
if (!Algorithm) throw new Error(algorithm + ' is not supported (we accept pull requests)')
return new Algorithm()
}
exports.sha = require('./sha')
exports.sha1 = require('./sha1')
exports.sha224 = require('./sha224')
exports.sha256 = require('./sha256')
exports.sha384 = require('./sha384')
exports.sha512 = require('./sha512')
},{"./sha":163,"./sha1":164,"./sha224":165,"./sha256":166,"./sha384":167,"./sha512":168}],163:[function(require,module,exports){
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined
* in FIPS PUB 180-1
* This source code is derived from sha1.js of the same repository.
* The difference between SHA-0 and SHA-1 is just a bitwise rotate left
* operation was added.
*/
var inherits = require('inherits')
var Hash = require('./hash')
var Buffer = require('safe-buffer').Buffer
var K = [
0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
]
var W = new Array(80)
function Sha () {
this.init()
this._w = W
Hash.call(this, 64, 56)
}
inherits(Sha, Hash)
Sha.prototype.init = function () {
this._a = 0x67452301
this._b = 0xefcdab89
this._c = 0x98badcfe
this._d = 0x10325476
this._e = 0xc3d2e1f0
return this
}
function rotl5 (num) {
return (num << 5) | (num >>> 27)
}
function rotl30 (num) {
return (num << 30) | (num >>> 2)
}
function ft (s, b, c, d) {
if (s === 0) return (b & c) | ((~b) & d)
if (s === 2) return (b & c) | (b & d) | (c & d)
return b ^ c ^ d
}
Sha.prototype._update = function (M) {
var W = this._w
var a = this._a | 0
var b = this._b | 0
var c = this._c | 0
var d = this._d | 0
var e = this._e | 0
for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
for (; i < 80; ++i) W[i] = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]
for (var j = 0; j < 80; ++j) {
var s = ~~(j / 20)
var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
e = d
d = c
c = rotl30(b)
b = a
a = t
}
this._a = (a + this._a) | 0
this._b = (b + this._b) | 0
this._c = (c + this._c) | 0
this._d = (d + this._d) | 0
this._e = (e + this._e) | 0
}
Sha.prototype._hash = function () {
var H = Buffer.allocUnsafe(20)
H.writeInt32BE(this._a | 0, 0)
H.writeInt32BE(this._b | 0, 4)
H.writeInt32BE(this._c | 0, 8)
H.writeInt32BE(this._d | 0, 12)
H.writeInt32BE(this._e | 0, 16)
return H
}
module.exports = Sha
},{"./hash":161,"inherits":119,"safe-buffer":160}],164:[function(require,module,exports){
/*
* A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
* in FIPS PUB 180-1
* Version 2.1a Copyright Paul Johnston 2000 - 2002.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for details.
*/
var inherits = require('inherits')
var Hash = require('./hash')
var Buffer = require('safe-buffer').Buffer
var K = [
0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0
]
var W = new Array(80)
function Sha1 () {
this.init()
this._w = W
Hash.call(this, 64, 56)
}
inherits(Sha1, Hash)
Sha1.prototype.init = function () {
this._a = 0x67452301
this._b = 0xefcdab89
this._c = 0x98badcfe
this._d = 0x10325476
this._e = 0xc3d2e1f0
return this
}
function rotl1 (num) {
return (num << 1) | (num >>> 31)
}
function rotl5 (num) {
return (num << 5) | (num >>> 27)
}
function rotl30 (num) {
return (num << 30) | (num >>> 2)
}
function ft (s, b, c, d) {
if (s === 0) return (b & c) | ((~b) & d)
if (s === 2) return (b & c) | (b & d) | (c & d)
return b ^ c ^ d
}
Sha1.prototype._update = function (M) {
var W = this._w
var a = this._a | 0
var b = this._b | 0
var c = this._c | 0
var d = this._d | 0
var e = this._e | 0
for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
for (; i < 80; ++i) W[i] = rotl1(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16])
for (var j = 0; j < 80; ++j) {
var s = ~~(j / 20)
var t = (rotl5(a) + ft(s, b, c, d) + e + W[j] + K[s]) | 0
e = d
d = c
c = rotl30(b)
b = a
a = t
}
this._a = (a + this._a) | 0
this._b = (b + this._b) | 0
this._c = (c + this._c) | 0
this._d = (d + this._d) | 0
this._e = (e + this._e) | 0
}
Sha1.prototype._hash = function () {
var H = Buffer.allocUnsafe(20)
H.writeInt32BE(this._a | 0, 0)
H.writeInt32BE(this._b | 0, 4)
H.writeInt32BE(this._c | 0, 8)
H.writeInt32BE(this._d | 0, 12)
H.writeInt32BE(this._e | 0, 16)
return H
}
module.exports = Sha1
},{"./hash":161,"inherits":119,"safe-buffer":160}],165:[function(require,module,exports){
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
* in FIPS 180-2
* Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
*
*/
var inherits = require('inherits')
var Sha256 = require('./sha256')
var Hash = require('./hash')
var Buffer = require('safe-buffer').Buffer
var W = new Array(64)
function Sha224 () {
this.init()
this._w = W // new Array(64)
Hash.call(this, 64, 56)
}
inherits(Sha224, Sha256)
Sha224.prototype.init = function () {
this._a = 0xc1059ed8
this._b = 0x367cd507
this._c = 0x3070dd17
this._d = 0xf70e5939
this._e = 0xffc00b31
this._f = 0x68581511
this._g = 0x64f98fa7
this._h = 0xbefa4fa4
return this
}
Sha224.prototype._hash = function () {
var H = Buffer.allocUnsafe(28)
H.writeInt32BE(this._a, 0)
H.writeInt32BE(this._b, 4)
H.writeInt32BE(this._c, 8)
H.writeInt32BE(this._d, 12)
H.writeInt32BE(this._e, 16)
H.writeInt32BE(this._f, 20)
H.writeInt32BE(this._g, 24)
return H
}
module.exports = Sha224
},{"./hash":161,"./sha256":166,"inherits":119,"safe-buffer":160}],166:[function(require,module,exports){
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
* in FIPS 180-2
* Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
*
*/
var inherits = require('inherits')
var Hash = require('./hash')
var Buffer = require('safe-buffer').Buffer
var K = [
0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
0xD807AA98, 0x12835B01, 0x243185BE, 0x550C7DC3,
0x72BE5D74, 0x80DEB1FE, 0x9BDC06A7, 0xC19BF174,
0xE49B69C1, 0xEFBE4786, 0x0FC19DC6, 0x240CA1CC,
0x2DE92C6F, 0x4A7484AA, 0x5CB0A9DC, 0x76F988DA,
0x983E5152, 0xA831C66D, 0xB00327C8, 0xBF597FC7,
0xC6E00BF3, 0xD5A79147, 0x06CA6351, 0x14292967,
0x27B70A85, 0x2E1B2138, 0x4D2C6DFC, 0x53380D13,
0x650A7354, 0x766A0ABB, 0x81C2C92E, 0x92722C85,
0xA2BFE8A1, 0xA81A664B, 0xC24B8B70, 0xC76C51A3,
0xD192E819, 0xD6990624, 0xF40E3585, 0x106AA070,
0x19A4C116, 0x1E376C08, 0x2748774C, 0x34B0BCB5,
0x391C0CB3, 0x4ED8AA4A, 0x5B9CCA4F, 0x682E6FF3,
0x748F82EE, 0x78A5636F, 0x84C87814, 0x8CC70208,
0x90BEFFFA, 0xA4506CEB, 0xBEF9A3F7, 0xC67178F2
]
var W = new Array(64)
function Sha256 () {
this.init()
this._w = W // new Array(64)
Hash.call(this, 64, 56)
}
inherits(Sha256, Hash)
Sha256.prototype.init = function () {
this._a = 0x6a09e667
this._b = 0xbb67ae85
this._c = 0x3c6ef372
this._d = 0xa54ff53a
this._e = 0x510e527f
this._f = 0x9b05688c
this._g = 0x1f83d9ab
this._h = 0x5be0cd19
return this
}
function ch (x, y, z) {
return z ^ (x & (y ^ z))
}
function maj (x, y, z) {
return (x & y) | (z & (x | y))
}
function sigma0 (x) {
return (x >>> 2 | x << 30) ^ (x >>> 13 | x << 19) ^ (x >>> 22 | x << 10)
}
function sigma1 (x) {
return (x >>> 6 | x << 26) ^ (x >>> 11 | x << 21) ^ (x >>> 25 | x << 7)
}
function gamma0 (x) {
return (x >>> 7 | x << 25) ^ (x >>> 18 | x << 14) ^ (x >>> 3)
}
function gamma1 (x) {
return (x >>> 17 | x << 15) ^ (x >>> 19 | x << 13) ^ (x >>> 10)
}
Sha256.prototype._update = function (M) {
var W = this._w
var a = this._a | 0
var b = this._b | 0
var c = this._c | 0
var d = this._d | 0
var e = this._e | 0
var f = this._f | 0
var g = this._g | 0
var h = this._h | 0
for (var i = 0; i < 16; ++i) W[i] = M.readInt32BE(i * 4)
for (; i < 64; ++i) W[i] = (gamma1(W[i - 2]) + W[i - 7] + gamma0(W[i - 15]) + W[i - 16]) | 0
for (var j = 0; j < 64; ++j) {
var T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + W[j]) | 0
var T2 = (sigma0(a) + maj(a, b, c)) | 0
h = g
g = f
f = e
e = (d + T1) | 0
d = c
c = b
b = a
a = (T1 + T2) | 0
}
this._a = (a + this._a) | 0
this._b = (b + this._b) | 0
this._c = (c + this._c) | 0
this._d = (d + this._d) | 0
this._e = (e + this._e) | 0
this._f = (f + this._f) | 0
this._g = (g + this._g) | 0
this._h = (h + this._h) | 0
}
Sha256.prototype._hash = function () {
var H = Buffer.allocUnsafe(32)
H.writeInt32BE(this._a, 0)
H.writeInt32BE(this._b, 4)
H.writeInt32BE(this._c, 8)
H.writeInt32BE(this._d, 12)
H.writeInt32BE(this._e, 16)
H.writeInt32BE(this._f, 20)
H.writeInt32BE(this._g, 24)
H.writeInt32BE(this._h, 28)
return H
}
module.exports = Sha256
},{"./hash":161,"inherits":119,"safe-buffer":160}],167:[function(require,module,exports){
var inherits = require('inherits')
var SHA512 = require('./sha512')
var Hash = require('./hash')
var Buffer = require('safe-buffer').Buffer
var W = new Array(160)
function Sha384 () {
this.init()
this._w = W
Hash.call(this, 128, 112)
}
inherits(Sha384, SHA512)
Sha384.prototype.init = function () {
this._ah = 0xcbbb9d5d
this._bh = 0x629a292a
this._ch = 0x9159015a
this._dh = 0x152fecd8
this._eh = 0x67332667
this._fh = 0x8eb44a87
this._gh = 0xdb0c2e0d
this._hh = 0x47b5481d
this._al = 0xc1059ed8
this._bl = 0x367cd507
this._cl = 0x3070dd17
this._dl = 0xf70e5939
this._el = 0xffc00b31
this._fl = 0x68581511
this._gl = 0x64f98fa7
this._hl = 0xbefa4fa4
return this
}
Sha384.prototype._hash = function () {
var H = Buffer.allocUnsafe(48)
function writeInt64BE (h, l, offset) {
H.writeInt32BE(h, offset)
H.writeInt32BE(l, offset + 4)
}
writeInt64BE(this._ah, this._al, 0)
writeInt64BE(this._bh, this._bl, 8)
writeInt64BE(this._ch, this._cl, 16)
writeInt64BE(this._dh, this._dl, 24)
writeInt64BE(this._eh, this._el, 32)
writeInt64BE(this._fh, this._fl, 40)
return H
}
module.exports = Sha384
},{"./hash":161,"./sha512":168,"inherits":119,"safe-buffer":160}],168:[function(require,module,exports){
var inherits = require('inherits')
var Hash = require('./hash')
var Buffer = require('safe-buffer').Buffer
var K = [
0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
]
var W = new Array(160)
function Sha512 () {
this.init()
this._w = W
Hash.call(this, 128, 112)
}
inherits(Sha512, Hash)
Sha512.prototype.init = function () {
this._ah = 0x6a09e667
this._bh = 0xbb67ae85
this._ch = 0x3c6ef372
this._dh = 0xa54ff53a
this._eh = 0x510e527f
this._fh = 0x9b05688c
this._gh = 0x1f83d9ab
this._hh = 0x5be0cd19
this._al = 0xf3bcc908
this._bl = 0x84caa73b
this._cl = 0xfe94f82b
this._dl = 0x5f1d36f1
this._el = 0xade682d1
this._fl = 0x2b3e6c1f
this._gl = 0xfb41bd6b
this._hl = 0x137e2179
return this
}
function Ch (x, y, z) {
return z ^ (x & (y ^ z))
}
function maj (x, y, z) {
return (x & y) | (z & (x | y))
}
function sigma0 (x, xl) {
return (x >>> 28 | xl << 4) ^ (xl >>> 2 | x << 30) ^ (xl >>> 7 | x << 25)
}
function sigma1 (x, xl) {
return (x >>> 14 | xl << 18) ^ (x >>> 18 | xl << 14) ^ (xl >>> 9 | x << 23)
}
function Gamma0 (x, xl) {
return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7)
}
function Gamma0l (x, xl) {
return (x >>> 1 | xl << 31) ^ (x >>> 8 | xl << 24) ^ (x >>> 7 | xl << 25)
}
function Gamma1 (x, xl) {
return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6)
}
function Gamma1l (x, xl) {
return (x >>> 19 | xl << 13) ^ (xl >>> 29 | x << 3) ^ (x >>> 6 | xl << 26)
}
function getCarry (a, b) {
return (a >>> 0) < (b >>> 0) ? 1 : 0
}
Sha512.prototype._update = function (M) {
var W = this._w
var ah = this._ah | 0
var bh = this._bh | 0
var ch = this._ch | 0
var dh = this._dh | 0
var eh = this._eh | 0
var fh = this._fh | 0
var gh = this._gh | 0
var hh = this._hh | 0
var al = this._al | 0
var bl = this._bl | 0
var cl = this._cl | 0
var dl = this._dl | 0
var el = this._el | 0
var fl = this._fl | 0
var gl = this._gl | 0
var hl = this._hl | 0
for (var i = 0; i < 32; i += 2) {
W[i] = M.readInt32BE(i * 4)
W[i + 1] = M.readInt32BE(i * 4 + 4)
}
for (; i < 160; i += 2) {
var xh = W[i - 15 * 2]
var xl = W[i - 15 * 2 + 1]
var gamma0 = Gamma0(xh, xl)
var gamma0l = Gamma0l(xl, xh)
xh = W[i - 2 * 2]
xl = W[i - 2 * 2 + 1]
var gamma1 = Gamma1(xh, xl)
var gamma1l = Gamma1l(xl, xh)
// W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
var Wi7h = W[i - 7 * 2]
var Wi7l = W[i - 7 * 2 + 1]
var Wi16h = W[i - 16 * 2]
var Wi16l = W[i - 16 * 2 + 1]
var Wil = (gamma0l + Wi7l) | 0
var Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0
Wil = (Wil + gamma1l) | 0
Wih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0
Wil = (Wil + Wi16l) | 0
Wih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0
W[i] = Wih
W[i + 1] = Wil
}
for (var j = 0; j < 160; j += 2) {
Wih = W[j]
Wil = W[j + 1]
var majh = maj(ah, bh, ch)
var majl = maj(al, bl, cl)
var sigma0h = sigma0(ah, al)
var sigma0l = sigma0(al, ah)
var sigma1h = sigma1(eh, el)
var sigma1l = sigma1(el, eh)
// t1 = h + sigma1 + ch + K[j] + W[j]
var Kih = K[j]
var Kil = K[j + 1]
var chh = Ch(eh, fh, gh)
var chl = Ch(el, fl, gl)
var t1l = (hl + sigma1l) | 0
var t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0
t1l = (t1l + chl) | 0
t1h = (t1h + chh + getCarry(t1l, chl)) | 0
t1l = (t1l + Kil) | 0
t1h = (t1h + Kih + getCarry(t1l, Kil)) | 0
t1l = (t1l + Wil) | 0
t1h = (t1h + Wih + getCarry(t1l, Wil)) | 0
// t2 = sigma0 + maj
var t2l = (sigma0l + majl) | 0
var t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0
hh = gh
hl = gl
gh = fh
gl = fl
fh = eh
fl = el
el = (dl + t1l) | 0
eh = (dh + t1h + getCarry(el, dl)) | 0
dh = ch
dl = cl
ch = bh
cl = bl
bh = ah
bl = al
al = (t1l + t2l) | 0
ah = (t1h + t2h + getCarry(al, t1l)) | 0
}
this._al = (this._al + al) | 0
this._bl = (this._bl + bl) | 0
this._cl = (this._cl + cl) | 0
this._dl = (this._dl + dl) | 0
this._el = (this._el + el) | 0
this._fl = (this._fl + fl) | 0
this._gl = (this._gl + gl) | 0
this._hl = (this._hl + hl) | 0
this._ah = (this._ah + ah + getCarry(this._al, al)) | 0
this._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0
this._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0
this._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0
this._eh = (this._eh + eh + getCarry(this._el, el)) | 0
this._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0
this._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0
this._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0
}
Sha512.prototype._hash = function () {
var H = Buffer.allocUnsafe(64)
function writeInt64BE (h, l, offset) {
H.writeInt32BE(h, offset)
H.writeInt32BE(l, offset + 4)
}
writeInt64BE(this._ah, this._al, 0)
writeInt64BE(this._bh, this._bl, 8)
writeInt64BE(this._ch, this._cl, 16)
writeInt64BE(this._dh, this._dl, 24)
writeInt64BE(this._eh, this._el, 32)
writeInt64BE(this._fh, this._fl, 40)
writeInt64BE(this._gh, this._gl, 48)
writeInt64BE(this._hh, this._hl, 56)
return H
}
module.exports = Sha512
},{"./hash":161,"inherits":119,"safe-buffer":160}],169:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
module.exports = Stream;
var EE = require('events').EventEmitter;
var inherits = require('inherits');
inherits(Stream, EE);
Stream.Readable = require('readable-stream/readable.js');
Stream.Writable = require('readable-stream/writable.js');
Stream.Duplex = require('readable-stream/duplex.js');
Stream.Transform = require('readable-stream/transform.js');
Stream.PassThrough = require('readable-stream/passthrough.js');
// Backwards-compat with node 0.4.x
Stream.Stream = Stream;
// old-style streams. Note that the pipe method (the only relevant
// part of this class) is overridden in the Readable class.
function Stream() {
EE.call(this);
}
Stream.prototype.pipe = function(dest, options) {
var source = this;
function ondata(chunk) {
if (dest.writable) {
if (false === dest.write(chunk) && source.pause) {
source.pause();
}
}
}
source.on('data', ondata);
function ondrain() {
if (source.readable && source.resume) {
source.resume();
}
}
dest.on('drain', ondrain);
// If the 'end' option is not supplied, dest.end() will be called when
// source gets the 'end' or 'close' events. Only dest.end() once.
if (!dest._isStdio && (!options || options.end !== false)) {
source.on('end', onend);
source.on('close', onclose);
}
var didOnEnd = false;
function onend() {
if (didOnEnd) return;
didOnEnd = true;
dest.end();
}
function onclose() {
if (didOnEnd) return;
didOnEnd = true;
if (typeof dest.destroy === 'function') dest.destroy();
}
// don't leave dangling pipes when there are errors.
function onerror(er) {
cleanup();
if (EE.listenerCount(this, 'error') === 0) {
throw er; // Unhandled stream error in pipe.
}
}
source.on('error', onerror);
dest.on('error', onerror);
// remove all the event listeners that were added.
function cleanup() {
source.removeListener('data', ondata);
dest.removeListener('drain', ondrain);
source.removeListener('end', onend);
source.removeListener('close', onclose);
source.removeListener('error', onerror);
dest.removeListener('error', onerror);
source.removeListener('end', cleanup);
source.removeListener('close', cleanup);
dest.removeListener('close', cleanup);
}
source.on('end', cleanup);
source.on('close', cleanup);
dest.on('close', cleanup);
dest.emit('pipe', source);
// Allow for unix-like usage: A.pipe(B).pipe(C)
return dest;
};
},{"events":101,"inherits":119,"readable-stream/duplex.js":146,"readable-stream/passthrough.js":155,"readable-stream/readable.js":156,"readable-stream/transform.js":157,"readable-stream/writable.js":158}],170:[function(require,module,exports){
'use strict';
var Buffer = require('safe-buffer').Buffer;
var isEncoding = Buffer.isEncoding || function (encoding) {
encoding = '' + encoding;
switch (encoding && encoding.toLowerCase()) {
case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw':
return true;
default:
return false;
}
};
function _normalizeEncoding(enc) {
if (!enc) return 'utf8';
var retried;
while (true) {
switch (enc) {
case 'utf8':
case 'utf-8':
return 'utf8';
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return 'utf16le';
case 'latin1':
case 'binary':
return 'latin1';
case 'base64':
case 'ascii':
case 'hex':
return enc;
default:
if (retried) return; // undefined
enc = ('' + enc).toLowerCase();
retried = true;
}
}
};
// Do not cache `Buffer.isEncoding` when checking encoding names as some
// modules monkey-patch it to support additional encodings
function normalizeEncoding(enc) {
var nenc = _normalizeEncoding(enc);
if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
return nenc || enc;
}
// StringDecoder provides an interface for efficiently splitting a series of
// buffers into a series of JS strings without breaking apart multi-byte
// characters.
exports.StringDecoder = StringDecoder;
function StringDecoder(encoding) {
this.encoding = normalizeEncoding(encoding);
var nb;
switch (this.encoding) {
case 'utf16le':
this.text = utf16Text;
this.end = utf16End;
nb = 4;
break;
case 'utf8':
this.fillLast = utf8FillLast;
nb = 4;
break;
case 'base64':
this.text = base64Text;
this.end = base64End;
nb = 3;
break;
default:
this.write = simpleWrite;
this.end = simpleEnd;
return;
}
this.lastNeed = 0;
this.lastTotal = 0;
this.lastChar = Buffer.allocUnsafe(nb);
}
StringDecoder.prototype.write = function (buf) {
if (buf.length === 0) return '';
var r;
var i;
if (this.lastNeed) {
r = this.fillLast(buf);
if (r === undefined) return '';
i = this.lastNeed;
this.lastNeed = 0;
} else {
i = 0;
}
if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
return r || '';
};
StringDecoder.prototype.end = utf8End;
// Returns only complete characters in a Buffer
StringDecoder.prototype.text = utf8Text;
// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
StringDecoder.prototype.fillLast = function (buf) {
if (this.lastNeed <= buf.length) {
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
}
buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
this.lastNeed -= buf.length;
};
// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
// continuation byte.
function utf8CheckByte(byte) {
if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
return -1;
}
// Checks at most 3 bytes at the end of a Buffer in order to detect an
// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
// needed to complete the UTF-8 character (if applicable) are returned.
function utf8CheckIncomplete(self, buf, i) {
var j = buf.length - 1;
if (j < i) return 0;
var nb = utf8CheckByte(buf[j]);
if (nb >= 0) {
if (nb > 0) self.lastNeed = nb - 1;
return nb;
}
if (--j < i) return 0;
nb = utf8CheckByte(buf[j]);
if (nb >= 0) {
if (nb > 0) self.lastNeed = nb - 2;
return nb;
}
if (--j < i) return 0;
nb = utf8CheckByte(buf[j]);
if (nb >= 0) {
if (nb > 0) {
if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
}
return nb;
}
return 0;
}
// Validates as many continuation bytes for a multi-byte UTF-8 character as
// needed or are available. If we see a non-continuation byte where we expect
// one, we "replace" the validated continuation bytes we've seen so far with
// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding
// behavior. The continuation byte check is included three times in the case
// where all of the continuation bytes for a character exist in the same buffer.
// It is also done this way as a slight performance increase instead of using a
// loop.
function utf8CheckExtraBytes(self, buf, p) {
if ((buf[0] & 0xC0) !== 0x80) {
self.lastNeed = 0;
return '\ufffd'.repeat(p);
}
if (self.lastNeed > 1 && buf.length > 1) {
if ((buf[1] & 0xC0) !== 0x80) {
self.lastNeed = 1;
return '\ufffd'.repeat(p + 1);
}
if (self.lastNeed > 2 && buf.length > 2) {
if ((buf[2] & 0xC0) !== 0x80) {
self.lastNeed = 2;
return '\ufffd'.repeat(p + 2);
}
}
}
}
// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
function utf8FillLast(buf) {
var p = this.lastTotal - this.lastNeed;
var r = utf8CheckExtraBytes(this, buf, p);
if (r !== undefined) return r;
if (this.lastNeed <= buf.length) {
buf.copy(this.lastChar, p, 0, this.lastNeed);
return this.lastChar.toString(this.encoding, 0, this.lastTotal);
}
buf.copy(this.lastChar, p, 0, buf.length);
this.lastNeed -= buf.length;
}
// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
// partial character, the character's bytes are buffered until the required
// number of bytes are available.
function utf8Text(buf, i) {
var total = utf8CheckIncomplete(this, buf, i);
if (!this.lastNeed) return buf.toString('utf8', i);
this.lastTotal = total;
var end = buf.length - (total - this.lastNeed);
buf.copy(this.lastChar, 0, end);
return buf.toString('utf8', i, end);
}
// For UTF-8, a replacement character for each buffered byte of a (partial)
// character needs to be added to the output.
function utf8End(buf) {
var r = buf && buf.length ? this.write(buf) : '';
if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed);
return r;
}
// UTF-16LE typically needs two bytes per character, but even if we have an even
// number of bytes available, we need to check if we end on a leading/high
// surrogate. In that case, we need to wait for the next two bytes in order to
// decode the last character properly.
function utf16Text(buf, i) {
if ((buf.length - i) % 2 === 0) {
var r = buf.toString('utf16le', i);
if (r) {
var c = r.charCodeAt(r.length - 1);
if (c >= 0xD800 && c <= 0xDBFF) {
this.lastNeed = 2;
this.lastTotal = 4;
this.lastChar[0] = buf[buf.length - 2];
this.lastChar[1] = buf[buf.length - 1];
return r.slice(0, -1);
}
}
return r;
}
this.lastNeed = 1;
this.lastTotal = 2;
this.lastChar[0] = buf[buf.length - 1];
return buf.toString('utf16le', i, buf.length - 1);
}
// For UTF-16LE we do not explicitly append special replacement characters if we
// end on a partial character, we simply let v8 handle that.
function utf16End(buf) {
var r = buf && buf.length ? this.write(buf) : '';
if (this.lastNeed) {
var end = this.lastTotal - this.lastNeed;
return r + this.lastChar.toString('utf16le', 0, end);
}
return r;
}
function base64Text(buf, i) {
var n = (buf.length - i) % 3;
if (n === 0) return buf.toString('base64', i);
this.lastNeed = 3 - n;
this.lastTotal = 3;
if (n === 1) {
this.lastChar[0] = buf[buf.length - 1];
} else {
this.lastChar[0] = buf[buf.length - 2];
this.lastChar[1] = buf[buf.length - 1];
}
return buf.toString('base64', i, buf.length - n);
}
function base64End(buf) {
var r = buf && buf.length ? this.write(buf) : '';
if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
return r;
}
// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
function simpleWrite(buf) {
return buf.toString(this.encoding);
}
function simpleEnd(buf) {
return buf && buf.length ? this.write(buf) : '';
}
},{"safe-buffer":160}],171:[function(require,module,exports){
(function (global){
/**
* Module exports.
*/
module.exports = deprecate;
/**
* Mark that a method should not be used.
* Returns a modified function which warns once by default.
*
* If `localStorage.noDeprecation = true` is set, then it is a no-op.
*
* If `localStorage.throwDeprecation = true` is set, then deprecated functions
* will throw an Error when invoked.
*
* If `localStorage.traceDeprecation = true` is set, then deprecated functions
* will invoke `console.trace()` instead of `console.error()`.
*
* @param {Function} fn - the function to deprecate
* @param {String} msg - the string to print to the console when `fn` is invoked
* @returns {Function} a new "deprecated" version of `fn`
* @api public
*/
function deprecate (fn, msg) {
if (config('noDeprecation')) {
return fn;
}
var warned = false;
function deprecated() {
if (!warned) {
if (config('throwDeprecation')) {
throw new Error(msg);
} else if (config('traceDeprecation')) {
console.trace(msg);
} else {
console.warn(msg);
}
warned = true;
}
return fn.apply(this, arguments);
}
return deprecated;
}
/**
* Checks `localStorage` for boolean values for the given `name`.
*
* @param {String} name
* @returns {Boolean}
* @api private
*/
function config (name) {
// accessing global.localStorage can trigger a DOMException in sandboxed iframes
try {
if (!global.localStorage) return false;
} catch (_) {
return false;
}
var val = global.localStorage[name];
if (null == val) return false;
return String(val).toLowerCase() === 'true';
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],172:[function(require,module,exports){
var indexOf = require('indexof');
var Object_keys = function (obj) {
if (Object.keys) return Object.keys(obj)
else {
var res = [];
for (var key in obj) res.push(key)
return res;
}
};
var forEach = function (xs, fn) {
if (xs.forEach) return xs.forEach(fn)
else for (var i = 0; i < xs.length; i++) {
fn(xs[i], i, xs);
}
};
var defineProp = (function() {
try {
Object.defineProperty({}, '_', {});
return function(obj, name, value) {
Object.defineProperty(obj, name, {
writable: true,
enumerable: false,
configurable: true,
value: value
})
};
} catch(e) {
return function(obj, name, value) {
obj[name] = value;
};
}
}());
var globals = ['Array', 'Boolean', 'Date', 'Error', 'EvalError', 'Function',
'Infinity', 'JSON', 'Math', 'NaN', 'Number', 'Object', 'RangeError',
'ReferenceError', 'RegExp', 'String', 'SyntaxError', 'TypeError', 'URIError',
'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape',
'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape'];
function Context() {}
Context.prototype = {};
var Script = exports.Script = function NodeScript (code) {
if (!(this instanceof Script)) return new Script(code);
this.code = code;
};
Script.prototype.runInContext = function (context) {
if (!(context instanceof Context)) {
throw new TypeError("needs a 'context' argument.");
}
var iframe = document.createElement('iframe');
if (!iframe.style) iframe.style = {};
iframe.style.display = 'none';
document.body.appendChild(iframe);
var win = iframe.contentWindow;
var wEval = win.eval, wExecScript = win.execScript;
if (!wEval && wExecScript) {
// win.eval() magically appears when this is called in IE:
wExecScript.call(win, 'null');
wEval = win.eval;
}
forEach(Object_keys(context), function (key) {
win[key] = context[key];
});
forEach(globals, function (key) {
if (context[key]) {
win[key] = context[key];
}
});
var winKeys = Object_keys(win);
var res = wEval.call(win, this.code);
forEach(Object_keys(win), function (key) {
// Avoid copying circular objects like `top` and `window` by only
// updating existing context properties or new properties in the `win`
// that was only introduced after the eval.
if (key in context || indexOf(winKeys, key) === -1) {
context[key] = win[key];
}
});
forEach(globals, function (key) {
if (!(key in context)) {
defineProp(context, key, win[key]);
}
});
document.body.removeChild(iframe);
return res;
};
Script.prototype.runInThisContext = function () {
return eval(this.code); // maybe...
};
Script.prototype.runInNewContext = function (context) {
var ctx = Script.createContext(context);
var res = this.runInContext(ctx);
forEach(Object_keys(ctx), function (key) {
context[key] = ctx[key];
});
return res;
};
forEach(Object_keys(Script.prototype), function (name) {
exports[name] = Script[name] = function (code) {
var s = Script(code);
return s[name].apply(s, [].slice.call(arguments, 1));
};
});
exports.createScript = function (code) {
return exports.Script(code);
};
exports.createContext = Script.createContext = function (context) {
var copy = new Context();
if(typeof context === 'object') {
forEach(Object_keys(context), function (key) {
copy[key] = context[key];
});
}
return copy;
};
},{"indexof":118}]},{},[18]);
/*
* Copyright 2011 Alexandru Craciun, Eyal Kaspi
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**** Functionality in Java, but not in JS ********
* methods added to JS prototypes
*/
var stjs={};
stjs.NOT_IMPLEMENTED = function(){
throw "This method is not implemented in Javascript.";
};
stjs.JavalikeEquals = function(value){
if (value == null)
return false;
if (value.valueOf)
return this.valueOf() === value.valueOf();
return this === value;
};
stjs.JavalikeGetClass = function(){
return this.constructor;
};
/* String */
if (!String.prototype.equals) {
String.prototype.equals=stjs.JavalikeEquals;
}
if (!String.prototype.getBytes) {
String.prototype.getBytes=stjs.NOT_IMPLEMENTED;
}
if (!String.prototype.getChars) {
String.prototype.getChars=stjs.NOT_IMPLEMENTED;
}
if (!String.prototype.contentEquals){
String.prototype.contentEquals=stjs.NOT_IMPLEMENTED;
}
if (!String.prototype.startsWith) {
String.prototype.startsWith=function(start, from){
var f = from != null ? from : 0;
return this.substring(f, f + start.length) == start;
}
}
if (!String.prototype.endsWith) {
String.prototype.endsWith=function(end){
if (end == null)
return false;
if (this.length < end.length)
return false;
return this.substring(this.length - end.length, this.length) == end;
}
}
if (!String.prototype.trim) {
stjs.trimLeftRegExp = /^\s+/;
stjs.trimRightRegExp = /\s+$/;
String.prototype.trim = function() {
return this.replace(stjs.trimLeftRegExp, "").replace(stjs.trimRightRegExp, "");
}
}
if (!String.prototype.matches){
String.prototype.matches=function(regexp){
return this.match("^" + regexp + "$") != null;
}
}
if (!String.prototype.compareTo){
String.prototype.compareTo=function(other){
if (other == null)
return 1;
if (this < other)
return -1;
if (this == other)
return 0;
return 1;
}
}
if (!String.prototype.compareToIgnoreCase){
String.prototype.compareToIgnoreCase=function(other){
if (other == null)
return 1;
return this.toLowerCase().compareTo(other.toLowerCase());
}
}
if (!String.prototype.equalsIgnoreCase){
String.prototype.equalsIgnoreCase=function(other){
if (other == null)
return false;
return this.toLowerCase() === other.toLowerCase();
}
}
if (!String.prototype.codePointAt){
String.prototype.codePointAt=String.prototype.charCodeAt;
}
if (!String.prototype.codePointBefore){
String.prototype.codePointBefore=stjs.NOT_IMPLEMENTED;
}
if (!String.prototype.codePointCount){
String.prototype.codePointCount=stjs.NOT_IMPLEMENTED;
}
if (!String.prototype.replaceAll){
String.prototype.replaceAll=function(regexp, replace){
return this.replace(new RegExp(regexp, "g"), replace);
}
}
if (!String.prototype.replaceFirst){
String.prototype.replaceFirst=function(regexp, replace){
return this.replace(new RegExp(regexp), replace);
}
}
if (!String.prototype.regionMatches){
String.prototype.regionMatches=function(ignoreCase, toffset, other, ooffset, len){
if (arguments.length == 4){
len=arguments[3];
ooffset=arguments[2];
other=arguments[1];
toffset=arguments[0];
ignoreCase=false;
}
if (toffset < 0 || ooffset < 0 || other == null || toffset + len > this.length || ooffset + len > other.length)
return false;
var s1 = this.substring(toffset, toffset + len);
var s2 = other.substring(ooffset, ooffset + len);
return ignoreCase ? s1.equalsIgnoreCase(s2) : s1 === s2;
}
}
if(!String.prototype.contains){
String.prototype.contains=function(it){
return this.indexOf(it)>=0;
};
}
if(!String.prototype.getClass){
String.prototype.getClass=stjs.JavalikeGetClass;
}
//force valueof to match the Java's behavior
String.valueOf=function(value){
return new String(value);
};
/* Number */
var Byte=Number;
var Double=Number;
var Float=Number;
var Integer=Number;
var Long=Number;
var Short=Number;
/* type conversion - approximative as Javascript only has integers and doubles */
if (!Number.prototype.intValue) {
Number.prototype.intValue=function(){
return parseInt(this);
}
}
if (!Number.prototype.shortValue) {
Number.prototype.shortValue=function(){
return parseInt(this);
}
}
if (!Number.prototype.longValue) {
Number.prototype.longValue=function(){
return parseInt(this);
}
}
if (!Number.prototype.byteValue) {
Number.prototype.byteValue=function(){
return parseInt(this);
}
}
if (!Number.prototype.floatValue) {
Number.prototype.floatValue=function(){
return parseFloat(this);
}
}
if (!Number.prototype.doubleValue) {
Number.prototype.doubleValue=function(){
return parseFloat(this);
}
}
if (!Number.parseInt) {
Number.parseInt = parseInt;
}
if (!Number.parseShort) {
Number.parseShort = parseInt;
}
if (!Number.parseLong) {
Number.parseLong = parseInt;
}
if (!Number.parseByte) {
Number.parseByte = parseInt;
}
if (!Number.parseDouble) {
Number.parseDouble = parseFloat;
}
if (!Number.parseFloat) {
Number.parseFloat = parseFloat;
}
if (!Number.isNaN) {
Number.isNaN = isNaN;
}
if (!Number.prototype.isNaN) {
Number.prototype.isNaN = function() {
return isNaN(this);
}
}
if (!Number.prototype.equals) {
Number.prototype.equals=stjs.JavalikeEquals;
}
if(!Number.prototype.getClass){
Number.prototype.getClass=stjs.JavalikeGetClass;
}
//force valueof to match approximately the Java's behavior (for Integer.valueOf it returns in fact a double)
Number.valueOf=function(value){
return new Number(value).valueOf();
}
/* Boolean */
if (!Boolean.prototype.equals) {
Boolean.prototype.equals=stjs.JavalikeEquals;
}
if(!Boolean.prototype.getClass){
Boolean.prototype.getClass=stjs.JavalikeGetClass;
}
//force valueof to match the Java's behavior
Boolean.valueOf=function(value){
return new Boolean(value).valueOf();
}
/************* STJS helper functions ***************/
stjs.global=this;
stjs.skipCopy = {"prototype":true, "constructor": true, "$typeDescription":true, "$inherit" : true};
stjs.ns=function(path){
var p = path.split(".");
var obj = stjs.global;
for(var i = 0; i < p.length; ++i){
var part = p[i];
obj = obj[part] = obj[part] || {};
}
return obj;
};
stjs.copyProps=function(from, to){
for(var key in from){
if (!stjs.skipCopy[key])
to[key] = from[key];
}
return to;
};
stjs.copyInexistentProps=function(from, to){
for(var key in from){
if (!stjs.skipCopy[key] && !to[key])
to[key] = from[key];
}
return to;
};
stjs.extend=function(_constructor, _super, _implements, _initializer, _typeDescription, _annotations){
if(typeof(_typeDescription) !== "object"){
// stjs 1.3+ always passes an non-null object to _typeDescription => The code calling stjs.extend
// was generated with version 1.2 or earlier, so let's call the 1.2 version of stjs.extend
return stjs.extend12.apply(this, arguments);
}
_constructor.$inherit=[];
if(_super != null){
// I is used as a no-op constructor that has the same prototype as _super
// we do this because we cannot predict the result of calling new _super()
// without parameters (it might throw an exception).
// Basically, the following 3 lines are a safe equivalent for
// _constructor.prototype = new _super();
var I = function(){};
I.prototype = _super.prototype;
_constructor.prototype = new I();
// copy static properties for super
// assign every method from proto instance
stjs.copyProps(_super, _constructor);
stjs.copyProps(_super.$typeDescription, _typeDescription);
stjs.copyProps(_super.$annotations, _annotations);
//add the super class to inherit array
_constructor.$inherit.push(_super);
}
// copy static properties and default methods from interfaces
for(var a = 0; a < _implements.length; ++a){
if (!_implements[a]) continue;
stjs.copyProps(_implements[a], _constructor);
stjs.copyInexistentProps(_implements[a].prototype, _constructor.prototype);
_constructor.$inherit.push(_implements[a]);
}
// remember the correct constructor
_constructor.prototype.constructor = _constructor;
// run the initializer to assign all static and instance variables/functions
if(_initializer != null){
_initializer(_constructor, _constructor.prototype);
}
_constructor.$typeDescription = _typeDescription;
_constructor.$annotations = _annotations;
// add the default equals method if it is not present yet, and we don't have a superclass
if(_super == null){
if(!_constructor.prototype.equals) {
_constructor.prototype.equals = stjs.JavalikeEquals;
}
if(!_constructor.prototype.getClass) {
_constructor.prototype.getClass = stjs.JavalikeGetClass;
}
}
// build package and assign
return _constructor;
};
/**
* 1.2 and earlier version of stjs.extend. Included for backwards compatibility
*/
stjs.extend12=function( _constructor, _super, _implements){
var I = function(){};
I.prototype = _super.prototype;
_constructor.prototype = new I();
//copy static properties for super and interfaces
// assign every method from proto instance
for(var a = 1; a < arguments.length; ++a){
stjs.copyProps(arguments[a], _constructor);
}
// remember the correct constructor
_constructor.prototype.constructor = _constructor;
// add the default equals method if we don't have a superclass. Code generated with version 1.2 will
// override this method is equals() is present in the original java code.
// this was not part of the original 1.2 version of extends, however forward compatibility
// with 1.3 requires it
if(_super == null){
_constructor.prototype.equals = stjs.JavalikeEquals;
_constructor.prototype.getClass = stjs.JavalikeGetClass;
}
// build package and assign
return _constructor;
};
/**
* return type's annotations
*/
stjs.getAnnotations = function(clz) {
return clz.$annotations;
};
stjs.getTypeAnnotation = function(clz, annType) {
var ann = clz.$annotations._;
return ann ? ann[annType]: null;
};
stjs.getMemberAnnotation = function(clz, memberName, annType) {
var ann = clz.$annotations.memberName;
return ann ? ann[annType]: null;
};
stjs.getParameterAnnotation = function(clz, methodName, idx, annType) {
var ann = clz.$annotations[methodName + "$" + idx];
return ann ? ann[annType]: null;
};
/**
* checks if the child is an instanceof parent. it checks recursively if "parent" is the child itself or it's found somewhere in the $inherit array
*/
stjs.isInstanceOf=function(child, parent){
if (child == null)
return false;
if (child === parent)
return true;
if (!child.$inherit)
return false;
for(var i = 0; i < child.$inherit.length; ++i){
if (stjs.isInstanceOf(child.$inherit[i], parent)) {
return true;
}
}
return false;
}
stjs.enumEntry=function(idx, name){
this._name = name;
this._ordinal = idx;
};
stjs.enumEntry.prototype.name=function(){
return this._name;
};
stjs.enumEntry.prototype.ordinal=function(){
return this._ordinal;
};
stjs.enumEntry.prototype.toString=function(){
return this._name;
};
stjs.enumEntry.prototype.equals=stjs.JavalikeEquals;
stjs.enumeration=function(){
var i;
var e = {};
e._values = [];
for(i = 0; i < arguments.length; ++i){
e[arguments[i]] = new stjs.enumEntry(i, arguments[i]);
e._values[i] = e[arguments[i]];
}
e.values = function(){return this._values;};
e.valueOf=function(label){
return this[label];
}
return e;
};
/**
* if true the execution of generated main methods is disabled.
* this is useful when executing unit tests, to no have the main methods executing before the tests
*/
stjs.mainCallDisabled = false;
stjs.exception=function(err){
return err;
};
stjs.isEnum=function(obj){
return obj != null && obj.constructor == stjs.enumEntry;
};
if (typeof Math.trunc === "function") {
stjs.trunc = Math.trunc;
} else {
stjs.trunc=function(n) {
if (n == null)
return null;
return n >= 0 ? Math.floor(n) : Math.ceil(n);
}
}
stjs.converters = {
Date : function(s, type) {
var a = /^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)$/
.exec(s);
if (a) {
return new Date(+a[1], +a[2] - 1, +a[3], +a[4], +a[5], +a[6]);
}
return null;
},
Enum : function(s, type){
return eval(type.arguments[0])[s];
}
};
stjs.serializers = {
Date : function(d, type) {
function pad(n){
return n < 10 ? "0" + n : "" + n;
}
if (d) {
return "" + d.getFullYear() + "-" + pad(d.getMonth()+1) + "-" + pad(d.getDate()) + " " + pad(d.getHours()) + ":" + pad(d.getMinutes()) + ":" + pad(d.getSeconds());
}
return null;
},
Enum : function(e, type){
return e != null ? e.toString() : null;
}
};
/**
* Used to be able to send method references and lambdas that capture 'this' as callbacks.
* This method has a bunch of different usage patterns:
*
* bind(instance, "methodName"):
* Used when translating a capturing method reference (eg: instance::methodName), or when translating
*
* bind(this, function):
* Used when translating a lambda that uses 'this' explicitly or implicitly (eg: () -> this.doSomething(3))
*
* bind(this, function, specialTHISparamPosition)
* Used when translating a lambda that uses the special all-caps 'THIS' parameter
*
* bind("methodName")
* Used when translating a non-static method reference (eg: TypeName::methodName, where methodName is non-static)
*/
stjs.bind=function(obj, method, thisParamPos) {
var useFirstParamAsContext = false;
if(method == null) {
// the bind("methodName") is the only usage where the method argument can be null
method = obj;
obj = null;
useFirstParamAsContext = true;
}
var addThisToParameters = thisParamPos != null;
var f = function(){
var args = arguments;
if (addThisToParameters) {
Array.prototype.splice.call(args, thisParamPos, 0, this);
}
if(useFirstParamAsContext){
obj = Array.prototype.shift.call(args);
}
if (typeof method === "string") {
return obj[method].apply(obj, args);
} else {
return method.apply(obj, args);
}
};
return f;
};
/** *********** global ************** */
function exception(err){
return err;
}
function isEnum(obj){
return obj != null && obj.constructor == stjs.enumEntry;
}
/******* parsing *************/
/**
* parse a json string using the type definition to build a typed object hierarchy
*/
stjs.parseJSON = (function () {
var number
= '(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)';
var oneChar = '(?:[^\\0-\\x08\\x0a-\\x1f\"\\\\]'
+ '|\\\\(?:[\"/\\\\bfnrt]|u[0-9A-Fa-f]{4}))';
var string = '(?:\"' + oneChar + '*\")';
// Will match a value in a well-formed JSON file.
// If the input is not well-formed, may match strangely, but not in an unsafe
// way.
// Since this only matches value tokens, it does not match whitespace, colons,
// or commas.
var jsonToken = new RegExp(
'(?:false|true|null|[\\{\\}\\[\\]]'
+ '|' + number
+ '|' + string
+ ')', 'g');
// Matches escape sequences in a string literal
var escapeSequence = new RegExp('\\\\(?:([^u])|u(.{4}))', 'g');
// Decodes escape sequences in object literals
var escapes = {
'"': '"',
'/': '/',
'\\': '\\',
'b': '\b',
'f': '\f',
'n': '\n',
'r': '\r',
't': '\t'
};
function unescapeOne(_, ch, hex) {
return ch ? escapes[ch] : String.fromCharCode(parseInt(hex, 16));
}
var constructors = {};
function constr(name, param){
var c = constructors[name];
if (!c)
constructors[name] = c = eval(name);
return new c(param);
}
function convert(type, json){
if (!type)
return json;
var cv = stjs.converters[type.name || type];
if (cv)
return cv(json, type);
//hopefully the type has a string constructor
return constr(type, json);
}
function builder(type){
if (!type)
return {};
if (typeof type == "function")
return new type();
if (type.name) {
if (type.name == "Map")
return {};
if (type.name == "Array")
return [];
return constr(type.name);
}
return constr(type);
}
// A non-falsy value that coerces to the empty string when used as a key.
var EMPTY_STRING = new String('');
var SLASH = '\\';
// Constructor to use based on an open token.
var firstTokenCtors = { '{': Object, '[': Array };
var hop = Object.hasOwnProperty;
function nextMatch(str){
var m = jsonToken.exec(str);
return m != null ? m[0] : null;
}
return function (json, type) {
// Split into tokens
// Construct the object to return
var result;
var tok = nextMatch(json);
var topLevelPrimitive = false;
if ('{' === tok) {
result = builder(type, null);
} else if ('[' === tok) {
result = [];
} else {
// The RFC only allows arrays or objects at the top level, but the JSON.parse
// defined by the EcmaScript 5 draft does allow strings, booleans, numbers, and null
// at the top level.
result = [];
topLevelPrimitive = true;
}
// If undefined, the key in an object key/value record to use for the next
// value parsed.
var key;
// Loop over remaining tokens maintaining a stack of uncompleted objects and
// arrays.
var stack = [result];
var stack2 = [type];
for (tok = nextMatch(json); tok != null; tok = nextMatch(json)) {
var cont;
switch (tok.charCodeAt(0)) {
default: // sign or digit
cont = stack[0];
cont[key || cont.length] = +(tok);
key = void 0;
break;
case 0x22: // '"'
tok = tok.substring(1, tok.length - 1);
if (tok.indexOf(SLASH) !== -1) {
tok = tok.replace(escapeSequence, unescapeOne);
}
cont = stack[0];
if (!key) {
if (cont instanceof Array) {
key = cont.length;
} else {
key = tok || EMPTY_STRING; // Use as key for next value seen.
stack2[0] = cont.constructor.$typeDescription ? cont.constructor.$typeDescription[key] : stack2[1].arguments[1];
break;
}
}
cont[key] = convert(stack2[0],tok);
key = void 0;
break;
case 0x5b: // '['
cont = stack[0];
stack.unshift(cont[key || cont.length] = []);
stack2.unshift(stack2[0].arguments[0]);
//put the element type desc
key = void 0;
break;
case 0x5d: // ']'
stack.shift();
stack2.shift();
break;
case 0x66: // 'f'
cont = stack[0];
cont[key || cont.length] = false;
key = void 0;
break;
case 0x6e: // 'n'
cont = stack[0];
cont[key || cont.length] = null;
key = void 0;
break;
case 0x74: // 't'
cont = stack[0];
cont[key || cont.length] = true;
key = void 0;
break;
case 0x7b: // '{'
cont = stack[0];
stack.unshift(cont[key || cont.length] = builder(stack2[0]));
stack2.unshift(null);
key = void 0;
break;
case 0x7d: // '}'
stack.shift();
stack2.shift();
break;
}
}
// Fail if we've got an uncompleted object.
if (topLevelPrimitive) {
if (stack.length !== 1) { throw new Error(); }
result = result[0];
} else {
if (stack.length) { throw new Error(); }
}
return result;
};
})();
stjs.isArray=function( obj ) {
return stjs.toString.call(obj) === "[object Array]";
};
/**
* cls can by the type of the return.
* If it's an array it can be either the type of an element or the type definition of the field.
* TODO - for other collections and classes is not done yet
*/
stjs.typefy=function(obj, cls){
if (stjs.isArray(obj)){
var result = [];
for(var idx = 0; idx < obj.length; idx++){
result.push(stjs.typefy(obj[idx], elementType(cls)));
}
return result;
}
var constructors = {};
function constr(name, param){
var c = constructors[name];
if (!c)
constructors[name] = c = eval(name);
return new c(param);
}
function elementType(type){
if (typeof type == "function")
return type;
if (type.arguments) {
return eval(type.arguments[0]);
}
if (typeof type == "string")
return eval(type);
return Object;
}
function convert(type, json){
if (!type)
return json;
var cv = stjs.converters[type.name || type];
if (cv)
return cv(json, type);
//hopefully the type has a string constructor
return constr(type, json);
}
function builder(type){
if (!type)
return {};
if (typeof type == "function")
return new type();
if (type.name) {
if (type.name == "Map")
return {};
if (type.name == "Array")
return [];
return constr(type.name);
}
return constr(type);
}
if (obj == null)
return null;
var ret = new cls();
for(var key in obj){
var prop = obj[key];
if (prop == null)
continue;
var td = cls.$typeDescription[key];
if (!td) {
ret[key] = prop;
continue;
}
if (typeof prop == "string")
ret[key] = convert(td, prop);
else if (typeof prop == "object") {
if (typeof td == "string") {
td = eval(td);
}
ret[key] = stjs.typefy(prop, td);
}
}
return ret;
};
stjs.hydrate=stjs.typefy
stjs.stringify=function(obj, cls){
if (obj == null)
return null;
var ret = {};
for(var key in obj){
var td = cls.$typeDescription[key];
var prop = obj[key];
var ser = td != null ? stjs.serializers[td.name || td] : null;
if (typeof prop == "function")
continue;
if (!td || !ser) {
ret[key] = prop;
continue;
}
if (typeof prop != "string")
if (ser)
ret[key] = ser(prop, td);
else
ret[key] = stjs.typefy(prop, td);
}
return ret;
};
/************* STJS asserts ***************/
stjs.assertHandler = function(position, code, msg) {
throw msg + " at " + position;
};
stjs.STJSAssert = {};
stjs.STJSAssert.setAssertHandler = function(a) {
stjs.assertHandler = a;
}
stjs.STJSAssert.assertArgEquals = function(position, code, expectedValue, testValue) {
if (expectedValue != testValue && stjs.assertHandler)
stjs.assertHandler(position, code, "Wrong argument. Expected: " + expectedValue + ", got:" + testValue);
}
stjs.STJSAssert.assertArgNotNull = function(position, code, testValue) {
if (testValue == null && stjs.assertHandler)
stjs.assertHandler(position, code, "Wrong argument. Null value");
}
stjs.STJSAssert.assertArgTrue = function(position, code, condition) {
if (!condition && stjs.assertHandler)
stjs.assertHandler(position, code, "Wrong argument. Condition is false");
}
stjs.STJSAssert.assertStateEquals = function(position, code, expectedValue, testValue) {
if (expectedValue != testValue && stjs.assertHandler)
stjs.assertHandler(position, code, "Wrong state. Expected: " + expectedValue + ", got:" + testValue);
}
stjs.STJSAssert.assertStateNotNull = function(position, code, testValue) {
if (testValue == null && stjs.assertHandler)
stjs.assertHandler(position, code, "Wrong state. Null value");
}
stjs.STJSAssert.assertStateTrue = function(position, code, condition) {
if (!condition && stjs.assertHandler)
stjs.assertHandler(position, code, "Wrong state. Condition is false");
}
/** exception **/
var Throwable = function(message, cause){
Error.call(this);
if(typeof Error.captureStackTrace === 'function'){
// nice way to capture the stack trace for chrome
Error.captureStackTrace(this, arguments.callee);
} else {
// alternate way to capture the stack trace for other browsers
try{
throw new Error();
}catch(e){
this.stack = e.stack;
}
}
if (typeof message === "string"){
this.detailMessage = message;
this.message = message;
this.cause = cause;
} else {
this.cause = message;
}
};
stjs.extend(Throwable, Error, [], function(constructor, prototype){
prototype.detailMessage = null;
prototype.cause = null;
prototype.getMessage = function() {
return this.detailMessage;
};
prototype.getLocalizedMessage = function() {
return this.getMessage();
};
prototype.getCause = function() {
return (this.cause==this ? null : this.cause);
};
prototype.toString = function() {
var s = "Exception";//TODO should get the exception's type name here
var message = this.getLocalizedMessage();
return (message != null) ? (s + ": " + message) : s;
};
prototype.getStackTrace = function() {
return this.stack;
};
prototype.printStackTrace = function(){
console.error(this.getStackTrace());
};
}, {});
var Exception = function(message, cause){
Throwable.call(this, message, cause);
};
stjs.extend(Exception, Throwable, [], function(constructor, prototype){
}, {});
var RuntimeException = function(message, cause){
Exception.call(this, message, cause);
};
stjs.extend(RuntimeException, Exception, [], function(constructor, prototype){
}, {});
var Iterator = function() {};
Iterator = stjs.extend(Iterator, null, [], function(constructor, prototype) {
prototype.hasNext = function() {};
prototype.next = function() {};
prototype.remove = function() {};
}, {}, {});
var Iterable = function() {};
Iterable = stjs.extend(Iterable, null, [], function(constructor, prototype) {
prototype.iterator = function() {};
}, {}, {});
/** stjs field manipulation */
stjs.setField=function(obj, field, value, returnOldValue){
if (stjs.setFieldHandler)
return stjs.setFieldHandler(obj, field, value, returnOldValue);
var toReturn = returnOldValue ? obj[field] : value;
obj[field] = value;
return toReturn;
};
stjs.getField=function(obj, field){
if (stjs.getFieldHandler)
return stjs.getFieldHandler(obj, field);
return obj[field];
};
/**
* Object to hold a triple, used in graph.
*
* @author fritz.ray@eduworks.com
* @class Triple
* @module com.eduworks.ec
*/
var Triple = function() {};
Triple = stjs.extend(Triple, null, [], function(constructor, prototype) {
/**
* Source vertex.
*
* @property source
* @type any
*/
prototype.source = null;
/**
* Destination vertex.
*
* @property destination
* @type any
*/
prototype.destination = null;
/**
* Object to hold in the edge.
*
* @property edge
* @type any
*/
prototype.edge = null;
/**
* Returns true IFF sources, destinations, and edges match.
*
* @param {Edge} obj
* @return {boolean} true IFF <see method definition>
* @method equals
*/
prototype.equals = function(obj) {
if (Object.prototype.equals.call(this, obj))
return true;
if (stjs.isInstanceOf(obj.constructor, Triple)) {
var t = obj;
if (this.source == t.source && this.destination == t.destination && this.edge == t.edge)
return true;
}
return false;
};
}, {}, {});
/**
* Object Helper Functions
*
* @author fritz.ray@eduworks.com
* @class EcObject
* @module com.eduworks.ec
*/
var EcObject = function() {};
EcObject = stjs.extend(EcObject, null, [], function(constructor, prototype) {
/**
* Returns true if the result is an object.
*
* @param {any} o Object to test.
* @return true iff the object is an object.
* @static
* @method isArray
*/
constructor.isObject = function(o) {
return (typeof o) == "object";
};
/**
* Returns keys on the object
*
* @param {any} o Object to test.
* @return List of keys
* @static
* @method keys
*/
constructor.keys = function(o) {
return ecKeys(o);
};
}, {}, {});
var Callback5 = function() {};
Callback5 = stjs.extend(Callback5, null, [], function(constructor, prototype) {
prototype.$invoke = function(p1, p2, p3, p4, p5) {};
}, {}, {});
/**
* Array Helper Functions
*
* @author fritz.ray@eduworks.com
* @class EcArray
* @module com.eduworks.ec
*/
var EcArray = function() {};
EcArray = stjs.extend(EcArray, null, [], function(constructor, prototype) {
/**
* Returns true if the result is an array.
*
* @param {any} o Object to test.
* @return true iff the object is an array.
* @static
* @method isArray
*/
constructor.isArray = function(o) {
return Object.prototype.toString.call(o) == "[object Array]";
};
/**
* Removes values IFF the values == one another.
*
* @param a {Array} Array to remove duplicates from.
* @static
* @method removeDuplicates
*/
constructor.removeDuplicates = function(a) {
for (var i = 0; i < a.length; i++)
for (var j = i; j < a.length; j++) {
if (j == i)
continue;
if (a[i] == a[j])
a.splice(j, 1);
}
};
/**
* Adds a value if the array does not have the value already.
*
* @param a {Array} Array to add to.
* @param o {Object} Object to add to the array if it isn't in there already.
* @static
* @method setAdd
*/
constructor.setAdd = function(a, o) {
var inThere = false;
for (var i = 0; i < a.length; i++)
if (a[i] == o) {
inThere = true;
break;
}
if (!inThere)
a.push(o);
};
/**
* Removes a value from the array.
*
* @param a {Array} Array to add to.
* @param o {Object} Object to add to the array if it isn't in there already.
* @static
* @method setAdd
*/
constructor.setRemove = function(a, o) {
for (var i = 0; i < a.length; i++)
while (a[i] == o){
a.splice(i, 1);
}
};
/**
* Returns true if the array has the value already.
*
* @param a {Array} Array.
* @param o {Object} Object to sample for.
* @static
* @method has
*/
constructor.has = function(a, o) {
var inThere = false;
for (var i = 0; i < a.length; i++)
if (a[i] == o) {
return true;
}
return false;
};
}, {}, {});
var EcLocalStorage = function() {};
EcLocalStorage = stjs.extend(EcLocalStorage, null, [], function(constructor, prototype) {
constructor.removeItem = function(s, key) {
((s)["removeItem"])(key);
};
}, {}, {});
/**
* Created by fray on 7/5/17.
*/
var Task = function() {};
Task = stjs.extend(Task, null, [], function(constructor, prototype) {
constructor.desiredFps = 10;
constructor.lastFrame = null;
constructor.tasks = new Array();
constructor.delayedFunctions = 0;
constructor.immediateFunctions = 0;
constructor.asyncImmediateFunctions = 0;
constructor.runningAsyncFunctions = 0;
constructor.immediate = function(c) {
var currentMs = Date.now();
var nextFrameMs = stjs.trunc(1000 / Task.desiredFps);
if (Task.lastFrame == null || currentMs > Task.lastFrame + nextFrameMs)
return setTimeout(function() {
Task.delayedFunctions++;
Task.lastFrame = Date.now();
c();
}, 0);
else {
Task.immediateFunctions++;
c();
}
return null;
};
constructor.asyncImmediate = function(c) {
Task.tasks.push(c);
Task.asyncImmediateFunctions++;
if (Task.runningAsyncFunctions < 20) {
Task.runningAsyncFunctions++;
return setTimeout(function() {
Task.asyncContinue();
}, 0);
}
return null;
};
constructor.asyncContinue = function() {
var keepGoing = function() {
Task.asyncContinue();
};
if (Task.tasks.length > 0) {
var c = Task.tasks.pop();
c(keepGoing);
} else
Task.runningAsyncFunctions--;
};
}, {tasks: {name: "Array", arguments: ["CallbackOrFunction"]}}, {});
/**
* A hypergraph, consisting of a set of vertices of type <code>V</code> and a
* set of hyperedges of type <code>E</code> which connect the vertices. This is
* the base interface for all JUNG graph types.
* <p>
* This interface permits, but does not enforce, any of the following common
* variations of graphs:
* <ul>
* <li/>hyperedges (edges which connect a set of vertices of any size)
* <li/>edges (these have have exactly two endpoints, which may or may not be
* distinct)
* <li/>self-loops (edges which connect exactly one vertex)
* <li>directed and undirected edges
* <li>vertices and edges with attributes (for example, weighted edges)
* <li>vertices and edges with different constraints or properties (for example,
* bipartite or multimodal graphs)
* <li>parallel edges (multiple edges which connect a single set of vertices)
* <li>internal representations as matrices or as adjacency lists or adjacency
* maps
* </ul>
* Extensions or implementations of this interface may enforce or disallow any
* or all of these variations.
* <p>
* <b>Notes</b>:
* <ul>
* <li/>The collections returned by <code>Hypergraph</code> instances should be
* treated in general as if read-only. While they are not contractually
* guaranteed (or required) to be immutable, this interface does not define the
* outcome if they are mutated. Mutations should be done via
* <code>{add,remove}{Edge,Vertex}</code>, or in the constructor.
* <li/>
* </ul>
*
* @author Joshua O'Madadhain
* <p>
* Ported to Javascript by:
* @author Fritz Ray (fritz.ray@eduworks.com)
* @author Tom Buskirk (tom.buskirk@eduworks.com)
* @class Hypergraph
* @module com.eduworks.ec
*/
var Hypergraph = function() {};
Hypergraph = stjs.extend(Hypergraph, null, [], function(constructor, prototype) {
/**
* Returns a view of all edges in this graph. In general, this obeys the
* <code>Array</code> contract, and therefore makes no guarantees about the
* ordering of the vertices within the set.
*
* @return a <code>Array</code> view of all edges in this graph
* @method getEdges
*/
prototype.getEdges = function() {};
/**
* Returns a view of all vertices in this graph. In general, this obeys the
* <code>Array</code> contract, and therefore makes no guarantees about the
* ordering of the vertices within the set.
*
* @return a <code>Array</code> view of all vertices in this graph
* @method getVerticies
*/
prototype.getVertices = function() {};
/**
* Returns true if this graph's vertex collection contains
* <code>vertex</code>. Equivalent to
* <code>getVertices().contains(vertex)</code>.
*
* @param vertex the vertex whose presence is being queried
* @return true iff this graph contains a vertex <code>vertex</code>
* @method containsVertex
*/
prototype.containsVertex = function(vertex) {};
/**
* Returns true if this graph's edge collection contains <code>edge</code>.
* Equivalent to <code>getEdges().contains(edge)</code>.
*
* @param edge the edge whose presence is being queried
* @return true iff this graph contains an edge <code>edge</code>
* @method containsEdge
*/
prototype.containsEdge = function(edge) {};
/**
* Returns the number of edges in this graph.
*
* @return the number of edges in this graph
* @method getEdgeCount
*/
prototype.getEdgeCount = function() {};
/**
* Returns the number of vertices in this graph.
*
* @return the number of vertices in this graph
* @method getVertexCount
*/
prototype.getVertexCount = function() {};
/**
* Returns the collection of vertices which are connected to
* <code>vertex</code> via any edges in this graph. If <code>vertex</code>
* is connected to itself with a self-loop, then it will be included in the
* collection returned.
*
* @param vertex the vertex whose neighbors are to be returned
* @return the collection of vertices which are connected to
* <code>vertex</code>, or <code>null</code> if <code>vertex</code>
* is not present
* @method getNeighbors
*/
prototype.getNeighbors = function(vertex) {};
/**
* Returns the collection of edges in this graph which are connected to
* <code>vertex</code>.
*
* @param vertex the vertex whose incident edges are to be returned
* @return the collection of edges which are connected to
* <code>vertex</code>, or <code>null</code> if <code>vertex</code>
* is not present
* @method getIncidentEdges
*/
prototype.getIncidentEdges = function(vertex) {};
/**
* Returns the collection of vertices in this graph which are connected to
* <code>edge</code>. Note that for some graph types there are guarantees
* about the size of this collection (i.e., some graphs contain edges that
* have exactly two endpoints, which may or may not be distinct).
* Implementations for those graph types may provide alternate methods that
* provide more convenient access to the vertices.
*
* @param edge the edge whose incident vertices are to be returned
* @return the collection of vertices which are connected to
* <code>edge</code>, or <code>null</code> if <code>edge</code> is
* not present
* @method getIncidentVertices
*/
prototype.getIncidentVertices = function(edge) {};
/**
* Returns an edge that connects this vertex to <code>v</code>. If this edge
* is not uniquely defined (that is, if the graph contains more than one
* edge connecting <code>v1</code> to <code>v2</code>), any of these edges
* may be returned. <code>findEdgeSet(v1, v2)</code> may be used to return
* all such edges. Returns null if either of the following is true:
* <ul>
* <li/><code>v2</code> is not connected to <code>v1</code>
* <li/>either <code>v1</code> or <code>v2</code> are not present in this
* graph
* </ul>
* <p>
* <b>Note</b>: for purposes of this method, <code>v1</code> is only
* considered to be connected to <code>v2</code> via a given <i>directed</i>
* edge <code>e</code> if
* <code>v1 == e.getSource() && v2 == e.getDest()</code> evaluates to
* <code>true</code>. (<code>v1</code> and <code>v2</code> are connected by
* an undirected edge <code>u</code> if <code>u</code> is incident to both
* <code>v1</code> and <code>v2</code>.)
*
* @param v1 between this
* @param v2 and that
* @return an edge that connects <code>v1</code> to <code>v2</code>, or
* <code>null</code> if no such edge exists (or either vertex is not
* present)
* @method findEdge
* @see Hypergraph#findEdgeSet(Object, Object)
*/
prototype.findEdge = function(v1, v2) {};
/**
* Returns all edges that connects this vertex to <code>v</code>. If this
* edge is not uniquely defined (that is, if the graph contains more than
* one edge connecting <code>v1</code> to <code>v2</code>), any of these
* edges may be returned. <code>findEdgeSet(v1, v2)</code> may be used to
* return all such edges. Returns null if <code>v2</code> is not connected
* to <code>v1</code>. <br/>
* Returns an empty collection if either <code>v1</code> or <code>v2</code>
* are not present in this graph.
* <p>
* <p>
* <b>Note</b>: for purposes of this method, <code>v1</code> is only
* considered to be connected to <code>v2</code> via a given <i>directed</i>
* edge <code>d</code> if
* <code>v1 == d.getSource() && v2 == d.getDest()</code> evaluates to
* <code>true</code>. (<code>v1</code> and <code>v2</code> are connected by
* an undirected edge <code>u</code> if <code>u</code> is incident to both
* <code>v1</code> and <code>v2</code>.)
*
* @param v1 between this
* @param v2 and that
* @return a collection containing all edges that connect <code>v1</code> to
* <code>v2</code>, or <code>null</code> if either vertex is not
* present
* @method findEdgeSet
* @see Hypergraph#findEdge(Object, Object)
*/
prototype.findEdgeSet = function(v1, v2) {};
/**
* Adds <code>vertex</code> to this graph. Fails if <code>vertex</code> is
* null or already in the graph.
*
* @param vertex the vertex to add
* @return <code>true</code> if the add is successful, and
* <code>false</code> otherwise
* @throws IllegalArgumentException if <code>vertex</code> is <code>null</code>
* @method addVertex
*/
prototype.addVertex = function(vertex) {};
/**
* Adds <code>edge</code> to this graph. Fails under the following
* circumstances:
* <ul>
* <li/><code>edge</code> is already an element of the graph
* <li/>either <code>edge</code> or <code>vertices</code> is
* <code>null</code>
* <li/><code>vertices</code> has the wrong number of vertices for the graph
* type
* <li/><code>vertices</code> are already connected by another edge in this
* graph, and this graph does not accept parallel edges
* </ul>
*
* @param edge
* @param vertices
* @return <code>true</code> if the add is successful, and
* <code>false</code> otherwise
* @throws IllegalArgumentException if <code>edge</code> or <code>vertices</code> is null, or if
* a different vertex set in this graph is already connected by
* <code>edge</code>, or if <code>vertices</code> are not a
* legal vertex set for <code>edge</code>
* @method addHyperEdge
*/
prototype.addHyperEdge = function(edge, vertices) {};
/**
* Removes <code>vertex</code> from this graph. As a side effect, removes
* any edges <code>e</code> incident to <code>vertex</code> if the removal
* of <code>vertex</code> would cause <code>e</code> to be incident to an
* illegal number of vertices. (Thus, for example, incident hyperedges are
* not removed, but incident edges--which must be connected to a vertex at
* both endpoints--are removed.)
* <p>
* <p>
* Fails under the following circumstances:
* <ul>
* <li/><code>vertex</code> is not an element of this graph
* <li/><code>vertex</code> is <code>null</code>
* </ul>
*
* @param vertex the vertex to remove
* @return <code>true</code> if the removal is successful,
* <code>false</code> otherwise
* @method removeVertex
*/
prototype.removeVertex = function(vertex) {};
/**
* Removes <code>edge</code> from this graph. Fails if <code>edge</code> is
* null, or is otherwise not an element of this graph.
*
* @param edge the edge to remove
* @return <code>true</code> if the removal is successful,
* <code>false</code> otherwise
* @method removeEdge
*/
prototype.removeEdge = function(edge) {};
/**
* Returns <code>true</code> if <code>v1</code> and <code>v2</code> share an
* incident edge. Equivalent to <code>getNeighbors(v1).contains(v2)</code>.
*
* @param v1 the first vertex to test
* @param v2 the second vertex to test
* @return <code>true</code> if <code>v1</code> and <code>v2</code> share an
* incident edge
* @method isNeighbor
*/
prototype.isNeighbor = function(v1, v2) {};
/**
* Returns <code>true</code> if <code>vertex</code> and <code>edge</code>
* are incident to each other. Equivalent to
* <code>getIncidentEdges(vertex).contains(edge)</code> and to
* <code>getIncidentVertices(edge).contains(vertex)</code>.
*
* @param vertex
* @param edge
* @return <code>true</code> if <code>vertex</code> and <code>edge</code>
* are incident to each other
* @method isIncident
*/
prototype.isIncident = function(vertex, edge) {};
/**
* Returns the number of edges incident to <code>vertex</code>. Special
* cases of interest:
* <ul>
* <li/>Incident self-loops are counted once.
* <li>If there is only one edge that connects this vertex to each of its
* neighbors (and vice versa), then the value returned will also be equal to
* the number of neighbors that this vertex has (that is, the output of
* <code>getNeighborCount</code>).
* <li>If the graph is directed, then the value returned will be the sum of
* this vertex's indegree (the number of edges whose destination is this
* vertex) and its outdegree (the number of edges whose source is this
* vertex), minus the number of incident self-loops (to avoid
* double-counting).
* </ul>
* <p>
* Equivalent to <code>getIncidentEdges(vertex).size()</code>.
*
* @param vertex the vertex whose degree is to be returned
* @return the degree of this node
* @method degree
* @see Hypergraph#getNeighborCount(Object)
*/
prototype.degree = function(vertex) {};
/**
* Returns the number of vertices that are adjacent to <code>vertex</code>
* (that is, the number of vertices that are incident to edges in
* <code>vertex</code>'s incident edge set).
* <p>
* <p>
* Equivalent to <code>getNeighbors(vertex).size()</code>.
*
* @param vertex the vertex whose neighbor count is to be returned
* @return the number of neighboring vertices
* @method getNeighborCount
*/
prototype.getNeighborCount = function(vertex) {};
/**
* Returns the number of vertices that are incident to <code>edge</code>.
* For hyperedges, this can be any nonnegative integer; for edges this must
* be 2 (or 1 if self-loops are permitted).
* <p>
* <p>
* Equivalent to <code>getIncidentVertices(edge).size()</code>.
*
* @param edge the edge whose incident vertex count is to be returned
* @return the number of vertices that are incident to <code>edge</code>.
* @method getIncidentCount
*/
prototype.getIncidentCount = function(edge) {};
/**
* Returns the edge type of <code>edge</code> in this graph.
*
* @param edge
* @return the <code>EdgeType</code> of <code>edge</code>, or
* <code>null</code> if <code>edge</code> has no defined type
* @method getEdgeType
*/
prototype.getEdgeType = function(edge) {};
/**
* Returns the default edge type for this graph.
*
* @return the default edge type for this graph
* @method getDefaultEdgeType
*/
prototype.getDefaultEdgeType = function() {};
/**
* Returns the collection of edges in this graph which are of type
* <code>edge_type</code>.
*
* @param edge_type the type of edges to be returned
* @return the collection of edges which are of type <code>edge_type</code>,
* or <code>null</code> if the graph does not accept edges of this
* type
* @method getEdgesOfType
* @see EdgeType
*/
prototype.getEdgesOfType = function(edge_type) {};
/**
* Returns the number of edges of type <code>edge_type</code> in this graph.
*
* @param edge_type the type of edge for which the count is to be returned
* @return the number of edges of type <code>edge_type</code> in this graph
* @method getEdgeCountOfType
*/
prototype.getEdgeCountOfType = function(edge_type) {};
/**
* Returns a <code>Array</code> view of the incoming edges incident to
* <code>vertex</code> in this graph.
*
* @param vertex the vertex whose incoming edges are to be returned
* @return a <code>Array</code> view of the incoming edges incident to
* <code>vertex</code> in this graph
* @method getInEdges
*/
prototype.getInEdges = function(vertex) {};
/**
* Returns a <code>Array</code> view of the outgoing edges incident to
* <code>vertex</code> in this graph.
*
* @param vertex the vertex whose outgoing edges are to be returned
* @return a <code>Array</code> view of the outgoing edges incident to
* <code>vertex</code> in this graph
* @method getOutEdges
*/
prototype.getOutEdges = function(vertex) {};
/**
* Returns the number of incoming edges incident to <code>vertex</code>.
* Equivalent to <code>getInEdges(vertex).size()</code>.
*
* @param vertex the vertex whose indegree is to be calculated
* @return the number of incoming edges incident to <code>vertex</code>
* @method inDegree
*/
prototype.inDegree = function(vertex) {};
/**
* Returns the number of outgoing edges incident to <code>vertex</code>.
* Equivalent to <code>getOutEdges(vertex).size()</code>.
*
* @param vertex the vertex whose outdegree is to be calculated
* @return the number of outgoing edges incident to <code>vertex</code>
* @method outDegree
*/
prototype.outDegree = function(vertex) {};
/**
* If <code>directed_edge</code> is a directed edge in this graph, returns
* the source; otherwise returns <code>null</code>. The source of a directed
* edge <code>d</code> is defined to be the vertex for which <code>d</code>
* is an outgoing edge. <code>directed_edge</code> is guaranteed to be a
* directed edge if its <code>EdgeType</code> is <code>DIRECTED</code>.
*
* @param directed_edge
* @return the source of <code>directed_edge</code> if it is a directed edge
* in this graph, or <code>null</code> otherwise
* @method getSource
*/
prototype.getSource = function(directed_edge) {};
/**
* If <code>directed_edge</code> is a directed edge in this graph, returns
* the destination; otherwise returns <code>null</code>. The destination of
* a directed edge <code>d</code> is defined to be the vertex incident to
* <code>d</code> for which <code>d</code> is an incoming edge.
* <code>directed_edge</code> is guaranteed to be a directed edge if its
* <code>EdgeType</code> is <code>DIRECTED</code>.
*
* @param directed_edge
* @return the destination of <code>directed_edge</code> if it is a directed
* edge in this graph, or <code>null</code> otherwise
* @method getDest
*/
prototype.getDest = function(directed_edge) {};
/**
* Returns a <code>Array</code> view of the predecessors of
* <code>vertex</code> in this graph. A predecessor of <code>vertex</code>
* is defined as a vertex <code>v</code> which is connected to
* <code>vertex</code> by an edge <code>e</code>, where <code>e</code> is an
* outgoing edge of <code>v</code> and an incoming edge of
* <code>vertex</code>.
*
* @param vertex the vertex whose predecessors are to be returned
* @return a <code>Array</code> view of the predecessors of
* <code>vertex</code> in this graph
* @method getPredecessors
*/
prototype.getPredecessors = function(vertex) {};
/**
* Returns a <code>Array</code> view of the successors of
* <code>vertex</code> in this graph. A successor of <code>vertex</code> is
* defined as a vertex <code>v</code> which is connected to
* <code>vertex</code> by an edge <code>e</code>, where <code>e</code> is an
* incoming edge of <code>v</code> and an outgoing edge of
* <code>vertex</code>.
*
* @param vertex the vertex whose predecessors are to be returned
* @return a <code>Array</code> view of the successors of
* <code>vertex</code> in this graph
* @method getSuccessors
*/
prototype.getSuccessors = function(vertex) {};
}, {}, {});
var EcDate = function() {};
EcDate = stjs.extend(EcDate, null, [], function(constructor, prototype) {
constructor.toISOString = function(obj) {
return ((obj)["toISOString"])();
};
}, {}, {});
/**
* Wrapper to handle all remote web service invocations.
*
* @author fritz.ray@eduworks.com
* @author devlin.junker@eduworks.com
* @class EcRemote
* @module com.eduworks.ec
*/
var EcRemote = function() {};
EcRemote = stjs.extend(EcRemote, null, [], function(constructor, prototype) {
/**
* Turn this property off to cause all remote web service calls to be
* synchronous. Can be useful for test scripts, blocking calls, etc.
*
* @property async
* @static
* @type boolean
*/
constructor.async = true;
/**
* Timeout for AJAX requests
*
* @property async
* @static
* @type boolean
*/
constructor.timeout = 60 * 1000 * 5;
/**
* POSTs a request to a remote endpoint. Composed of a server endpoint (root
* URL) and a service (service path). Sends form data as a multi-part mime
* request.
*
* @param {string} server Protocol, hostname and path to the remote handler.
* @param {string} service Path to service to invoke.
* @param {FormData} fd Form data to send as multi-part mime.
* @param {function(object)} success Method that is invoked if the server
* responds with a success (per jQuery ajax)
* @param {function(string)} failure Method that is invoked if the server
* responds with an error (per jQuery ajax) or a non-200/300.
* @method postExpectingObject
* @static
*/
constructor.postExpectingObject = function(server, service, fd, success, failure) {
EcRemote.postInner(server, service, fd, null, EcRemote.getSuccessJSONCallback(success, failure), EcRemote.getFailureCallback(failure));
};
/**
* POSTs a request to a remote endpoint. Composed of a server endpoint (root
* URL) and a service (service path). Sends form data as a multi-part mime
* request.
*
* @param {string} server Protocol, hostname and path to the remote handler.
* @param {string} service Path to service to invoke.
* @param {FormData} fd Form data to send as multi-part mime.
* @param {function(string)} success Method that is invoked if the server
* responds with a success (per jQuery ajax)
* @param {function(string)} failure Method that is invoked if the server
* responds with an error (per jQuery ajax) or a non-200/300.
* @method postExpectingString
* @static
*/
constructor.postExpectingString = function(server, service, fd, success, failure) {
EcRemote.postInner(server, service, fd, null, EcRemote.getSuccessCallback(success, failure), EcRemote.getFailureCallback(failure));
};
constructor.postWithHeadersExpectingString = function(server, service, fd, headers, success, failure) {
EcRemote.postInner(server, service, fd, headers, EcRemote.getSuccessCallback(success, failure), EcRemote.getFailureCallback(failure));
};
constructor.postInner = function(server, service, fd, headers, successCallback, failureCallback) {
var url = server;
if (!url.endsWith("/") && service != null && !"".equals(service)) {
url += "/";
}
if (service != null) {
url += service;
}
var p = {};
p.method = "POST";
p.url = url;
if ((fd)["_streams"] != null) {
var chunks = (fd)["_streams"];
var all = "";
for (var i = 0; i < chunks.length; i++) {
if ((typeof chunks[i]) == "function") {
all = all + "\r\n";
} else {
all = all + chunks[i];
}
}
all = all + "\r\n\r\n--" + (fd)["_boundary"] + "--";
if (headers == null || headers == undefined)
headers = new Object();
p.headers = headers;
p.headers["Content-Type"] = "multipart/form-data; boundary=" + (fd)["_boundary"];
p.data = all;
} else {
p.mimeType = "multipart/form-data";
p.data = fd;
if (headers != null && headers != undefined)
p.headers = headers;
}
(p)["contentType"] = false;
p.cache = false;
p.async = EcRemote.async;
p.timeout = EcRemote.timeout;
p.processData = false;
p.success = successCallback;
p.error = failureCallback;
EcRemote.upgradeHttpToHttps(p);
if ($ == null) {
var o = new Object();
(o)["status"] = 200;
(o)["responseText"] = JSON.stringify(httpPost(p.data, p.url, "multipart/form-data; boundary=" + (fd)["_boundary"], "false", (fd)["_boundary"]));
successCallback(null, null, o);
} else {
$.ajax(p);
}
};
/**
* GETs something from a remote endpoint. Composed of a server endpoint
* (root URL) and a service (service path).
*
* @param {string} server Protocol, hostname and path to the remote handler.
* @param {string} service Path to service to invoke.
* @param {function(object)} success Method that is invoked if the server
* responds with a success (per jQuery ajax)
* @param {function(string)} failure Method that is invoked if the server
* responds with an error (per jQuery ajax) or a non-200/300.
* @method getExpectingObject
* @static
*/
constructor.getExpectingObject = function(server, service, success, failure) {
var url = EcRemote.urlAppend(server, service);
var p = {};
p.method = "GET";
p.url = url;
p.cache = false;
p.async = EcRemote.async;
p.timeout = EcRemote.timeout;
p.processData = false;
p.dataType = "json";
p.success = EcRemote.getSuccessJSONCallback(success, failure);
p.error = EcRemote.getFailureCallback(failure);
EcRemote.upgradeHttpToHttps(p);
if ($ == null) {
success(httpGet(p.url));
} else {
$.ajax(p);
}
};
/**
* GETs something from a remote endpoint. Composed of a server endpoint
* (root URL) and a service (service path).
*
* @param {string} server Protocol, hostname and path to the remote handler.
* @param {string} service Path to service to invoke.
* @param {function(object)} success Method that is invoked if the server
* responds with a success (per jQuery ajax)
* @param {function(string)} failure Method that is invoked if the server
* responds with an error (per jQuery ajax) or a non-200/300.
* @method getExpectingString
* @static
*/
constructor.getExpectingString = function(server, service, success, failure) {
var url = EcRemote.urlAppend(server, service);
var p = {};
p.method = "GET";
p.url = url;
p.async = EcRemote.async;
p.timeout = EcRemote.timeout;
p.processData = false;
p.success = EcRemote.getSuccessCallback(success, failure);
p.error = EcRemote.getFailureCallback(failure);
EcRemote.upgradeHttpToHttps(p);
if ($ == null) {
success(httpGet(p.url));
} else {
$.ajax(p);
}
};
constructor.urlAppend = function(server, service) {
var url = server;
if (!url.endsWith("/") && service != null && service.equals("")) {
url += "/";
}
if (service != null) {
url += service;
}
return url;
};
/**
* DELETEs something at a remote endpoint. Composed of a server endpoint
* (root URL) and a service (service path).
*
* @param {string} server Protocol, hostname and path to the remote handler.
* @param {string} service Path to service to invoke.
* @param {function(object)} success Method that is invoked if the server
* responds with a success (per jQuery ajax)
* @param {function(string)} failure Method that is invoked if the server
* responds with an error (per jQuery ajax) or a non-200/300.
* @method _delete
* @static
*/
constructor._delete = function(url, signatureSheet, success, failure) {
var p = {};
p.method = "DELETE";
p.url = url;
p.async = EcRemote.async;
p.timeout = EcRemote.timeout;
p.headers = new Object();
p.headers["signatureSheet"] = signatureSheet;
p.success = EcRemote.getSuccessCallback(success, failure);
p.error = EcRemote.getFailureCallback(failure);
EcRemote.upgradeHttpToHttps(p);
if ($ == null) {
success(httpDelete(p.url));
} else {
$.ajax(p);
}
};
constructor.upgradeHttpToHttps = function(p) {
if (window != null) {
if (window.location != null) {
if (p.url.indexOf(window.location.protocol) == -1) {
if (window.location.protocol.startsWith("https")) {
if (!p.url.startsWith("https:")) {
p.url = p.url.replace("http:", "https:");
}
}
}
}
}
};
constructor.handleFailure = function(failure, paramP1, paramP2, paramP3) {
if (failure != null) {
if (paramP1 != null) {
if (paramP1.responseText != null) {
failure(paramP1.responseText);
} else if (paramP1.statusText != null) {
failure(paramP1.statusText.toString());
} else {
failure("General error in AJAX request.");
}
} else if (paramP2 != null) {
failure(paramP2);
} else if (paramP3 != null) {
failure(paramP3);
} else {
failure("General error in AJAX request.");
}
}
};
constructor.getSuccessCallback = function(success, failure) {
return function(arg0, arg1, arg2) {
if (arg2.status > 300 || arg2.status < 200) {
if (failure != null)
failure("Error with code: " + arg2.status);
} else if (success != null) {
success(arg2.responseText);
}
};
};
constructor.getSuccessJSONCallback = function(success, failure) {
return function(arg0, arg1, arg2) {
if (arg2.status > 300 || arg2.status < 200) {
if (failure != null)
failure("Error with code: " + arg2.status);
} else if (success != null) {
try {
if (EcObject.isObject(arg2.responseText))
success(arg2.responseText);
else if (EcArray.isArray(arg2.responseText))
success(arg2.responseText);
else
success(JSON.parse(arg2.responseText));
}catch (ex) {
if (ex != null) {
if (failure != null)
if ((ex)["getMessage"] != null) {
failure(ex.getMessage());
} else {
failure(ex);
}
}
}
}
};
};
constructor.getFailureCallback = function(failure) {
return function(paramP1, paramP2, paramP3) {
EcRemote.handleFailure(failure, paramP1, paramP2, paramP3);
};
};
}, {}, {});
/**
* Pattern (probably similar to Promise) that provides fine grained control over asynchronous execution.
* Will iterate over all items in an array and perform 'each(item,callback)'.
* Every 'each' needs to call the callback. This callback can be passed down through several asynchronous calls.
* When all callbacks have been called, 'after(array)' is called.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcAsyncHelper
*/
var EcAsyncHelper = function() {};
EcAsyncHelper = stjs.extend(EcAsyncHelper, null, [], function(constructor, prototype) {
constructor.scriptPath = null;
/**
* Counter that counts down when each callback is called. Lots of tricks can be done to cause after to proc in different ways.
*
* @property counter
* @type integer
*/
prototype.counter = null;
/**
* "Each" method. See class description.
*
* @param {Array} array Array to iterate over.
* @param {function(item,callback)} each Method that gets invoked per item in the array.
* @param {function(array)} after Method invoked when all callbacks are called.
* @method each
*/
prototype.each = function(array, each, after) {
var me = this;
this.counter = array.length;
if (array.length == 0)
after(array);
for (var i = 0; i < array.length; i++) {
if (this.counter > 0)
this.execute(array, each, after, me, i);
}
};
prototype.execute = function(array, each, after, me, i) {
Task.immediate(function() {
each(array[i], function() {
me.counter--;
if (me.counter == 0)
after(array);
});
});
};
/**
* Will prevent 'after' from being called.
*
* @method stop
*/
prototype.stop = function() {
this.counter = -1;
};
}, {}, {});
/**
* A graph consisting of a set of vertices of type <code>V</code>
* set and a set of edges of type <code>E</code>. Edges of this
* graph type have exactly two endpoints; whether these endpoints
* must be distinct depends on the implementation.
* <p>
* This interface permits, but does not enforce, any of the following
* common variations of graphs:
* <ul>
* <li> directed and undirected edges
* <li> vertices and edges with attributes (for example, weighted edges)
* <li> vertices and edges of different types (for example, bipartite
* or multimodal graphs)
* <li> parallel edges (multiple edges which connect a single set of vertices)
* <li> representations as matrices or as adjacency lists or adjacency maps
* </ul>
* Extensions or implementations of this interface
* may enforce or disallow any or all of these variations.
* <p>
* <p>Definitions (with respect to a given vertex <code>v</code>):
* <ul>
* <li/><b>incoming edge</b> of <code>v</code>: an edge that can be traversed
* from a neighbor of <code>v</code> to reach <code>v</code>
* <li/><b>outgoing edge</b> of <code>v</code>: an edge that can be traversed
* from <code>v</code> to reach some neighbor of <code>v</code>
* <li/><b>predecessor</b> of <code>v</code>: a vertex at the other end of an
* incoming edge of <code>v</code>
* <li/><b>successor</b> of <code>v</code>: a vertex at the other end of an
* outgoing edge of <code>v</code>
* <li/>
* </ul>
*
* @author Joshua O'Madadhain
* <p>
* Ported to Javascript by:
* @author Fritz Ray (fritz.ray@eduworks.com)
* @author Tom Buskirk (tom.buskirk@eduworks.com)
* @class Graph
* @module com.eduworks.ec
* @extends Hypergraph
*/
var Graph = function() {};
Graph = stjs.extend(Graph, null, [Hypergraph], function(constructor, prototype) {
/**
* Returns a <code>Collection</code> view of the incoming edges incident to <code>vertex</code>
* in this graph.
*
* @param vertex the vertex whose incoming edges are to be returned
* @return a <code>Collection</code> view of the incoming edges incident
* to <code>vertex</code> in this graph
* @method getInEdges
*/
prototype.getInEdges = function(vertex) {};
/**
* Returns a <code>Collection</code> view of the outgoing edges incident to <code>vertex</code>
* in this graph.
*
* @param vertex the vertex whose outgoing edges are to be returned
* @return a <code>Collection</code> view of the outgoing edges incident
* to <code>vertex</code> in this graph
* @method getOutEdges
*/
prototype.getOutEdges = function(vertex) {};
/**
* Returns a <code>Collection</code> view of the predecessors of <code>vertex</code>
* in this graph. A predecessor of <code>vertex</code> is defined as a vertex <code>v</code>
* which is connected to
* <code>vertex</code> by an edge <code>e</code>, where <code>e</code> is an outgoing edge of
* <code>v</code> and an incoming edge of <code>vertex</code>.
*
* @param vertex the vertex whose predecessors are to be returned
* @return a <code>Collection</code> view of the predecessors of
* <code>vertex</code> in this graph
* @method getPredecessors
*/
prototype.getPredecessors = function(vertex) {};
/**
* Returns a <code>Collection</code> view of the successors of <code>vertex</code>
* in this graph. A successor of <code>vertex</code> is defined as a vertex <code>v</code>
* which is connected to
* <code>vertex</code> by an edge <code>e</code>, where <code>e</code> is an incoming edge of
* <code>v</code> and an outgoing edge of <code>vertex</code>.
*
* @param vertex the vertex whose predecessors are to be returned
* @return a <code>Collection</code> view of the successors of
* <code>vertex</code> in this graph
* @method getSuccessors
*/
prototype.getSuccessors = function(vertex) {};
/**
* Returns the number of incoming edges incident to <code>vertex</code>.
* Equivalent to <code>getInEdges(vertex).size()</code>.
*
* @param vertex the vertex whose indegree is to be calculated
* @return the number of incoming edges incident to <code>vertex</code>
* @method inDegree
*/
prototype.inDegree = function(vertex) {};
/**
* Returns the number of outgoing edges incident to <code>vertex</code>.
* Equivalent to <code>getOutEdges(vertex).size()</code>.
*
* @param vertex the vertex whose outdegree is to be calculated
* @return the number of outgoing edges incident to <code>vertex</code>
* @method outDegree
*/
prototype.outDegree = function(vertex) {};
/**
* Returns <code>true</code> if <code>v1</code> is a predecessor of <code>v2</code> in this graph.
* Equivalent to <code>v1.getPredecessors().contains(v2)</code>.
*
* @param v1 the first vertex to be queried
* @param v2 the second vertex to be queried
* @return <code>true</code> if <code>v1</code> is a predecessor of <code>v2</code>, and false otherwise.
* @method isPredecessor
*/
prototype.isPredecessor = function(v1, v2) {};
/**
* Returns <code>true</code> if <code>v1</code> is a successor of <code>v2</code> in this graph.
* Equivalent to <code>v1.getSuccessors().contains(v2)</code>.
*
* @param v1 the first vertex to be queried
* @param v2 the second vertex to be queried
* @return <code>true</code> if <code>v1</code> is a successor of <code>v2</code>, and false otherwise.
* @method isSuccessor
*/
prototype.isSuccessor = function(v1, v2) {};
/**
* Returns the number of predecessors that <code>vertex</code> has in this graph.
* Equivalent to <code>vertex.getPredecessors().size()</code>.
*
* @param vertex the vertex whose predecessor count is to be returned
* @return the number of predecessors that <code>vertex</code> has in this graph
* @method getPredecessorCount
*/
prototype.getPredecessorCount = function(vertex) {};
/**
* Returns the number of successors that <code>vertex</code> has in this graph.
* Equivalent to <code>vertex.getSuccessors().size()</code>.
*
* @param vertex the vertex whose successor count is to be returned
* @return the number of successors that <code>vertex</code> has in this graph
* @method getSuccessorCount
*/
prototype.getSuccessorCount = function(vertex) {};
/**
* If <code>directed_edge</code> is a directed edge in this graph, returns the source;
* otherwise returns <code>null</code>.
* The source of a directed edge <code>d</code> is defined to be the vertex for which
* <code>d</code> is an outgoing edge.
* <code>directed_edge</code> is guaranteed to be a directed edge if
* its <code>EdgeType</code> is <code>DIRECTED</code>.
*
* @param directed_edge
* @return the source of <code>directed_edge</code> if it is a directed edge in this graph, or <code>null</code> otherwise
* @method getSource
*/
prototype.getSource = function(directed_edge) {};
/**
* If <code>directed_edge</code> is a directed edge in this graph, returns the destination;
* otherwise returns <code>null</code>.
* The destination of a directed edge <code>d</code> is defined to be the vertex
* incident to <code>d</code> for which
* <code>d</code> is an incoming edge.
* <code>directed_edge</code> is guaranteed to be a directed edge if
* its <code>EdgeType</code> is <code>DIRECTED</code>.
*
* @param directed_edge
* @return the destination of <code>directed_edge</code> if it is a directed edge in this graph, or <code>null</code> otherwise
* @method getDest
*/
prototype.getDest = function(directed_edge) {};
/**
* Returns <code>true</code> if <code>vertex</code> is the source of <code>edge</code>.
* Equivalent to <code>getSource(edge).equals(vertex)</code>.
*
* @param vertex the vertex to be queried
* @param edge the edge to be queried
* @return <code>true</code> iff <code>vertex</code> is the source of <code>edge</code>
* @method isSource
*/
prototype.isSource = function(vertex, edge) {};
/**
* Returns <code>true</code> if <code>vertex</code> is the destination of <code>edge</code>.
* Equivalent to <code>getDest(edge).equals(vertex)</code>.
*
* @param vertex the vertex to be queried
* @param edge the edge to be queried
* @return <code>true</code> iff <code>vertex</code> is the destination of <code>edge</code>
*/
prototype.isDest = function(vertex, edge) {};
/**
* Adds edge <code>e</code> to this graph such that it connects
* vertex <code>v1</code> to <code>v2</code>.
* Equivalent to <code>addEdge(e, new Pair<V>(v1, v2))</code>.
* If this graph does not contain <code>v1</code>, <code>v2</code>,
* or both, implementations may choose to either silently add
* the vertices to the graph or throw an <code>IllegalArgumentException</code>.
* If this graph assigns edge types to its edges, the edge type of
* <code>e</code> will be the default for this graph.
* See <code>Hypergraph.addEdge()</code> for a listing of possible reasons
* for failure.
*
* @param e the edge to be added
* @param v1 the first vertex to be connected
* @param v2 the second vertex to be connected
* @return <code>true</code> if the add is successful, <code>false</code> otherwise
* @method addEdge
* @see Hypergraph#addEdge(Object, Collection)
* @see #addEdge(Object, Object, Object, EdgeType)
*/
prototype.addEdge = function(e, v1, v2) {};
/**
* Returns the vertex at the other end of <code>edge</code> from <code>vertex</code>.
* (That is, returns the vertex incident to <code>edge</code> which is not <code>vertex</code>.)
*
* @param vertex the vertex to be queried
* @param edge the edge to be queried
* @return the vertex at the other end of <code>edge</code> from <code>vertex</code>
* @method getOpposite
*/
prototype.getOpposite = function(vertex, edge) {};
}, {}, {});
/**
* A directed implementation of {{#crossLink "Graph"}}Graph{{/crossLink}}. Edges have types. Two vertices may have many edges between them.
*
* @param <V>
* @param <E>
* @author fray
* @class EcDirectedGraph
* @module com.eduworks.ec
* @extends Graph
*/
var EcDirectedGraph = function() {};
EcDirectedGraph = stjs.extend(EcDirectedGraph, null, [Graph], function(constructor, prototype) {
prototype.edges = null;
prototype.verticies = null;
prototype.getEdges = function() {
var results = new Array();
for (var i = 0; i < this.edges.length; i++)
results[i] = this.edges[i].edge;
return results;
};
prototype.getVertices = function() {
var results = new Array();
for (var i = 0; i < this.verticies.length; i++)
results[i] = this.verticies[i];
return results;
};
prototype.containsVertex = function(vertex) {
for (var i = 0; i < this.verticies.length; i++)
if (vertex == this.verticies[i])
return true;
return false;
};
prototype.containsEdge = function(edge) {
for (var i = 0; i < this.edges.length; i++)
if (edge == this.edges[i].edge)
return true;
return false;
};
prototype.getEdgeCount = function() {
return this.edges.length;
};
prototype.getVertexCount = function() {
return this.verticies.length;
};
prototype.getNeighbors = function(vertex) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (vertex == this.edges[i].source)
results.push(this.edges[i].destination);
else if (vertex == this.edges[i].destination)
results.push(this.edges[i].source);
}
EcArray.removeDuplicates(results);
return results;
};
prototype.getIncidentEdges = function(vertex) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (vertex == this.edges[i].source)
results.push(this.edges[i].edge);
else if (vertex == this.edges[i].destination)
results.push(this.edges[i].edge);
}
EcArray.removeDuplicates(results);
return results;
};
prototype.getIncidentVertices = function(edge) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (edge == this.edges[i].edge) {
results.push(this.edges[i].source);
results.push(this.edges[i].destination);
}
}
EcArray.removeDuplicates(results);
return results;
};
prototype.findEdge = function(v1, v2) {
for (var i = 0; i < this.edges.length; i++) {
if (v1 == this.edges[i].source && v2 == this.edges[i].destination)
return this.edges[i].edge;
if (v1 == this.edges[i].destination && v2 == this.edges[i].source)
return this.edges[i].edge;
}
return null;
};
prototype.findEdgeSet = function(v1, v2) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (v1 == this.edges[i].source && v2 == this.edges[i].destination)
results.push(this.edges[i].edge);
if (v1 == this.edges[i].destination && v2 == this.edges[i].source)
results.push(this.edges[i].edge);
}
return results;
};
prototype.addVertex = function(vertex) {
if (this.verticies.indexOf(vertex) != -1)
return false;
this.verticies.push(vertex);
return true;
};
prototype.removeVertex = function(vertex) {
var indexOf = this.verticies.indexOf(vertex);
if (indexOf != -1) {
for (var i = 0; i < this.edges.length; i++) {
if (this.edges[i].source == vertex || this.edges[i].destination == vertex) {
this.edges.splice(i, 1);
i--;
}
}
this.verticies.splice(indexOf, 1);
return true;
}
return false;
};
prototype.removeEdge = function(edge) {
var success = false;
for (var i = 0; i < this.edges.length; i++) {
if (this.edges[i].edge == edge) {
this.edges.splice(i, 1);
i--;
success = true;
}
}
return success;
};
prototype.isNeighbor = function(v1, v2) {
for (var i = 0; i < this.edges.length; i++) {
if (v1 == this.edges[i].source && v2 == this.edges[i].destination)
return true;
else if (v1 == this.edges[i].destination && v2 == this.edges[i].source)
return true;
}
return false;
};
prototype.isIncident = function(vertex, edge) {
for (var i = 0; i < this.edges.length; i++) {
if ((vertex == this.edges[i].source || vertex == this.edges[i].destination) && edge == this.edges[i].edge)
return true;
}
return false;
};
prototype.degree = function(vertex) {
var count = 0;
for (var i = 0; i < this.edges.length; i++) {
if (vertex == this.edges[i].source || vertex == this.edges[i].destination)
count++;
}
return count;
};
prototype.getNeighborCount = function(vertex) {
return this.getNeighbors(vertex).length;
};
prototype.getIncidentCount = function(edge) {
return this.getIncidentVertices(edge).length;
};
prototype.getEdgeType = function(edge) {};
prototype.getDefaultEdgeType = function() {};
prototype.getEdgesOfType = function(edge_type) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (this.getEdgeType(this.edges[i].edge) == edge_type)
results.push(this.edges[i].edge);
}
return results;
};
prototype.getEdgeCountOfType = function(edge_type) {
return this.getEdgesOfType(edge_type).length;
};
prototype.getInEdges = function(vertex) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (vertex == this.edges[i].destination)
results.push(this.edges[i].edge);
}
EcArray.removeDuplicates(results);
return results;
};
prototype.getOutEdges = function(vertex) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (vertex == this.edges[i].source)
results.push(this.edges[i].edge);
}
EcArray.removeDuplicates(results);
return results;
};
prototype.inDegree = function(vertex) {
return this.getInEdges(vertex).length;
};
prototype.outDegree = function(vertex) {
return this.getOutEdges(vertex).length;
};
prototype.getSource = function(directed_edge) {
for (var i = 0; i < this.edges.length; i++) {
if (directed_edge == this.edges[i].edge)
return this.edges[i].source;
}
return null;
};
prototype.getDest = function(directed_edge) {
for (var i = 0; i < this.edges.length; i++) {
if (directed_edge == this.edges[i].edge)
return this.edges[i].destination;
}
return null;
};
prototype.getPredecessors = function(vertex) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (vertex == this.edges[i].destination)
results.push(this.edges[i].source);
}
EcArray.removeDuplicates(results);
return results;
};
prototype.getSuccessors = function(vertex) {
var results = new Array();
for (var i = 0; i < this.edges.length; i++) {
if (vertex == this.edges[i].source)
results.push(this.edges[i].destination);
}
EcArray.removeDuplicates(results);
return results;
};
prototype.isPredecessor = function(v1, v2) {
for (var i = 0; i < this.edges.length; i++) {
if (v1 == this.edges[i].destination)
if (v2 == this.edges[i].source)
return true;
}
return false;
};
prototype.isSuccessor = function(v1, v2) {
for (var i = 0; i < this.edges.length; i++) {
if (v2 == this.edges[i].destination)
if (v1 == this.edges[i].source)
return true;
}
return false;
};
prototype.getPredecessorCount = function(vertex) {
return this.getPredecessors(vertex).length;
};
prototype.getSuccessorCount = function(vertex) {
return this.getSuccessors(vertex).length;
};
prototype.isSource = function(vertex, edge) {
for (var i = 0; i < this.edges.length; i++) {
if (edge == this.edges[i].edge)
if (vertex == this.edges[i].source)
return true;
}
return false;
};
prototype.isDest = function(vertex, edge) {
for (var i = 0; i < this.edges.length; i++) {
if (edge == this.edges[i].edge)
if (vertex == this.edges[i].destination)
return true;
}
return false;
};
prototype.addEdge = function(e, v1, v2) {
this.addVertex(v1);
this.addVertex(v2);
var t = new Triple();
t.source = v1;
t.destination = v2;
t.edge = e;
if (this.edges.indexOf(t) != -1)
return false;
this.edges.push(t);
return true;
};
prototype.getOpposite = function(vertex, edge) {
for (var i = 0; i < this.edges.length; i++) {
if (edge == this.edges[i].edge)
if (vertex == this.edges[i].destination)
return this.edges[i].source;
else if (vertex == this.edges[i].source)
return this.edges[i].destination;
}
return null;
};
}, {edges: {name: "Array", arguments: [{name: "Triple", arguments: ["V", "V", "E"]}]}, verticies: {name: "Array", arguments: ["V"]}}, {});
if (document && document.getElementsByTagName)
{
var scripts = document.getElementsByTagName("script");
window.scriptPath = scripts[scripts.length-1].src.substr(0,scripts[scripts.length-1].src.lastIndexOf("/"))+"/";
}
function generateUUID(){
var d = new Date().getTime();
if(window && window.performance && typeof window.performance.now === "function"){
d += performance.now();; //use high-precision timer if available
}
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c=='x' ? r : (r&0x3|0x8)).toString(16);
});
return uuid;
}function base64ToBlob(base64Data, contentType) {
contentType = contentType || '';
var sliceSize = 1024;
var byteCharacters = forge.util.decode64(base64Data);
var bytesLength = byteCharacters.length;
var slicesCount = Math.ceil(bytesLength / sliceSize);
var byteArrays = new Array(slicesCount);
for (var sliceIndex = 0; sliceIndex < slicesCount; ++sliceIndex) {
var begin = sliceIndex * sliceSize;
var end = Math.min(begin + sliceSize, bytesLength);
var bytes = new Array(end - begin);
for (var offset = begin, i = 0 ; offset < end; ++i, ++offset) {
bytes[i] = byteCharacters[offset].charCodeAt(0);
}
byteArrays[sliceIndex] = new Uint8Array(bytes);
}
return new Blob(byteArrays, { type: contentType });
}
function stringToFile(string,filename,contentType){
return new File([string],filename,{type:contentType});
}
function ecKeys(obj){return Object.keys(obj);}
function ab2str(buf) {
return new TextDecoder("utf-8").decode(buf);
}
function str2ab(str) {
return new TextEncoder("utf-8").encode(str).buffer;
}
function ecLog(str){
if (console)
if (console.log)
{
console.log(str);
return;
}
else
if (print)
print(str);
}var AlgorithmIdentifier = function() {};
AlgorithmIdentifier = stjs.extend(AlgorithmIdentifier, null, [], function(constructor, prototype) {
prototype.name = null;
prototype.modulusLength = 0;
prototype.length = 0;
prototype.publicExponent = null;
prototype.hash = null;
prototype.iv = null;
prototype.counter = null;
}, {iv: "ArrayBuffer", counter: "ArrayBuffer"}, {});
/**
* @author Fritz
*/
var EcCrypto = function() {};
EcCrypto = stjs.extend(EcCrypto, null, [], function(constructor, prototype) {
constructor.caching = false;
constructor.decryptionCache = new Object();
constructor.md5 = function(s) {
var m = forge.md.md5.create();
m.update(s);
return m.digest().toHex();
};
}, {decryptionCache: "Object"}, {});
/**
* Helper classes for dealing with RSA Public Keys.
*
* @author fritz.ray@eduworks.com
* @class EcPk
* @module com.eduworks.ec
*/
var EcPk = function() {};
EcPk = stjs.extend(EcPk, null, [], function(constructor, prototype) {
prototype.pk = null;
prototype.jwk = null;
prototype.key = null;
prototype.signKey = null;
/**
* Decodes a PEM encoded SubjectPublicKeyInfo (PKCS#8) or RSAPublicKey (PKCS#1) formatted RSA Public Key.
* (In case you were curious.)
*
* @param {string} pem PEM as a string.
* @return {EcPk} Object used to perform public key operations.
* @method fromPem
* @static
*/
constructor.fromPem = function(pem) {
var pk = new EcPk();
try {
pk.pk = forge.pki.publicKeyFromPem(pem);
}catch (ex) {
return null;
}
return pk;
};
/**
* Compares two public keys, and returns true if their PEM forms match.
*
* @param {EcPk} obj Object to compare to.
* @return {boolean} True if the keys match.
* @method equals
*/
prototype.equals = function(obj) {
if (stjs.isInstanceOf(obj.constructor, EcPk))
return this.toPem().equals((obj).toPem());
return Object.prototype.equals.call(this, obj);
};
/**
* Encodes the public key into a PEM encoded SubjectPublicKeyInfo (PKCS#8) formatted RSA Public Key.
* (In case you were curious.)
*
* @return {string} PEM encoded public key without whitespace.
* @method toPem
*/
prototype.toPem = function() {
return forge.pki.publicKeyToPem(this.pk).replaceAll("\r?\n", "");
};
/**
* Encodes the public key into a PEM encoded RSAPublicKey (PKCS#1) formatted RSA Public Key.
* (In case you were curious.)
*
* @return {string} PEM encoded public key without whitespace.
* @method toPkcs1Pem
*/
prototype.toPkcs1Pem = function() {
return forge.pki.publicKeyToRSAPublicKeyPem(this.pk).replaceAll("\r?\n", "");
};
/**
* Encodes the public key into a PEM encoded SubjectPublicKeyInfo (PKCS#8) formatted RSA Public Key.
* (In case you were curious.)
*
* @return {string} PEM encoded public key without whitespace.
* @method toPkcs8Pem
*/
prototype.toPkcs8Pem = function() {
return forge.pki.publicKeyToPem(this.pk).replaceAll("\r?\n", "");
};
prototype.toJwk = function() {
if (this.jwk == null)
this.jwk = pemJwk.pem2jwk(forge.pki.publicKeyToPem(this.pk));
return this.jwk;
};
/**
* Hashes the public key into an SSH compatible fingerprint.
*
* @return {string} Public key fingerprint.
* @method fingerprint
*/
prototype.fingerprint = function() {
var o = new Object();
(o)["encoding"] = "hex";
return forge.ssh.getPublicKeyFingerprint(this.pk, o);
};
prototype.verify = function(bytes, decode64) {
return this.pk.verify(bytes, decode64);
};
}, {pk: "forge.pk", jwk: "Object", key: "CryptoKey", signKey: "CryptoKey"}, {});
var CryptoKey = function() {};
CryptoKey = stjs.extend(CryptoKey, null, [], null, {}, {});
/**
* Secure Hash Algorithm with 256-bit digest (SHA-256) implementation.
*
* See FIPS 180-2 for details.
*
* @author Dave Longley
*
* Copyright (c) 2010-2014 Digital Bazaar, Inc.
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
var sha256 = forge.sha256 = forge.sha256 || {};
forge.md = forge.md || {};
forge.md.algorithms = forge.md.algorithms || {};
forge.md.sha256 = forge.md.algorithms.sha256 = sha256;
/**
* Creates a SHA-256 message digest object.
*
* @return a message digest object.
*/
sha256.create = function() {
// do initialization as necessary
if(!_initialized) {
_init();
}
// SHA-256 state contains eight 32-bit integers
var _state = null;
// input buffer
var _input = forge.util.createBuffer();
// used for word storage
var _w = new Array(64);
// message digest object
var md = {
algorithm: 'sha256',
blockLength: 64,
digestLength: 32,
// 56-bit length of message so far (does not including padding)
messageLength: 0,
// true 64-bit message length as two 32-bit ints
messageLength64: [0, 0]
};
/**
* Starts the digest.
*
* @return this digest object.
*/
md.start = function() {
md.messageLength = 0;
md.messageLength64 = [0, 0];
_input = forge.util.createBuffer();
_state = {
h0: 0x6A09E667,
h1: 0xBB67AE85,
h2: 0x3C6EF372,
h3: 0xA54FF53A,
h4: 0x510E527F,
h5: 0x9B05688C,
h6: 0x1F83D9AB,
h7: 0x5BE0CD19
};
return md;
};
// start digest automatically for first time
md.start();
/**
* Updates the digest with the given message input. The given input can
* treated as raw input (no encoding will be applied) or an encoding of
* 'utf8' maybe given to encode the input using UTF-8.
*
* @param msg the message input to update with.
* @param encoding the encoding to use (default: 'raw', other: 'utf8').
*
* @return this digest object.
*/
md.update = function(msg, encoding) {
if(encoding === 'utf8') {
msg = forge.util.encodeUtf8(msg);
}
// update message length
md.messageLength += msg.length;
md.messageLength64[0] += (msg.length / 0x100000000) >>> 0;
md.messageLength64[1] += msg.length >>> 0;
// add bytes to input buffer
_input.putBytes(msg);
// process bytes
_update(_state, _w, _input);
// compact input buffer every 2K or if empty
if(_input.read > 2048 || _input.length() === 0) {
_input.compact();
}
return md;
};
/**
* Produces the digest.
*
* @return a byte buffer containing the digest value.
*/
md.digest = function() {
/* Note: Here we copy the remaining bytes in the input buffer and
add the appropriate SHA-256 padding. Then we do the final update
on a copy of the state so that if the user wants to get
intermediate digests they can do so. */
/* Determine the number of bytes that must be added to the message
to ensure its length is congruent to 448 mod 512. In other words,
the data to be digested must be a multiple of 512 bits (or 128 bytes).
This data includes the message, some padding, and the length of the
message. Since the length of the message will be encoded as 8 bytes (64
bits), that means that the last segment of the data must have 56 bytes
(448 bits) of message and padding. Therefore, the length of the message
plus the padding must be congruent to 448 mod 512 because
512 - 128 = 448.
In order to fill up the message length it must be filled with
padding that begins with 1 bit followed by all 0 bits. Padding
must *always* be present, so if the message length is already
congruent to 448 mod 512, then 512 padding bits must be added. */
// 512 bits == 64 bytes, 448 bits == 56 bytes, 64 bits = 8 bytes
// _padding starts with 1 byte with first bit is set in it which
// is byte value 128, then there may be up to 63 other pad bytes
var padBytes = forge.util.createBuffer();
padBytes.putBytes(_input.bytes());
// 64 - (remaining msg + 8 bytes msg length) mod 64
padBytes.putBytes(
_padding.substr(0, 64 - ((md.messageLength64[1] + 8) & 0x3F)));
/* Now append length of the message. The length is appended in bits
as a 64-bit number in big-endian order. Since we store the length in
bytes, we must multiply the 64-bit length by 8 (or left shift by 3). */
padBytes.putInt32(
(md.messageLength64[0] << 3) | (md.messageLength64[0] >>> 28));
padBytes.putInt32(md.messageLength64[1] << 3);
var s2 = {
h0: _state.h0,
h1: _state.h1,
h2: _state.h2,
h3: _state.h3,
h4: _state.h4,
h5: _state.h5,
h6: _state.h6,
h7: _state.h7
};
_update(s2, _w, padBytes);
var rval = forge.util.createBuffer();
rval.putInt32(s2.h0);
rval.putInt32(s2.h1);
rval.putInt32(s2.h2);
rval.putInt32(s2.h3);
rval.putInt32(s2.h4);
rval.putInt32(s2.h5);
rval.putInt32(s2.h6);
rval.putInt32(s2.h7);
return rval;
};
return md;
};
// sha-256 padding bytes not initialized yet
var _padding = null;
var _initialized = false;
// table of constants
var _k = null;
/**
* Initializes the constant tables.
*/
function _init() {
// create padding
_padding = String.fromCharCode(128);
_padding += forge.util.fillString(String.fromCharCode(0x00), 64);
// create K table for SHA-256
_k = [
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];
// now initialized
_initialized = true;
}
/**
* Updates a SHA-256 state with the given byte buffer.
*
* @param s the SHA-256 state to update.
* @param w the array to use to store words.
* @param bytes the byte buffer to update with.
*/
function _update(s, w, bytes) {
// consume 512 bit (64 byte) chunks
var t1, t2, s0, s1, ch, maj, i, a, b, c, d, e, f, g, h;
var len = bytes.length();
while(len >= 64) {
// the w array will be populated with sixteen 32-bit big-endian words
// and then extended into 64 32-bit words according to SHA-256
for(i = 0; i < 16; ++i) {
w[i] = bytes.getInt32();
}
for(; i < 64; ++i) {
// XOR word 2 words ago rot right 17, rot right 19, shft right 10
t1 = w[i - 2];
t1 =
((t1 >>> 17) | (t1 << 15)) ^
((t1 >>> 19) | (t1 << 13)) ^
(t1 >>> 10);
// XOR word 15 words ago rot right 7, rot right 18, shft right 3
t2 = w[i - 15];
t2 =
((t2 >>> 7) | (t2 << 25)) ^
((t2 >>> 18) | (t2 << 14)) ^
(t2 >>> 3);
// sum(t1, word 7 ago, t2, word 16 ago) modulo 2^32
w[i] = (t1 + w[i - 7] + t2 + w[i - 16]) | 0;
}
// initialize hash value for this chunk
a = s.h0;
b = s.h1;
c = s.h2;
d = s.h3;
e = s.h4;
f = s.h5;
g = s.h6;
h = s.h7;
// round function
for(i = 0; i < 64; ++i) {
// Sum1(e)
s1 =
((e >>> 6) | (e << 26)) ^
((e >>> 11) | (e << 21)) ^
((e >>> 25) | (e << 7));
// Ch(e, f, g) (optimized the same way as SHA-1)
ch = g ^ (e & (f ^ g));
// Sum0(a)
s0 =
((a >>> 2) | (a << 30)) ^
((a >>> 13) | (a << 19)) ^
((a >>> 22) | (a << 10));
// Maj(a, b, c) (optimized the same way as SHA-1)
maj = (a & b) | (c & (a ^ b));
// main algorithm
t1 = h + s1 + ch + _k[i] + w[i];
t2 = s0 + maj;
h = g;
g = f;
f = e;
e = (d + t1) | 0;
d = c;
c = b;
b = a;
a = (t1 + t2) | 0;
}
// update hash state
s.h0 = (s.h0 + a) | 0;
s.h1 = (s.h1 + b) | 0;
s.h2 = (s.h2 + c) | 0;
s.h3 = (s.h3 + d) | 0;
s.h4 = (s.h4 + e) | 0;
s.h5 = (s.h5 + f) | 0;
s.h6 = (s.h6 + g) | 0;
s.h7 = (s.h7 + h) | 0;
len -= 64;
}
}
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'sha256';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define(['require', 'module', './util'], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
/**
* An API for getting cryptographically-secure random bytes. The bytes are
* generated using the Fortuna algorithm devised by Bruce Schneier and
* Niels Ferguson.
*
* Getting strong random bytes is not yet easy to do in javascript. The only
* truish random entropy that can be collected is from the mouse, keyboard, or
* from timing with respect to page loads, etc. This generator makes a poor
* attempt at providing random bytes when those sources haven't yet provided
* enough entropy to initially seed or to reseed the PRNG.
*
* @author Dave Longley
*
* Copyright (c) 2009-2014 Digital Bazaar, Inc.
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
// forge.random already defined
if(forge.random && forge.random.getBytes) {
return;
}
(function(jQuery) {
// the default prng plugin, uses AES-128
var prng_aes = {};
var _prng_aes_output = new Array(4);
var _prng_aes_buffer = forge.util.createBuffer();
prng_aes.formatKey = function(key) {
// convert the key into 32-bit integers
var tmp = forge.util.createBuffer(key);
key = new Array(4);
key[0] = tmp.getInt32();
key[1] = tmp.getInt32();
key[2] = tmp.getInt32();
key[3] = tmp.getInt32();
// return the expanded key
return forge.aes._expandKey(key, false);
};
prng_aes.formatSeed = function(seed) {
// convert seed into 32-bit integers
var tmp = forge.util.createBuffer(seed);
seed = new Array(4);
seed[0] = tmp.getInt32();
seed[1] = tmp.getInt32();
seed[2] = tmp.getInt32();
seed[3] = tmp.getInt32();
return seed;
};
prng_aes.cipher = function(key, seed) {
forge.aes._updateBlock(key, seed, _prng_aes_output, false);
_prng_aes_buffer.putInt32(_prng_aes_output[0]);
_prng_aes_buffer.putInt32(_prng_aes_output[1]);
_prng_aes_buffer.putInt32(_prng_aes_output[2]);
_prng_aes_buffer.putInt32(_prng_aes_output[3]);
return _prng_aes_buffer.getBytes();
};
prng_aes.increment = function(seed) {
// FIXME: do we care about carry or signed issues?
++seed[3];
return seed;
};
prng_aes.md = forge.md.sha256;
/**
* Creates a new PRNG.
*/
function spawnPrng() {
var ctx = forge.prng.create(prng_aes);
/**
* Gets random bytes. If a native secure crypto API is unavailable, this
* method tries to make the bytes more unpredictable by drawing from data that
* can be collected from the user of the browser, eg: mouse movement.
*
* If a callback is given, this method will be called asynchronously.
*
* @param count the number of random bytes to get.
* @param [callback(err, bytes)] called once the operation completes.
*
* @return the random bytes in a string.
*/
ctx.getBytes = function(count, callback) {
return ctx.generate(count, callback);
};
/**
* Gets random bytes asynchronously. If a native secure crypto API is
* unavailable, this method tries to make the bytes more unpredictable by
* drawing from data that can be collected from the user of the browser,
* eg: mouse movement.
*
* @param count the number of random bytes to get.
*
* @return the random bytes in a string.
*/
ctx.getBytesSync = function(count) {
return ctx.generate(count);
};
return ctx;
}
// create default prng context
var _ctx = spawnPrng();
// add other sources of entropy only if window.crypto.getRandomValues is not
// available -- otherwise this source will be automatically used by the prng
var _nodejs = (
typeof process !== 'undefined' && process.versions && process.versions.node);
var getRandomValues = null;
if(typeof window !== 'undefined') {
var _crypto = window.crypto || window.msCrypto;
if(_crypto && _crypto.getRandomValues) {
getRandomValues = function(arr) {
return _crypto.getRandomValues(arr);
};
}
}
if(forge.disableNativeCode || (!_nodejs && !getRandomValues)) {
// if this is a web worker, do not use weak entropy, instead register to
// receive strong entropy asynchronously from the main thread
if(typeof window === 'undefined' || window.document === undefined) {
// FIXME:
}
// get load time entropy
_ctx.collectInt(+new Date(), 32);
// add some entropy from navigator object
if(typeof(navigator) !== 'undefined') {
var _navBytes = '';
for(var key in navigator) {
try {
if(typeof(navigator[key]) == 'string') {
_navBytes += navigator[key];
}
} catch(e) {
/* Some navigator keys might not be accessible, e.g. the geolocation
attribute throws an exception if touched in Mozilla chrome://
context.
Silently ignore this and just don't use this as a source of
entropy. */
}
}
_ctx.collect(_navBytes);
_navBytes = null;
}
// add mouse and keyboard collectors if jquery is available
if(jQuery) {
// set up mouse entropy capture
jQuery().mousemove(function(e) {
// add mouse coords
_ctx.collectInt(e.clientX, 16);
_ctx.collectInt(e.clientY, 16);
});
// set up keyboard entropy capture
jQuery().keypress(function(e) {
_ctx.collectInt(e.charCode, 8);
});
}
}
/* Random API */
if(!forge.random) {
forge.random = _ctx;
} else {
// extend forge.random with _ctx
for(var key in _ctx) {
forge.random[key] = _ctx[key];
}
}
// expose spawn PRNG
forge.random.createInstance = spawnPrng;
})(typeof(jQuery) !== 'undefined' ? jQuery : null);
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'random';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define(['require', 'module', './aes', './md', './prng', './util'], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
var jwk = function() {};
jwk = stjs.extend(jwk, null, [], function(constructor, prototype) {
prototype.kty = null;
prototype.k = null;
prototype.alg = null;
prototype.ext = null;
}, {}, {});
/**
* Utility functions for web applications.
*
* @author Dave Longley
*
* Copyright (c) 2010-2014 Digital Bazaar, Inc.
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
/* Utilities API */
var util = forge.util = forge.util || {};
// define setImmediate and nextTick
(function() {
// use native nextTick
if(typeof process !== 'undefined' && process.nextTick) {
util.nextTick = process.nextTick;
if(typeof setImmediate === 'function') {
util.setImmediate = setImmediate;
} else {
// polyfill setImmediate with nextTick, older versions of node
// (those w/o setImmediate) won't totally starve IO
util.setImmediate = util.nextTick;
}
return;
}
// polyfill nextTick with native setImmediate
if(typeof setImmediate === 'function') {
util.setImmediate = setImmediate;
util.nextTick = function(callback) {
return setImmediate(callback);
};
return;
}
/* Note: A polyfill upgrade pattern is used here to allow combining
polyfills. For example, MutationObserver is fast, but blocks UI updates,
so it needs to allow UI updates periodically, so it falls back on
postMessage or setTimeout. */
// polyfill with setTimeout
util.setImmediate = function(callback) {
setTimeout(callback, 0);
};
// upgrade polyfill to use postMessage
if(typeof window !== 'undefined' &&
typeof window.postMessage === 'function') {
var msg = 'forge.setImmediate';
var callbacks = [];
util.setImmediate = function(callback) {
callbacks.push(callback);
// only send message when one hasn't been sent in
// the current turn of the event loop
if(callbacks.length === 1) {
window.postMessage(msg, '*');
}
};
function handler(event) {
if(event.source === window && event.data === msg) {
event.stopPropagation();
var copy = callbacks.slice();
callbacks.length = 0;
copy.forEach(function(callback) {
callback();
});
}
}
window.addEventListener('message', handler, true);
}
// upgrade polyfill to use MutationObserver
if(typeof MutationObserver !== 'undefined') {
// polyfill with MutationObserver
var now = Date.now();
var attr = true;
var div = document.createElement('div');
var callbacks = [];
new MutationObserver(function() {
var copy = callbacks.slice();
callbacks.length = 0;
copy.forEach(function(callback) {
callback();
});
}).observe(div, {attributes: true});
var oldSetImmediate = util.setImmediate;
util.setImmediate = function(callback) {
if(Date.now() - now > 15) {
now = Date.now();
oldSetImmediate(callback);
} else {
callbacks.push(callback);
// only trigger observer when it hasn't been triggered in
// the current turn of the event loop
if(callbacks.length === 1) {
div.setAttribute('a', attr = !attr);
}
}
};
}
util.nextTick = util.setImmediate;
})();
// define isArray
util.isArray = Array.isArray || function(x) {
return Object.prototype.toString.call(x) === '[object Array]';
};
// define isArrayBuffer
util.isArrayBuffer = function(x) {
return typeof ArrayBuffer !== 'undefined' && x instanceof ArrayBuffer;
};
// define isArrayBufferView
util.isArrayBufferView = function(x) {
return x && util.isArrayBuffer(x.buffer) && x.byteLength !== undefined;
};
// TODO: set ByteBuffer to best available backing
util.ByteBuffer = ByteStringBuffer;
/** Buffer w/BinaryString backing */
/**
* Constructor for a binary string backed byte buffer.
*
* @param [b] the bytes to wrap (either encoded as string, one byte per
* character, or as an ArrayBuffer or Typed Array).
*/
function ByteStringBuffer(b) {
// TODO: update to match DataBuffer API
// the data in this buffer
this.data = '';
// the pointer for reading from this buffer
this.read = 0;
if(typeof b === 'string') {
this.data = b;
} else if(util.isArrayBuffer(b) || util.isArrayBufferView(b)) {
// convert native buffer to forge buffer
// FIXME: support native buffers internally instead
var arr = new Uint8Array(b);
try {
this.data = String.fromCharCode.apply(null, arr);
} catch(e) {
for(var i = 0; i < arr.length; ++i) {
this.putByte(arr[i]);
}
}
} else if(b instanceof ByteStringBuffer ||
(typeof b === 'object' && typeof b.data === 'string' &&
typeof b.read === 'number')) {
// copy existing buffer
this.data = b.data;
this.read = b.read;
}
// used for v8 optimization
this._constructedStringLength = 0;
}
util.ByteStringBuffer = ByteStringBuffer;
/* Note: This is an optimization for V8-based browsers. When V8 concatenates
a string, the strings are only joined logically using a "cons string" or
"constructed/concatenated string". These containers keep references to one
another and can result in very large memory usage. For example, if a 2MB
string is constructed by concatenating 4 bytes together at a time, the
memory usage will be ~44MB; so ~22x increase. The strings are only joined
together when an operation requiring their joining takes place, such as
substr(). This function is called when adding data to this buffer to ensure
these types of strings are periodically joined to reduce the memory
footprint. */
var _MAX_CONSTRUCTED_STRING_LENGTH = 4096;
util.ByteStringBuffer.prototype._optimizeConstructedString = function(x) {
this._constructedStringLength += x;
if(this._constructedStringLength > _MAX_CONSTRUCTED_STRING_LENGTH) {
// this substr() should cause the constructed string to join
this.data.substr(0, 1);
this._constructedStringLength = 0;
}
};
/**
* Gets the number of bytes in this buffer.
*
* @return the number of bytes in this buffer.
*/
util.ByteStringBuffer.prototype.length = function() {
return this.data.length - this.read;
};
/**
* Gets whether or not this buffer is empty.
*
* @return true if this buffer is empty, false if not.
*/
util.ByteStringBuffer.prototype.isEmpty = function() {
return this.length() <= 0;
};
/**
* Puts a byte in this buffer.
*
* @param b the byte to put.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putByte = function(b) {
return this.putBytes(String.fromCharCode(b));
};
/**
* Puts a byte in this buffer N times.
*
* @param b the byte to put.
* @param n the number of bytes of value b to put.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.fillWithByte = function(b, n) {
b = String.fromCharCode(b);
var d = this.data;
while(n > 0) {
if(n & 1) {
d += b;
}
n >>>= 1;
if(n > 0) {
b += b;
}
}
this.data = d;
this._optimizeConstructedString(n);
return this;
};
/**
* Puts bytes in this buffer.
*
* @param bytes the bytes (as a UTF-8 encoded string) to put.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putBytes = function(bytes) {
this.data += bytes;
this._optimizeConstructedString(bytes.length);
return this;
};
/**
* Puts a UTF-16 encoded string into this buffer.
*
* @param str the string to put.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putString = function(str) {
return this.putBytes(util.encodeUtf8(str));
};
/**
* Puts a 16-bit integer in this buffer in big-endian order.
*
* @param i the 16-bit integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putInt16 = function(i) {
return this.putBytes(
String.fromCharCode(i >> 8 & 0xFF) +
String.fromCharCode(i & 0xFF));
};
/**
* Puts a 24-bit integer in this buffer in big-endian order.
*
* @param i the 24-bit integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putInt24 = function(i) {
return this.putBytes(
String.fromCharCode(i >> 16 & 0xFF) +
String.fromCharCode(i >> 8 & 0xFF) +
String.fromCharCode(i & 0xFF));
};
/**
* Puts a 32-bit integer in this buffer in big-endian order.
*
* @param i the 32-bit integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putInt32 = function(i) {
return this.putBytes(
String.fromCharCode(i >> 24 & 0xFF) +
String.fromCharCode(i >> 16 & 0xFF) +
String.fromCharCode(i >> 8 & 0xFF) +
String.fromCharCode(i & 0xFF));
};
/**
* Puts a 16-bit integer in this buffer in little-endian order.
*
* @param i the 16-bit integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putInt16Le = function(i) {
return this.putBytes(
String.fromCharCode(i & 0xFF) +
String.fromCharCode(i >> 8 & 0xFF));
};
/**
* Puts a 24-bit integer in this buffer in little-endian order.
*
* @param i the 24-bit integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putInt24Le = function(i) {
return this.putBytes(
String.fromCharCode(i & 0xFF) +
String.fromCharCode(i >> 8 & 0xFF) +
String.fromCharCode(i >> 16 & 0xFF));
};
/**
* Puts a 32-bit integer in this buffer in little-endian order.
*
* @param i the 32-bit integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putInt32Le = function(i) {
return this.putBytes(
String.fromCharCode(i & 0xFF) +
String.fromCharCode(i >> 8 & 0xFF) +
String.fromCharCode(i >> 16 & 0xFF) +
String.fromCharCode(i >> 24 & 0xFF));
};
/**
* Puts an n-bit integer in this buffer in big-endian order.
*
* @param i the n-bit integer.
* @param n the number of bits in the integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putInt = function(i, n) {
var bytes = '';
do {
n -= 8;
bytes += String.fromCharCode((i >> n) & 0xFF);
} while(n > 0);
return this.putBytes(bytes);
};
/**
* Puts a signed n-bit integer in this buffer in big-endian order. Two's
* complement representation is used.
*
* @param i the n-bit integer.
* @param n the number of bits in the integer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putSignedInt = function(i, n) {
if(i < 0) {
i += 2 << (n - 1);
}
return this.putInt(i, n);
};
/**
* Puts the given buffer into this buffer.
*
* @param buffer the buffer to put into this one.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.putBuffer = function(buffer) {
return this.putBytes(buffer.getBytes());
};
/**
* Gets a byte from this buffer and advances the read pointer by 1.
*
* @return the byte.
*/
util.ByteStringBuffer.prototype.getByte = function() {
return this.data.charCodeAt(this.read++);
};
/**
* Gets a uint16 from this buffer in big-endian order and advances the read
* pointer by 2.
*
* @return the uint16.
*/
util.ByteStringBuffer.prototype.getInt16 = function() {
var rval = (
this.data.charCodeAt(this.read) << 8 ^
this.data.charCodeAt(this.read + 1));
this.read += 2;
return rval;
};
/**
* Gets a uint24 from this buffer in big-endian order and advances the read
* pointer by 3.
*
* @return the uint24.
*/
util.ByteStringBuffer.prototype.getInt24 = function() {
var rval = (
this.data.charCodeAt(this.read) << 16 ^
this.data.charCodeAt(this.read + 1) << 8 ^
this.data.charCodeAt(this.read + 2));
this.read += 3;
return rval;
};
/**
* Gets a uint32 from this buffer in big-endian order and advances the read
* pointer by 4.
*
* @return the word.
*/
util.ByteStringBuffer.prototype.getInt32 = function() {
var rval = (
this.data.charCodeAt(this.read) << 24 ^
this.data.charCodeAt(this.read + 1) << 16 ^
this.data.charCodeAt(this.read + 2) << 8 ^
this.data.charCodeAt(this.read + 3));
this.read += 4;
return rval;
};
/**
* Gets a uint16 from this buffer in little-endian order and advances the read
* pointer by 2.
*
* @return the uint16.
*/
util.ByteStringBuffer.prototype.getInt16Le = function() {
var rval = (
this.data.charCodeAt(this.read) ^
this.data.charCodeAt(this.read + 1) << 8);
this.read += 2;
return rval;
};
/**
* Gets a uint24 from this buffer in little-endian order and advances the read
* pointer by 3.
*
* @return the uint24.
*/
util.ByteStringBuffer.prototype.getInt24Le = function() {
var rval = (
this.data.charCodeAt(this.read) ^
this.data.charCodeAt(this.read + 1) << 8 ^
this.data.charCodeAt(this.read + 2) << 16);
this.read += 3;
return rval;
};
/**
* Gets a uint32 from this buffer in little-endian order and advances the read
* pointer by 4.
*
* @return the word.
*/
util.ByteStringBuffer.prototype.getInt32Le = function() {
var rval = (
this.data.charCodeAt(this.read) ^
this.data.charCodeAt(this.read + 1) << 8 ^
this.data.charCodeAt(this.read + 2) << 16 ^
this.data.charCodeAt(this.read + 3) << 24);
this.read += 4;
return rval;
};
/**
* Gets an n-bit integer from this buffer in big-endian order and advances the
* read pointer by n/8.
*
* @param n the number of bits in the integer.
*
* @return the integer.
*/
util.ByteStringBuffer.prototype.getInt = function(n) {
var rval = 0;
do {
rval = (rval << 8) + this.data.charCodeAt(this.read++);
n -= 8;
} while(n > 0);
return rval;
};
/**
* Gets a signed n-bit integer from this buffer in big-endian order, using
* two's complement, and advances the read pointer by n/8.
*
* @param n the number of bits in the integer.
*
* @return the integer.
*/
util.ByteStringBuffer.prototype.getSignedInt = function(n) {
var x = this.getInt(n);
var max = 2 << (n - 2);
if(x >= max) {
x -= max << 1;
}
return x;
};
/**
* Reads bytes out into a UTF-8 string and clears them from the buffer.
*
* @param count the number of bytes to read, undefined or null for all.
*
* @return a UTF-8 string of bytes.
*/
util.ByteStringBuffer.prototype.getBytes = function(count) {
var rval;
if(count) {
// read count bytes
count = Math.min(this.length(), count);
rval = this.data.slice(this.read, this.read + count);
this.read += count;
} else if(count === 0) {
rval = '';
} else {
// read all bytes, optimize to only copy when needed
rval = (this.read === 0) ? this.data : this.data.slice(this.read);
this.clear();
}
return rval;
};
/**
* Gets a UTF-8 encoded string of the bytes from this buffer without modifying
* the read pointer.
*
* @param count the number of bytes to get, omit to get all.
*
* @return a string full of UTF-8 encoded characters.
*/
util.ByteStringBuffer.prototype.bytes = function(count) {
return (typeof(count) === 'undefined' ?
this.data.slice(this.read) :
this.data.slice(this.read, this.read + count));
};
/**
* Gets a byte at the given index without modifying the read pointer.
*
* @param i the byte index.
*
* @return the byte.
*/
util.ByteStringBuffer.prototype.at = function(i) {
return this.data.charCodeAt(this.read + i);
};
/**
* Puts a byte at the given index without modifying the read pointer.
*
* @param i the byte index.
* @param b the byte to put.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.setAt = function(i, b) {
this.data = this.data.substr(0, this.read + i) +
String.fromCharCode(b) +
this.data.substr(this.read + i + 1);
return this;
};
/**
* Gets the last byte without modifying the read pointer.
*
* @return the last byte.
*/
util.ByteStringBuffer.prototype.last = function() {
return this.data.charCodeAt(this.data.length - 1);
};
/**
* Creates a copy of this buffer.
*
* @return the copy.
*/
util.ByteStringBuffer.prototype.copy = function() {
var c = util.createBuffer(this.data);
c.read = this.read;
return c;
};
/**
* Compacts this buffer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.compact = function() {
if(this.read > 0) {
this.data = this.data.slice(this.read);
this.read = 0;
}
return this;
};
/**
* Clears this buffer.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.clear = function() {
this.data = '';
this.read = 0;
return this;
};
/**
* Shortens this buffer by triming bytes off of the end of this buffer.
*
* @param count the number of bytes to trim off.
*
* @return this buffer.
*/
util.ByteStringBuffer.prototype.truncate = function(count) {
var len = Math.max(0, this.length() - count);
this.data = this.data.substr(this.read, len);
this.read = 0;
return this;
};
/**
* Converts this buffer to a hexadecimal string.
*
* @return a hexadecimal string.
*/
util.ByteStringBuffer.prototype.toHex = function() {
var rval = '';
for(var i = this.read; i < this.data.length; ++i) {
var b = this.data.charCodeAt(i);
if(b < 16) {
rval += '0';
}
rval += b.toString(16);
}
return rval;
};
/**
* Converts this buffer to a UTF-16 string (standard JavaScript string).
*
* @return a UTF-16 string.
*/
util.ByteStringBuffer.prototype.toString = function() {
return util.decodeUtf8(this.bytes());
};
/** End Buffer w/BinaryString backing */
/** Buffer w/UInt8Array backing */
/**
* FIXME: Experimental. Do not use yet.
*
* Constructor for an ArrayBuffer-backed byte buffer.
*
* The buffer may be constructed from a string, an ArrayBuffer, DataView, or a
* TypedArray.
*
* If a string is given, its encoding should be provided as an option,
* otherwise it will default to 'binary'. A 'binary' string is encoded such
* that each character is one byte in length and size.
*
* If an ArrayBuffer, DataView, or TypedArray is given, it will be used
* *directly* without any copying. Note that, if a write to the buffer requires
* more space, the buffer will allocate a new backing ArrayBuffer to
* accommodate. The starting read and write offsets for the buffer may be
* given as options.
*
* @param [b] the initial bytes for this buffer.
* @param options the options to use:
* [readOffset] the starting read offset to use (default: 0).
* [writeOffset] the starting write offset to use (default: the
* length of the first parameter).
* [growSize] the minimum amount, in bytes, to grow the buffer by to
* accommodate writes (default: 1024).
* [encoding] the encoding ('binary', 'utf8', 'utf16', 'hex') for the
* first parameter, if it is a string (default: 'binary').
*/
function DataBuffer(b, options) {
// default options
options = options || {};
// pointers for read from/write to buffer
this.read = options.readOffset || 0;
this.growSize = options.growSize || 1024;
var isArrayBuffer = util.isArrayBuffer(b);
var isArrayBufferView = util.isArrayBufferView(b);
if(isArrayBuffer || isArrayBufferView) {
// use ArrayBuffer directly
if(isArrayBuffer) {
this.data = new DataView(b);
} else {
// TODO: adjust read/write offset based on the type of view
// or specify that this must be done in the options ... that the
// offsets are byte-based
this.data = new DataView(b.buffer, b.byteOffset, b.byteLength);
}
this.write = ('writeOffset' in options ?
options.writeOffset : this.data.byteLength);
return;
}
// initialize to empty array buffer and add any given bytes using putBytes
this.data = new DataView(new ArrayBuffer(0));
this.write = 0;
if(b !== null && b !== undefined) {
this.putBytes(b);
}
if('writeOffset' in options) {
this.write = options.writeOffset;
}
}
util.DataBuffer = DataBuffer;
/**
* Gets the number of bytes in this buffer.
*
* @return the number of bytes in this buffer.
*/
util.DataBuffer.prototype.length = function() {
return this.write - this.read;
};
/**
* Gets whether or not this buffer is empty.
*
* @return true if this buffer is empty, false if not.
*/
util.DataBuffer.prototype.isEmpty = function() {
return this.length() <= 0;
};
/**
* Ensures this buffer has enough empty space to accommodate the given number
* of bytes. An optional parameter may be given that indicates a minimum
* amount to grow the buffer if necessary. If the parameter is not given,
* the buffer will be grown by some previously-specified default amount
* or heuristic.
*
* @param amount the number of bytes to accommodate.
* @param [growSize] the minimum amount, in bytes, to grow the buffer by if
* necessary.
*/
util.DataBuffer.prototype.accommodate = function(amount, growSize) {
if(this.length() >= amount) {
return this;
}
growSize = Math.max(growSize || this.growSize, amount);
// grow buffer
var src = new Uint8Array(
this.data.buffer, this.data.byteOffset, this.data.byteLength);
var dst = new Uint8Array(this.length() + growSize);
dst.set(src);
this.data = new DataView(dst.buffer);
return this;
};
/**
* Puts a byte in this buffer.
*
* @param b the byte to put.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putByte = function(b) {
this.accommodate(1);
this.data.setUint8(this.write++, b);
return this;
};
/**
* Puts a byte in this buffer N times.
*
* @param b the byte to put.
* @param n the number of bytes of value b to put.
*
* @return this buffer.
*/
util.DataBuffer.prototype.fillWithByte = function(b, n) {
this.accommodate(n);
for(var i = 0; i < n; ++i) {
this.data.setUint8(b);
}
return this;
};
/**
* Puts bytes in this buffer. The bytes may be given as a string, an
* ArrayBuffer, a DataView, or a TypedArray.
*
* @param bytes the bytes to put.
* @param [encoding] the encoding for the first parameter ('binary', 'utf8',
* 'utf16', 'hex'), if it is a string (default: 'binary').
*
* @return this buffer.
*/
util.DataBuffer.prototype.putBytes = function(bytes, encoding) {
if(util.isArrayBufferView(bytes)) {
var src = new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);
var len = src.byteLength - src.byteOffset;
this.accommodate(len);
var dst = new Uint8Array(this.data.buffer, this.write);
dst.set(src);
this.write += len;
return this;
}
if(util.isArrayBuffer(bytes)) {
var src = new Uint8Array(bytes);
this.accommodate(src.byteLength);
var dst = new Uint8Array(this.data.buffer);
dst.set(src, this.write);
this.write += src.byteLength;
return this;
}
// bytes is a util.DataBuffer or equivalent
if(bytes instanceof util.DataBuffer ||
(typeof bytes === 'object' &&
typeof bytes.read === 'number' && typeof bytes.write === 'number' &&
util.isArrayBufferView(bytes.data))) {
var src = new Uint8Array(bytes.data.byteLength, bytes.read, bytes.length());
this.accommodate(src.byteLength);
var dst = new Uint8Array(bytes.data.byteLength, this.write);
dst.set(src);
this.write += src.byteLength;
return this;
}
if(bytes instanceof util.ByteStringBuffer) {
// copy binary string and process as the same as a string parameter below
bytes = bytes.data;
encoding = 'binary';
}
// string conversion
encoding = encoding || 'binary';
if(typeof bytes === 'string') {
var view;
// decode from string
if(encoding === 'hex') {
this.accommodate(Math.ceil(bytes.length / 2));
view = new Uint8Array(this.data.buffer, this.write);
this.write += util.binary.hex.decode(bytes, view, this.write);
return this;
}
if(encoding === 'base64') {
this.accommodate(Math.ceil(bytes.length / 4) * 3);
view = new Uint8Array(this.data.buffer, this.write);
this.write += util.binary.base64.decode(bytes, view, this.write);
return this;
}
// encode text as UTF-8 bytes
if(encoding === 'utf8') {
// encode as UTF-8 then decode string as raw binary
bytes = util.encodeUtf8(bytes);
encoding = 'binary';
}
// decode string as raw binary
if(encoding === 'binary' || encoding === 'raw') {
// one byte per character
this.accommodate(bytes.length);
view = new Uint8Array(this.data.buffer, this.write);
this.write += util.binary.raw.decode(view);
return this;
}
// encode text as UTF-16 bytes
if(encoding === 'utf16') {
// two bytes per character
this.accommodate(bytes.length * 2);
view = new Uint16Array(this.data.buffer, this.write);
this.write += util.text.utf16.encode(view);
return this;
}
throw new Error('Invalid encoding: ' + encoding);
}
throw Error('Invalid parameter: ' + bytes);
};
/**
* Puts the given buffer into this buffer.
*
* @param buffer the buffer to put into this one.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putBuffer = function(buffer) {
this.putBytes(buffer);
buffer.clear();
return this;
};
/**
* Puts a string into this buffer.
*
* @param str the string to put.
* @param [encoding] the encoding for the string (default: 'utf16').
*
* @return this buffer.
*/
util.DataBuffer.prototype.putString = function(str) {
return this.putBytes(str, 'utf16');
};
/**
* Puts a 16-bit integer in this buffer in big-endian order.
*
* @param i the 16-bit integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putInt16 = function(i) {
this.accommodate(2);
this.data.setInt16(this.write, i);
this.write += 2;
return this;
};
/**
* Puts a 24-bit integer in this buffer in big-endian order.
*
* @param i the 24-bit integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putInt24 = function(i) {
this.accommodate(3);
this.data.setInt16(this.write, i >> 8 & 0xFFFF);
this.data.setInt8(this.write, i >> 16 & 0xFF);
this.write += 3;
return this;
};
/**
* Puts a 32-bit integer in this buffer in big-endian order.
*
* @param i the 32-bit integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putInt32 = function(i) {
this.accommodate(4);
this.data.setInt32(this.write, i);
this.write += 4;
return this;
};
/**
* Puts a 16-bit integer in this buffer in little-endian order.
*
* @param i the 16-bit integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putInt16Le = function(i) {
this.accommodate(2);
this.data.setInt16(this.write, i, true);
this.write += 2;
return this;
};
/**
* Puts a 24-bit integer in this buffer in little-endian order.
*
* @param i the 24-bit integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putInt24Le = function(i) {
this.accommodate(3);
this.data.setInt8(this.write, i >> 16 & 0xFF);
this.data.setInt16(this.write, i >> 8 & 0xFFFF, true);
this.write += 3;
return this;
};
/**
* Puts a 32-bit integer in this buffer in little-endian order.
*
* @param i the 32-bit integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putInt32Le = function(i) {
this.accommodate(4);
this.data.setInt32(this.write, i, true);
this.write += 4;
return this;
};
/**
* Puts an n-bit integer in this buffer in big-endian order.
*
* @param i the n-bit integer.
* @param n the number of bits in the integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putInt = function(i, n) {
this.accommodate(n / 8);
do {
n -= 8;
this.data.setInt8(this.write++, (i >> n) & 0xFF);
} while(n > 0);
return this;
};
/**
* Puts a signed n-bit integer in this buffer in big-endian order. Two's
* complement representation is used.
*
* @param i the n-bit integer.
* @param n the number of bits in the integer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.putSignedInt = function(i, n) {
this.accommodate(n / 8);
if(i < 0) {
i += 2 << (n - 1);
}
return this.putInt(i, n);
};
/**
* Gets a byte from this buffer and advances the read pointer by 1.
*
* @return the byte.
*/
util.DataBuffer.prototype.getByte = function() {
return this.data.getInt8(this.read++);
};
/**
* Gets a uint16 from this buffer in big-endian order and advances the read
* pointer by 2.
*
* @return the uint16.
*/
util.DataBuffer.prototype.getInt16 = function() {
var rval = this.data.getInt16(this.read);
this.read += 2;
return rval;
};
/**
* Gets a uint24 from this buffer in big-endian order and advances the read
* pointer by 3.
*
* @return the uint24.
*/
util.DataBuffer.prototype.getInt24 = function() {
var rval = (
this.data.getInt16(this.read) << 8 ^
this.data.getInt8(this.read + 2));
this.read += 3;
return rval;
};
/**
* Gets a uint32 from this buffer in big-endian order and advances the read
* pointer by 4.
*
* @return the word.
*/
util.DataBuffer.prototype.getInt32 = function() {
var rval = this.data.getInt32(this.read);
this.read += 4;
return rval;
};
/**
* Gets a uint16 from this buffer in little-endian order and advances the read
* pointer by 2.
*
* @return the uint16.
*/
util.DataBuffer.prototype.getInt16Le = function() {
var rval = this.data.getInt16(this.read, true);
this.read += 2;
return rval;
};
/**
* Gets a uint24 from this buffer in little-endian order and advances the read
* pointer by 3.
*
* @return the uint24.
*/
util.DataBuffer.prototype.getInt24Le = function() {
var rval = (
this.data.getInt8(this.read) ^
this.data.getInt16(this.read + 1, true) << 8);
this.read += 3;
return rval;
};
/**
* Gets a uint32 from this buffer in little-endian order and advances the read
* pointer by 4.
*
* @return the word.
*/
util.DataBuffer.prototype.getInt32Le = function() {
var rval = this.data.getInt32(this.read, true);
this.read += 4;
return rval;
};
/**
* Gets an n-bit integer from this buffer in big-endian order and advances the
* read pointer by n/8.
*
* @param n the number of bits in the integer.
*
* @return the integer.
*/
util.DataBuffer.prototype.getInt = function(n) {
var rval = 0;
do {
rval = (rval << 8) + this.data.getInt8(this.read++);
n -= 8;
} while(n > 0);
return rval;
};
/**
* Gets a signed n-bit integer from this buffer in big-endian order, using
* two's complement, and advances the read pointer by n/8.
*
* @param n the number of bits in the integer.
*
* @return the integer.
*/
util.DataBuffer.prototype.getSignedInt = function(n) {
var x = this.getInt(n);
var max = 2 << (n - 2);
if(x >= max) {
x -= max << 1;
}
return x;
};
/**
* Reads bytes out into a UTF-8 string and clears them from the buffer.
*
* @param count the number of bytes to read, undefined or null for all.
*
* @return a UTF-8 string of bytes.
*/
util.DataBuffer.prototype.getBytes = function(count) {
// TODO: deprecate this method, it is poorly named and
// this.toString('binary') replaces it
// add a toTypedArray()/toArrayBuffer() function
var rval;
if(count) {
// read count bytes
count = Math.min(this.length(), count);
rval = this.data.slice(this.read, this.read + count);
this.read += count;
} else if(count === 0) {
rval = '';
} else {
// read all bytes, optimize to only copy when needed
rval = (this.read === 0) ? this.data : this.data.slice(this.read);
this.clear();
}
return rval;
};
/**
* Gets a UTF-8 encoded string of the bytes from this buffer without modifying
* the read pointer.
*
* @param count the number of bytes to get, omit to get all.
*
* @return a string full of UTF-8 encoded characters.
*/
util.DataBuffer.prototype.bytes = function(count) {
// TODO: deprecate this method, it is poorly named, add "getString()"
return (typeof(count) === 'undefined' ?
this.data.slice(this.read) :
this.data.slice(this.read, this.read + count));
};
/**
* Gets a byte at the given index without modifying the read pointer.
*
* @param i the byte index.
*
* @return the byte.
*/
util.DataBuffer.prototype.at = function(i) {
return this.data.getUint8(this.read + i);
};
/**
* Puts a byte at the given index without modifying the read pointer.
*
* @param i the byte index.
* @param b the byte to put.
*
* @return this buffer.
*/
util.DataBuffer.prototype.setAt = function(i, b) {
this.data.setUint8(i, b);
return this;
};
/**
* Gets the last byte without modifying the read pointer.
*
* @return the last byte.
*/
util.DataBuffer.prototype.last = function() {
return this.data.getUint8(this.write - 1);
};
/**
* Creates a copy of this buffer.
*
* @return the copy.
*/
util.DataBuffer.prototype.copy = function() {
return new util.DataBuffer(this);
};
/**
* Compacts this buffer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.compact = function() {
if(this.read > 0) {
var src = new Uint8Array(this.data.buffer, this.read);
var dst = new Uint8Array(src.byteLength);
dst.set(src);
this.data = new DataView(dst);
this.write -= this.read;
this.read = 0;
}
return this;
};
/**
* Clears this buffer.
*
* @return this buffer.
*/
util.DataBuffer.prototype.clear = function() {
this.data = new DataView(new ArrayBuffer(0));
this.read = this.write = 0;
return this;
};
/**
* Shortens this buffer by triming bytes off of the end of this buffer.
*
* @param count the number of bytes to trim off.
*
* @return this buffer.
*/
util.DataBuffer.prototype.truncate = function(count) {
this.write = Math.max(0, this.length() - count);
this.read = Math.min(this.read, this.write);
return this;
};
/**
* Converts this buffer to a hexadecimal string.
*
* @return a hexadecimal string.
*/
util.DataBuffer.prototype.toHex = function() {
var rval = '';
for(var i = this.read; i < this.data.byteLength; ++i) {
var b = this.data.getUint8(i);
if(b < 16) {
rval += '0';
}
rval += b.toString(16);
}
return rval;
};
/**
* Converts this buffer to a string, using the given encoding. If no
* encoding is given, 'utf8' (UTF-8) is used.
*
* @param [encoding] the encoding to use: 'binary', 'utf8', 'utf16', 'hex',
* 'base64' (default: 'utf8').
*
* @return a string representation of the bytes in this buffer.
*/
util.DataBuffer.prototype.toString = function(encoding) {
var view = new Uint8Array(this.data, this.read, this.length());
encoding = encoding || 'utf8';
// encode to string
if(encoding === 'binary' || encoding === 'raw') {
return util.binary.raw.encode(view);
}
if(encoding === 'hex') {
return util.binary.hex.encode(view);
}
if(encoding === 'base64') {
return util.binary.base64.encode(view);
}
// decode to text
if(encoding === 'utf8') {
return util.text.utf8.decode(view);
}
if(encoding === 'utf16') {
return util.text.utf16.decode(view);
}
throw new Error('Invalid encoding: ' + encoding);
};
/** End Buffer w/UInt8Array backing */
/**
* Creates a buffer that stores bytes. A value may be given to put into the
* buffer that is either a string of bytes or a UTF-16 string that will
* be encoded using UTF-8 (to do the latter, specify 'utf8' as the encoding).
*
* @param [input] the bytes to wrap (as a string) or a UTF-16 string to encode
* as UTF-8.
* @param [encoding] (default: 'raw', other: 'utf8').
*/
util.createBuffer = function(input, encoding) {
// TODO: deprecate, use new ByteBuffer() instead
encoding = encoding || 'raw';
if(input !== undefined && encoding === 'utf8') {
input = util.encodeUtf8(input);
}
return new util.ByteBuffer(input);
};
/**
* Fills a string with a particular value. If you want the string to be a byte
* string, pass in String.fromCharCode(theByte).
*
* @param c the character to fill the string with, use String.fromCharCode
* to fill the string with a byte value.
* @param n the number of characters of value c to fill with.
*
* @return the filled string.
*/
util.fillString = function(c, n) {
var s = '';
while(n > 0) {
if(n & 1) {
s += c;
}
n >>>= 1;
if(n > 0) {
c += c;
}
}
return s;
};
/**
* Performs a per byte XOR between two byte strings and returns the result as a
* string of bytes.
*
* @param s1 first string of bytes.
* @param s2 second string of bytes.
* @param n the number of bytes to XOR.
*
* @return the XOR'd result.
*/
util.xorBytes = function(s1, s2, n) {
var s3 = '';
var b = '';
var t = '';
var i = 0;
var c = 0;
for(; n > 0; --n, ++i) {
b = s1.charCodeAt(i) ^ s2.charCodeAt(i);
if(c >= 10) {
s3 += t;
t = '';
c = 0;
}
t += String.fromCharCode(b);
++c;
}
s3 += t;
return s3;
};
/**
* Converts a hex string into a 'binary' encoded string of bytes.
*
* @param hex the hexadecimal string to convert.
*
* @return the binary-encoded string of bytes.
*/
util.hexToBytes = function(hex) {
// TODO: deprecate: "Deprecated. Use util.binary.hex.decode instead."
var rval = '';
var i = 0;
if(hex.length & 1 == 1) {
// odd number of characters, convert first character alone
i = 1;
rval += String.fromCharCode(parseInt(hex[0], 16));
}
// convert 2 characters (1 byte) at a time
for(; i < hex.length; i += 2) {
rval += String.fromCharCode(parseInt(hex.substr(i, 2), 16));
}
return rval;
};
/**
* Converts a 'binary' encoded string of bytes to hex.
*
* @param bytes the byte string to convert.
*
* @return the string of hexadecimal characters.
*/
util.bytesToHex = function(bytes) {
// TODO: deprecate: "Deprecated. Use util.binary.hex.encode instead."
return util.createBuffer(bytes).toHex();
};
/**
* Converts an 32-bit integer to 4-big-endian byte string.
*
* @param i the integer.
*
* @return the byte string.
*/
util.int32ToBytes = function(i) {
return (
String.fromCharCode(i >> 24 & 0xFF) +
String.fromCharCode(i >> 16 & 0xFF) +
String.fromCharCode(i >> 8 & 0xFF) +
String.fromCharCode(i & 0xFF));
};
// base64 characters, reverse mapping
var _base64 =
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
var _base64Idx = [
/*43 -43 = 0*/
/*'+', 1, 2, 3,'/' */
62, -1, -1, -1, 63,
/*'0','1','2','3','4','5','6','7','8','9' */
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
/*15, 16, 17,'=', 19, 20, 21 */
-1, -1, -1, 64, -1, -1, -1,
/*65 - 43 = 22*/
/*'A','B','C','D','E','F','G','H','I','J','K','L','M', */
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
/*'N','O','P','Q','R','S','T','U','V','W','X','Y','Z' */
13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
/*91 - 43 = 48 */
/*48, 49, 50, 51, 52, 53 */
-1, -1, -1, -1, -1, -1,
/*97 - 43 = 54*/
/*'a','b','c','d','e','f','g','h','i','j','k','l','m' */
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
/*'n','o','p','q','r','s','t','u','v','w','x','y','z' */
39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51
];
/**
* Base64 encodes a 'binary' encoded string of bytes.
*
* @param input the binary encoded string of bytes to base64-encode.
* @param maxline the maximum number of encoded characters per line to use,
* defaults to none.
*
* @return the base64-encoded output.
*/
util.encode64 = function(input, maxline) {
// TODO: deprecate: "Deprecated. Use util.binary.base64.encode instead."
var line = '';
var output = '';
var chr1, chr2, chr3;
var i = 0;
while(i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
// encode 4 character group
line += _base64.charAt(chr1 >> 2);
line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4));
if(isNaN(chr2)) {
line += '==';
} else {
line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6));
line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63);
}
if(maxline && line.length > maxline) {
output += line.substr(0, maxline) + '\r\n';
line = line.substr(maxline);
}
}
output += line;
return output;
};
/**
* Base64 decodes a string into a 'binary' encoded string of bytes.
*
* @param input the base64-encoded input.
*
* @return the binary encoded string.
*/
util.decode64 = function(input) {
// TODO: deprecate: "Deprecated. Use util.binary.base64.decode instead."
// remove all non-base64 characters
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
var output = '';
var enc1, enc2, enc3, enc4;
var i = 0;
while(i < input.length) {
enc1 = _base64Idx[input.charCodeAt(i++) - 43];
enc2 = _base64Idx[input.charCodeAt(i++) - 43];
enc3 = _base64Idx[input.charCodeAt(i++) - 43];
enc4 = _base64Idx[input.charCodeAt(i++) - 43];
output += String.fromCharCode((enc1 << 2) | (enc2 >> 4));
if(enc3 !== 64) {
// decoded at least 2 bytes
output += String.fromCharCode(((enc2 & 15) << 4) | (enc3 >> 2));
if(enc4 !== 64) {
// decoded 3 bytes
output += String.fromCharCode(((enc3 & 3) << 6) | enc4);
}
}
}
return output;
};
/**
* UTF-8 encodes the given UTF-16 encoded string (a standard JavaScript
* string). Non-ASCII characters will be encoded as multiple bytes according
* to UTF-8.
*
* @param str the string to encode.
*
* @return the UTF-8 encoded string.
*/
util.encodeUtf8 = function(str) {
return unescape(encodeURIComponent(str));
};
/**
* Decodes a UTF-8 encoded string into a UTF-16 string.
*
* @param str the string to decode.
*
* @return the UTF-16 encoded string (standard JavaScript string).
*/
util.decodeUtf8 = function(str) {
return decodeURIComponent(escape(str));
};
// binary encoding/decoding tools
// FIXME: Experimental. Do not use yet.
util.binary = {
raw: {},
hex: {},
base64: {}
};
/**
* Encodes a Uint8Array as a binary-encoded string. This encoding uses
* a value between 0 and 255 for each character.
*
* @param bytes the Uint8Array to encode.
*
* @return the binary-encoded string.
*/
util.binary.raw.encode = function(bytes) {
return String.fromCharCode.apply(null, bytes);
};
/**
* Decodes a binary-encoded string to a Uint8Array. This encoding uses
* a value between 0 and 255 for each character.
*
* @param str the binary-encoded string to decode.
* @param [output] an optional Uint8Array to write the output to; if it
* is too small, an exception will be thrown.
* @param [offset] the start offset for writing to the output (default: 0).
*
* @return the Uint8Array or the number of bytes written if output was given.
*/
util.binary.raw.decode = function(str, output, offset) {
var out = output;
if(!out) {
out = new Uint8Array(str.length);
}
offset = offset || 0;
var j = offset;
for(var i = 0; i < str.length; ++i) {
out[j++] = str.charCodeAt(i);
}
return output ? (j - offset) : out;
};
/**
* Encodes a 'binary' string, ArrayBuffer, DataView, TypedArray, or
* ByteBuffer as a string of hexadecimal characters.
*
* @param bytes the bytes to convert.
*
* @return the string of hexadecimal characters.
*/
util.binary.hex.encode = util.bytesToHex;
/**
* Decodes a hex-encoded string to a Uint8Array.
*
* @param hex the hexadecimal string to convert.
* @param [output] an optional Uint8Array to write the output to; if it
* is too small, an exception will be thrown.
* @param [offset] the start offset for writing to the output (default: 0).
*
* @return the Uint8Array or the number of bytes written if output was given.
*/
util.binary.hex.decode = function(hex, output, offset) {
var out = output;
if(!out) {
out = new Uint8Array(Math.ceil(hex.length / 2));
}
offset = offset || 0;
var i = 0, j = offset;
if(hex.length & 1) {
// odd number of characters, convert first character alone
i = 1;
out[j++] = parseInt(hex[0], 16);
}
// convert 2 characters (1 byte) at a time
for(; i < hex.length; i += 2) {
out[j++] = parseInt(hex.substr(i, 2), 16);
}
return output ? (j - offset) : out;
};
/**
* Base64-encodes a Uint8Array.
*
* @param input the Uint8Array to encode.
* @param maxline the maximum number of encoded characters per line to use,
* defaults to none.
*
* @return the base64-encoded output string.
*/
util.binary.base64.encode = function(input, maxline) {
var line = '';
var output = '';
var chr1, chr2, chr3;
var i = 0;
while(i < input.byteLength) {
chr1 = input[i++];
chr2 = input[i++];
chr3 = input[i++];
// encode 4 character group
line += _base64.charAt(chr1 >> 2);
line += _base64.charAt(((chr1 & 3) << 4) | (chr2 >> 4));
if(isNaN(chr2)) {
line += '==';
} else {
line += _base64.charAt(((chr2 & 15) << 2) | (chr3 >> 6));
line += isNaN(chr3) ? '=' : _base64.charAt(chr3 & 63);
}
if(maxline && line.length > maxline) {
output += line.substr(0, maxline) + '\r\n';
line = line.substr(maxline);
}
}
output += line;
return output;
};
/**
* Decodes a base64-encoded string to a Uint8Array.
*
* @param input the base64-encoded input string.
* @param [output] an optional Uint8Array to write the output to; if it
* is too small, an exception will be thrown.
* @param [offset] the start offset for writing to the output (default: 0).
*
* @return the Uint8Array or the number of bytes written if output was given.
*/
util.binary.base64.decode = function(input, output, offset) {
var out = output;
if(!out) {
out = new Uint8Array(Math.ceil(input.length / 4) * 3);
}
// remove all non-base64 characters
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, '');
offset = offset || 0;
var enc1, enc2, enc3, enc4;
var i = 0, j = offset;
while(i < input.length) {
enc1 = _base64Idx[input.charCodeAt(i++) - 43];
enc2 = _base64Idx[input.charCodeAt(i++) - 43];
enc3 = _base64Idx[input.charCodeAt(i++) - 43];
enc4 = _base64Idx[input.charCodeAt(i++) - 43];
out[j++] = (enc1 << 2) | (enc2 >> 4);
if(enc3 !== 64) {
// decoded at least 2 bytes
out[j++] = ((enc2 & 15) << 4) | (enc3 >> 2);
if(enc4 !== 64) {
// decoded 3 bytes
out[j++] = ((enc3 & 3) << 6) | enc4;
}
}
}
// make sure result is the exact decoded length
return output ?
(j - offset) :
out.subarray(0, j);
};
// text encoding/decoding tools
// FIXME: Experimental. Do not use yet.
util.text = {
utf8: {},
utf16: {}
};
/**
* Encodes the given string as UTF-8 in a Uint8Array.
*
* @param str the string to encode.
* @param [output] an optional Uint8Array to write the output to; if it
* is too small, an exception will be thrown.
* @param [offset] the start offset for writing to the output (default: 0).
*
* @return the Uint8Array or the number of bytes written if output was given.
*/
util.text.utf8.encode = function(str, output, offset) {
str = util.encodeUtf8(str);
var out = output;
if(!out) {
out = new Uint8Array(str.length);
}
offset = offset || 0;
var j = offset;
for(var i = 0; i < str.length; ++i) {
out[j++] = str.charCodeAt(i);
}
return output ? (j - offset) : out;
};
/**
* Decodes the UTF-8 contents from a Uint8Array.
*
* @param bytes the Uint8Array to decode.
*
* @return the resulting string.
*/
util.text.utf8.decode = function(bytes) {
return util.decodeUtf8(String.fromCharCode.apply(null, bytes));
};
/**
* Encodes the given string as UTF-16 in a Uint8Array.
*
* @param str the string to encode.
* @param [output] an optional Uint8Array to write the output to; if it
* is too small, an exception will be thrown.
* @param [offset] the start offset for writing to the output (default: 0).
*
* @return the Uint8Array or the number of bytes written if output was given.
*/
util.text.utf16.encode = function(str, output, offset) {
var out = output;
if(!out) {
out = new Uint8Array(str.length);
}
var view = new Uint16Array(out);
offset = offset || 0;
var j = offset;
var k = offset;
for(var i = 0; i < str.length; ++i) {
view[k++] = str.charCodeAt(i);
j += 2;
}
return output ? (j - offset) : out;
};
/**
* Decodes the UTF-16 contents from a Uint8Array.
*
* @param bytes the Uint8Array to decode.
*
* @return the resulting string.
*/
util.text.utf16.decode = function(bytes) {
return String.fromCharCode.apply(null, new Uint16Array(bytes));
};
/**
* Deflates the given data using a flash interface.
*
* @param api the flash interface.
* @param bytes the data.
* @param raw true to return only raw deflate data, false to include zlib
* header and trailer.
*
* @return the deflated data as a string.
*/
util.deflate = function(api, bytes, raw) {
bytes = util.decode64(api.deflate(util.encode64(bytes)).rval);
// strip zlib header and trailer if necessary
if(raw) {
// zlib header is 2 bytes (CMF,FLG) where FLG indicates that
// there is a 4-byte DICT (alder-32) block before the data if
// its 5th bit is set
var start = 2;
var flg = bytes.charCodeAt(1);
if(flg & 0x20) {
start = 6;
}
// zlib trailer is 4 bytes of adler-32
bytes = bytes.substring(start, bytes.length - 4);
}
return bytes;
};
/**
* Inflates the given data using a flash interface.
*
* @param api the flash interface.
* @param bytes the data.
* @param raw true if the incoming data has no zlib header or trailer and is
* raw DEFLATE data.
*
* @return the inflated data as a string, null on error.
*/
util.inflate = function(api, bytes, raw) {
// TODO: add zlib header and trailer if necessary/possible
var rval = api.inflate(util.encode64(bytes)).rval;
return (rval === null) ? null : util.decode64(rval);
};
/**
* Sets a storage object.
*
* @param api the storage interface.
* @param id the storage ID to use.
* @param obj the storage object, null to remove.
*/
var _setStorageObject = function(api, id, obj) {
if(!api) {
throw new Error('WebStorage not available.');
}
var rval;
if(obj === null) {
rval = api.removeItem(id);
} else {
// json-encode and base64-encode object
obj = util.encode64(JSON.stringify(obj));
rval = api.setItem(id, obj);
}
// handle potential flash error
if(typeof(rval) !== 'undefined' && rval.rval !== true) {
var error = new Error(rval.error.message);
error.id = rval.error.id;
error.name = rval.error.name;
throw error;
}
};
/**
* Gets a storage object.
*
* @param api the storage interface.
* @param id the storage ID to use.
*
* @return the storage object entry or null if none exists.
*/
var _getStorageObject = function(api, id) {
if(!api) {
throw new Error('WebStorage not available.');
}
// get the existing entry
var rval = api.getItem(id);
/* Note: We check api.init because we can't do (api == localStorage)
on IE because of "Class doesn't support Automation" exception. Only
the flash api has an init method so this works too, but we need a
better solution in the future. */
// flash returns item wrapped in an object, handle special case
if(api.init) {
if(rval.rval === null) {
if(rval.error) {
var error = new Error(rval.error.message);
error.id = rval.error.id;
error.name = rval.error.name;
throw error;
}
// no error, but also no item
rval = null;
} else {
rval = rval.rval;
}
}
// handle decoding
if(rval !== null) {
// base64-decode and json-decode data
rval = JSON.parse(util.decode64(rval));
}
return rval;
};
/**
* Stores an item in local storage.
*
* @param api the storage interface.
* @param id the storage ID to use.
* @param key the key for the item.
* @param data the data for the item (any javascript object/primitive).
*/
var _setItem = function(api, id, key, data) {
// get storage object
var obj = _getStorageObject(api, id);
if(obj === null) {
// create a new storage object
obj = {};
}
// update key
obj[key] = data;
// set storage object
_setStorageObject(api, id, obj);
};
/**
* Gets an item from local storage.
*
* @param api the storage interface.
* @param id the storage ID to use.
* @param key the key for the item.
*
* @return the item.
*/
var _getItem = function(api, id, key) {
// get storage object
var rval = _getStorageObject(api, id);
if(rval !== null) {
// return data at key
rval = (key in rval) ? rval[key] : null;
}
return rval;
};
/**
* Removes an item from local storage.
*
* @param api the storage interface.
* @param id the storage ID to use.
* @param key the key for the item.
*/
var _removeItem = function(api, id, key) {
// get storage object
var obj = _getStorageObject(api, id);
if(obj !== null && key in obj) {
// remove key
delete obj[key];
// see if entry has no keys remaining
var empty = true;
for(var prop in obj) {
empty = false;
break;
}
if(empty) {
// remove entry entirely if no keys are left
obj = null;
}
// set storage object
_setStorageObject(api, id, obj);
}
};
/**
* Clears the local disk storage identified by the given ID.
*
* @param api the storage interface.
* @param id the storage ID to use.
*/
var _clearItems = function(api, id) {
_setStorageObject(api, id, null);
};
/**
* Calls a storage function.
*
* @param func the function to call.
* @param args the arguments for the function.
* @param location the location argument.
*
* @return the return value from the function.
*/
var _callStorageFunction = function(func, args, location) {
var rval = null;
// default storage types
if(typeof(location) === 'undefined') {
location = ['web', 'flash'];
}
// apply storage types in order of preference
var type;
var done = false;
var exception = null;
for(var idx in location) {
type = location[idx];
try {
if(type === 'flash' || type === 'both') {
if(args[0] === null) {
throw new Error('Flash local storage not available.');
}
rval = func.apply(this, args);
done = (type === 'flash');
}
if(type === 'web' || type === 'both') {
args[0] = localStorage;
rval = func.apply(this, args);
done = true;
}
} catch(ex) {
exception = ex;
}
if(done) {
break;
}
}
if(!done) {
throw exception;
}
return rval;
};
/**
* Stores an item on local disk.
*
* The available types of local storage include 'flash', 'web', and 'both'.
*
* The type 'flash' refers to flash local storage (SharedObject). In order
* to use flash local storage, the 'api' parameter must be valid. The type
* 'web' refers to WebStorage, if supported by the browser. The type 'both'
* refers to storing using both 'flash' and 'web', not just one or the
* other.
*
* The location array should list the storage types to use in order of
* preference:
*
* ['flash']: flash only storage
* ['web']: web only storage
* ['both']: try to store in both
* ['flash','web']: store in flash first, but if not available, 'web'
* ['web','flash']: store in web first, but if not available, 'flash'
*
* The location array defaults to: ['web', 'flash']
*
* @param api the flash interface, null to use only WebStorage.
* @param id the storage ID to use.
* @param key the key for the item.
* @param data the data for the item (any javascript object/primitive).
* @param location an array with the preferred types of storage to use.
*/
util.setItem = function(api, id, key, data, location) {
_callStorageFunction(_setItem, arguments, location);
};
/**
* Gets an item on local disk.
*
* Set setItem() for details on storage types.
*
* @param api the flash interface, null to use only WebStorage.
* @param id the storage ID to use.
* @param key the key for the item.
* @param location an array with the preferred types of storage to use.
*
* @return the item.
*/
util.getItem = function(api, id, key, location) {
return _callStorageFunction(_getItem, arguments, location);
};
/**
* Removes an item on local disk.
*
* Set setItem() for details on storage types.
*
* @param api the flash interface.
* @param id the storage ID to use.
* @param key the key for the item.
* @param location an array with the preferred types of storage to use.
*/
util.removeItem = function(api, id, key, location) {
_callStorageFunction(_removeItem, arguments, location);
};
/**
* Clears the local disk storage identified by the given ID.
*
* Set setItem() for details on storage types.
*
* @param api the flash interface if flash is available.
* @param id the storage ID to use.
* @param location an array with the preferred types of storage to use.
*/
util.clearItems = function(api, id, location) {
_callStorageFunction(_clearItems, arguments, location);
};
/**
* Parses the scheme, host, and port from an http(s) url.
*
* @param str the url string.
*
* @return the parsed url object or null if the url is invalid.
*/
util.parseUrl = function(str) {
// FIXME: this regex looks a bit broken
var regex = /^(https?):\/\/([^:&^\/]*):?(\d*)(.*)$/g;
regex.lastIndex = 0;
var m = regex.exec(str);
var url = (m === null) ? null : {
full: str,
scheme: m[1],
host: m[2],
port: m[3],
path: m[4]
};
if(url) {
url.fullHost = url.host;
if(url.port) {
if(url.port !== 80 && url.scheme === 'http') {
url.fullHost += ':' + url.port;
} else if(url.port !== 443 && url.scheme === 'https') {
url.fullHost += ':' + url.port;
}
} else if(url.scheme === 'http') {
url.port = 80;
} else if(url.scheme === 'https') {
url.port = 443;
}
url.full = url.scheme + '://' + url.fullHost;
}
return url;
};
/* Storage for query variables */
var _queryVariables = null;
/**
* Returns the window location query variables. Query is parsed on the first
* call and the same object is returned on subsequent calls. The mapping
* is from keys to an array of values. Parameters without values will have
* an object key set but no value added to the value array. Values are
* unescaped.
*
* ...?k1=v1&k2=v2:
* {
* "k1": ["v1"],
* "k2": ["v2"]
* }
*
* ...?k1=v1&k1=v2:
* {
* "k1": ["v1", "v2"]
* }
*
* ...?k1=v1&k2:
* {
* "k1": ["v1"],
* "k2": []
* }
*
* ...?k1=v1&k1:
* {
* "k1": ["v1"]
* }
*
* ...?k1&k1:
* {
* "k1": []
* }
*
* @param query the query string to parse (optional, default to cached
* results from parsing window location search query).
*
* @return object mapping keys to variables.
*/
util.getQueryVariables = function(query) {
var parse = function(q) {
var rval = {};
var kvpairs = q.split('&');
for(var i = 0; i < kvpairs.length; i++) {
var pos = kvpairs[i].indexOf('=');
var key;
var val;
if(pos > 0) {
key = kvpairs[i].substring(0, pos);
val = kvpairs[i].substring(pos + 1);
} else {
key = kvpairs[i];
val = null;
}
if(!(key in rval)) {
rval[key] = [];
}
// disallow overriding object prototype keys
if(!(key in Object.prototype) && val !== null) {
rval[key].push(unescape(val));
}
}
return rval;
};
var rval;
if(typeof(query) === 'undefined') {
// set cached variables if needed
if(_queryVariables === null) {
if(typeof(window) !== 'undefined' && window.location && window.location.search) {
// parse window search query
_queryVariables = parse(window.location.search.substring(1));
} else {
// no query variables available
_queryVariables = {};
}
}
rval = _queryVariables;
} else {
// parse given query
rval = parse(query);
}
return rval;
};
/**
* Parses a fragment into a path and query. This method will take a URI
* fragment and break it up as if it were the main URI. For example:
* /bar/baz?a=1&b=2
* results in:
* {
* path: ["bar", "baz"],
* query: {"k1": ["v1"], "k2": ["v2"]}
* }
*
* @return object with a path array and query object.
*/
util.parseFragment = function(fragment) {
// default to whole fragment
var fp = fragment;
var fq = '';
// split into path and query if possible at the first '?'
var pos = fragment.indexOf('?');
if(pos > 0) {
fp = fragment.substring(0, pos);
fq = fragment.substring(pos + 1);
}
// split path based on '/' and ignore first element if empty
var path = fp.split('/');
if(path.length > 0 && path[0] === '') {
path.shift();
}
// convert query into object
var query = (fq === '') ? {} : util.getQueryVariables(fq);
return {
pathString: fp,
queryString: fq,
path: path,
query: query
};
};
/**
* Makes a request out of a URI-like request string. This is intended to
* be used where a fragment id (after a URI '#') is parsed as a URI with
* path and query parts. The string should have a path beginning and
* delimited by '/' and optional query parameters following a '?'. The
* query should be a standard URL set of key value pairs delimited by
* '&'. For backwards compatibility the initial '/' on the path is not
* required. The request object has the following API, (fully described
* in the method code):
* {
* path: <the path string part>.
* query: <the query string part>,
* getPath(i): get part or all of the split path array,
* getQuery(k, i): get part or all of a query key array,
* getQueryLast(k, _default): get last element of a query key array.
* }
*
* @return object with request parameters.
*/
util.makeRequest = function(reqString) {
var frag = util.parseFragment(reqString);
var req = {
// full path string
path: frag.pathString,
// full query string
query: frag.queryString,
/**
* Get path or element in path.
*
* @param i optional path index.
*
* @return path or part of path if i provided.
*/
getPath: function(i) {
return (typeof(i) === 'undefined') ? frag.path : frag.path[i];
},
/**
* Get query, values for a key, or value for a key index.
*
* @param k optional query key.
* @param i optional query key index.
*
* @return query, values for a key, or value for a key index.
*/
getQuery: function(k, i) {
var rval;
if(typeof(k) === 'undefined') {
rval = frag.query;
} else {
rval = frag.query[k];
if(rval && typeof(i) !== 'undefined') {
rval = rval[i];
}
}
return rval;
},
getQueryLast: function(k, _default) {
var rval;
var vals = req.getQuery(k);
if(vals) {
rval = vals[vals.length - 1];
} else {
rval = _default;
}
return rval;
}
};
return req;
};
/**
* Makes a URI out of a path, an object with query parameters, and a
* fragment. Uses jQuery.param() internally for query string creation.
* If the path is an array, it will be joined with '/'.
*
* @param path string path or array of strings.
* @param query object with query parameters. (optional)
* @param fragment fragment string. (optional)
*
* @return string object with request parameters.
*/
util.makeLink = function(path, query, fragment) {
// join path parts if needed
path = jQuery.isArray(path) ? path.join('/') : path;
var qstr = jQuery.param(query || {});
fragment = fragment || '';
return path +
((qstr.length > 0) ? ('?' + qstr) : '') +
((fragment.length > 0) ? ('#' + fragment) : '');
};
/**
* Follows a path of keys deep into an object hierarchy and set a value.
* If a key does not exist or it's value is not an object, create an
* object in it's place. This can be destructive to a object tree if
* leaf nodes are given as non-final path keys.
* Used to avoid exceptions from missing parts of the path.
*
* @param object the starting object.
* @param keys an array of string keys.
* @param value the value to set.
*/
util.setPath = function(object, keys, value) {
// need to start at an object
if(typeof(object) === 'object' && object !== null) {
var i = 0;
var len = keys.length;
while(i < len) {
var next = keys[i++];
if(i == len) {
// last
object[next] = value;
} else {
// more
var hasNext = (next in object);
if(!hasNext ||
(hasNext && typeof(object[next]) !== 'object') ||
(hasNext && object[next] === null)) {
object[next] = {};
}
object = object[next];
}
}
}
};
/**
* Follows a path of keys deep into an object hierarchy and return a value.
* If a key does not exist, create an object in it's place.
* Used to avoid exceptions from missing parts of the path.
*
* @param object the starting object.
* @param keys an array of string keys.
* @param _default value to return if path not found.
*
* @return the value at the path if found, else default if given, else
* undefined.
*/
util.getPath = function(object, keys, _default) {
var i = 0;
var len = keys.length;
var hasNext = true;
while(hasNext && i < len &&
typeof(object) === 'object' && object !== null) {
var next = keys[i++];
hasNext = next in object;
if(hasNext) {
object = object[next];
}
}
return (hasNext ? object : _default);
};
/**
* Follow a path of keys deep into an object hierarchy and delete the
* last one. If a key does not exist, do nothing.
* Used to avoid exceptions from missing parts of the path.
*
* @param object the starting object.
* @param keys an array of string keys.
*/
util.deletePath = function(object, keys) {
// need to start at an object
if(typeof(object) === 'object' && object !== null) {
var i = 0;
var len = keys.length;
while(i < len) {
var next = keys[i++];
if(i == len) {
// last
delete object[next];
} else {
// more
if(!(next in object) ||
(typeof(object[next]) !== 'object') ||
(object[next] === null)) {
break;
}
object = object[next];
}
}
}
};
/**
* Check if an object is empty.
*
* Taken from:
* http://stackoverflow.com/questions/679915/how-do-i-test-for-an-empty-javascript-object-from-json/679937#679937
*
* @param object the object to check.
*/
util.isEmpty = function(obj) {
for(var prop in obj) {
if(obj.hasOwnProperty(prop)) {
return false;
}
}
return true;
};
/**
* Format with simple printf-style interpolation.
*
* %%: literal '%'
* %s,%o: convert next argument into a string.
*
* @param format the string to format.
* @param ... arguments to interpolate into the format string.
*/
util.format = function(format) {
var re = /%./g;
// current match
var match;
// current part
var part;
// current arg index
var argi = 0;
// collected parts to recombine later
var parts = [];
// last index found
var last = 0;
// loop while matches remain
while((match = re.exec(format))) {
part = format.substring(last, re.lastIndex - 2);
// don't add empty strings (ie, parts between %s%s)
if(part.length > 0) {
parts.push(part);
}
last = re.lastIndex;
// switch on % code
var code = match[0][1];
switch(code) {
case 's':
case 'o':
// check if enough arguments were given
if(argi < arguments.length) {
parts.push(arguments[argi++ + 1]);
} else {
parts.push('<?>');
}
break;
// FIXME: do proper formating for numbers, etc
//case 'f':
//case 'd':
case '%':
parts.push('%');
break;
default:
parts.push('<%' + code + '?>');
}
}
// add trailing part of format string
parts.push(format.substring(last));
return parts.join('');
};
/**
* Formats a number.
*
* http://snipplr.com/view/5945/javascript-numberformat--ported-from-php/
*/
util.formatNumber = function(number, decimals, dec_point, thousands_sep) {
// http://kevin.vanzonneveld.net
// + original by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
// + bugfix by: Michael White (http://crestidg.com)
// + bugfix by: Benjamin Lupton
// + bugfix by: Allan Jensen (http://www.winternet.no)
// + revised by: Jonas Raoni Soares Silva (http://www.jsfromhell.com)
// * example 1: number_format(1234.5678, 2, '.', '');
// * returns 1: 1234.57
var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals;
var d = dec_point === undefined ? ',' : dec_point;
var t = thousands_sep === undefined ?
'.' : thousands_sep, s = n < 0 ? '-' : '';
var i = parseInt((n = Math.abs(+n || 0).toFixed(c)), 10) + '';
var j = (i.length > 3) ? i.length % 3 : 0;
return s + (j ? i.substr(0, j) + t : '') +
i.substr(j).replace(/(\d{3})(?=\d)/g, '$1' + t) +
(c ? d + Math.abs(n - i).toFixed(c).slice(2) : '');
};
/**
* Formats a byte size.
*
* http://snipplr.com/view/5949/format-humanize-file-byte-size-presentation-in-javascript/
*/
util.formatSize = function(size) {
if(size >= 1073741824) {
size = util.formatNumber(size / 1073741824, 2, '.', '') + ' GiB';
} else if(size >= 1048576) {
size = util.formatNumber(size / 1048576, 2, '.', '') + ' MiB';
} else if(size >= 1024) {
size = util.formatNumber(size / 1024, 0) + ' KiB';
} else {
size = util.formatNumber(size, 0) + ' bytes';
}
return size;
};
/**
* Converts an IPv4 or IPv6 string representation into bytes (in network order).
*
* @param ip the IPv4 or IPv6 address to convert.
*
* @return the 4-byte IPv6 or 16-byte IPv6 address or null if the address can't
* be parsed.
*/
util.bytesFromIP = function(ip) {
if(ip.indexOf('.') !== -1) {
return util.bytesFromIPv4(ip);
}
if(ip.indexOf(':') !== -1) {
return util.bytesFromIPv6(ip);
}
return null;
};
/**
* Converts an IPv4 string representation into bytes (in network order).
*
* @param ip the IPv4 address to convert.
*
* @return the 4-byte address or null if the address can't be parsed.
*/
util.bytesFromIPv4 = function(ip) {
ip = ip.split('.');
if(ip.length !== 4) {
return null;
}
var b = util.createBuffer();
for(var i = 0; i < ip.length; ++i) {
var num = parseInt(ip[i], 10);
if(isNaN(num)) {
return null;
}
b.putByte(num);
}
return b.getBytes();
};
/**
* Converts an IPv6 string representation into bytes (in network order).
*
* @param ip the IPv6 address to convert.
*
* @return the 16-byte address or null if the address can't be parsed.
*/
util.bytesFromIPv6 = function(ip) {
var blanks = 0;
ip = ip.split(':').filter(function(e) {
if(e.length === 0) ++blanks;
return true;
});
var zeros = (8 - ip.length + blanks) * 2;
var b = util.createBuffer();
for(var i = 0; i < 8; ++i) {
if(!ip[i] || ip[i].length === 0) {
b.fillWithByte(0, zeros);
zeros = 0;
continue;
}
var bytes = util.hexToBytes(ip[i]);
if(bytes.length < 2) {
b.putByte(0);
}
b.putBytes(bytes);
}
return b.getBytes();
};
/**
* Converts 4-bytes into an IPv4 string representation or 16-bytes into
* an IPv6 string representation. The bytes must be in network order.
*
* @param bytes the bytes to convert.
*
* @return the IPv4 or IPv6 string representation if 4 or 16 bytes,
* respectively, are given, otherwise null.
*/
util.bytesToIP = function(bytes) {
if(bytes.length === 4) {
return util.bytesToIPv4(bytes);
}
if(bytes.length === 16) {
return util.bytesToIPv6(bytes);
}
return null;
};
/**
* Converts 4-bytes into an IPv4 string representation. The bytes must be
* in network order.
*
* @param bytes the bytes to convert.
*
* @return the IPv4 string representation or null for an invalid # of bytes.
*/
util.bytesToIPv4 = function(bytes) {
if(bytes.length !== 4) {
return null;
}
var ip = [];
for(var i = 0; i < bytes.length; ++i) {
ip.push(bytes.charCodeAt(i));
}
return ip.join('.');
};
/**
* Converts 16-bytes into an IPv16 string representation. The bytes must be
* in network order.
*
* @param bytes the bytes to convert.
*
* @return the IPv16 string representation or null for an invalid # of bytes.
*/
util.bytesToIPv6 = function(bytes) {
if(bytes.length !== 16) {
return null;
}
var ip = [];
var zeroGroups = [];
var zeroMaxGroup = 0;
for(var i = 0; i < bytes.length; i += 2) {
var hex = util.bytesToHex(bytes[i] + bytes[i + 1]);
// canonicalize zero representation
while(hex[0] === '0' && hex !== '0') {
hex = hex.substr(1);
}
if(hex === '0') {
var last = zeroGroups[zeroGroups.length - 1];
var idx = ip.length;
if(!last || idx !== last.end + 1) {
zeroGroups.push({start: idx, end: idx});
} else {
last.end = idx;
if((last.end - last.start) >
(zeroGroups[zeroMaxGroup].end - zeroGroups[zeroMaxGroup].start)) {
zeroMaxGroup = zeroGroups.length - 1;
}
}
}
ip.push(hex);
}
if(zeroGroups.length > 0) {
var group = zeroGroups[zeroMaxGroup];
// only shorten group of length > 0
if(group.end - group.start > 0) {
ip.splice(group.start, group.end - group.start + 1, '');
if(group.start === 0) {
ip.unshift('');
}
if(group.end === 7) {
ip.push('');
}
}
}
return ip.join(':');
};
/**
* Estimates the number of processes that can be run concurrently. If
* creating Web Workers, keep in mind that the main JavaScript process needs
* its own core.
*
* @param options the options to use:
* update true to force an update (not use the cached value).
* @param callback(err, max) called once the operation completes.
*/
util.estimateCores = function(options, callback) {
if(typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
if('cores' in util && !options.update) {
return callback(null, util.cores);
}
if(typeof navigator !== 'undefined' &&
'hardwareConcurrency' in navigator &&
navigator.hardwareConcurrency > 0) {
util.cores = navigator.hardwareConcurrency;
return callback(null, util.cores);
}
if(typeof Worker === 'undefined') {
// workers not available
util.cores = 1;
return callback(null, util.cores);
}
if(typeof Blob === 'undefined') {
// can't estimate, default to 2
util.cores = 2;
return callback(null, util.cores);
}
// create worker concurrency estimation code as blob
var blobUrl = URL.createObjectURL(new Blob(['(',
function() {
self.addEventListener('message', function(e) {
// run worker for 4 ms
var st = Date.now();
var et = st + 4;
while(Date.now() < et);
self.postMessage({st: st, et: et});
});
}.toString(),
')()'], {type: 'application/javascript'}));
// take 5 samples using 16 workers
sample([], 5, 16);
function sample(max, samples, numWorkers) {
if(samples === 0) {
// get overlap average
var avg = Math.floor(max.reduce(function(avg, x) {
return avg + x;
}, 0) / max.length);
util.cores = Math.max(1, avg);
URL.revokeObjectURL(blobUrl);
return callback(null, util.cores);
}
map(numWorkers, function(err, results) {
max.push(reduce(numWorkers, results));
sample(max, samples - 1, numWorkers);
});
}
function map(numWorkers, callback) {
var workers = [];
var results = [];
for(var i = 0; i < numWorkers; ++i) {
var worker = new Worker(blobUrl);
worker.addEventListener('message', function(e) {
results.push(e.data);
if(results.length === numWorkers) {
for(var i = 0; i < numWorkers; ++i) {
workers[i].terminate();
}
callback(null, results);
}
});
workers.push(worker);
}
for(var i = 0; i < numWorkers; ++i) {
workers[i].postMessage(i);
}
}
function reduce(numWorkers, results) {
// find overlapping time windows
var overlaps = [];
for(var n = 0; n < numWorkers; ++n) {
var r1 = results[n];
var overlap = overlaps[n] = [];
for(var i = 0; i < numWorkers; ++i) {
if(n === i) {
continue;
}
var r2 = results[i];
if((r1.st > r2.st && r1.st < r2.et) ||
(r2.st > r1.st && r2.st < r1.et)) {
overlap.push(i);
}
}
}
// get maximum overlaps ... don't include overlapping worker itself
// as the main JS process was also being scheduled during the work and
// would have to be subtracted from the estimate anyway
return overlaps.reduce(function(max, overlap) {
return Math.max(max, overlap.length);
}, 0);
}
};
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'util';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define(['require', 'module'], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
/**
* AES encryption tasks common across all variants of AES.
* @class EcAes
* @module com.eduworks.ec
* @author fritz.ray@eduworks.com
*/
var EcAes = function() {};
EcAes = stjs.extend(EcAes, null, [], function(constructor, prototype) {
/**
* Generates a random secret of length @i
* @method newSecret
* @static
* @param {integer} i Length of secret
* @return {string} String representing the new secret, encoded using Base64.
*/
constructor.newSecret = function(i) {
return forge.util.encode64(forge.random.getBytesSync(i));
};
/**
* Generates a random Initialization Vector of length @i
* @method newIv
* @static
* @param {integer} i Length of initialization Vector
* @return {string} String representing the new Initialization Vector, encoded using Base64.
*/
constructor.newIv = function(i) {
return forge.util.encode64(forge.random.getBytesSync(i));
};
}, {}, {});
/**
* Functions to output keys in SSH-friendly formats.
*
* This is part of the Forge project which may be used under the terms of
* either the BSD License or the GNU General Public License (GPL) Version 2.
*
* See: https://github.com/digitalbazaar/forge/blob/cbebca3780658703d925b61b2caffb1d263a6c1d/LICENSE
*
* @author https://github.com/shellac
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
var ssh = forge.ssh = forge.ssh || {};
/**
* Encodes (and optionally encrypts) a private RSA key as a Putty PPK file.
*
* @param privateKey the key.
* @param passphrase a passphrase to protect the key (falsy for no encryption).
* @param comment a comment to include in the key file.
*
* @return the PPK file as a string.
*/
ssh.privateKeyToPutty = function(privateKey, passphrase, comment) {
comment = comment || '';
passphrase = passphrase || '';
var algorithm = 'ssh-rsa';
var encryptionAlgorithm = (passphrase === '') ? 'none' : 'aes256-cbc';
var ppk = 'PuTTY-User-Key-File-2: ' + algorithm + '\r\n';
ppk += 'Encryption: ' + encryptionAlgorithm + '\r\n';
ppk += 'Comment: ' + comment + '\r\n';
// public key into buffer for ppk
var pubbuffer = forge.util.createBuffer();
_addStringToBuffer(pubbuffer, algorithm);
_addBigIntegerToBuffer(pubbuffer, privateKey.e);
_addBigIntegerToBuffer(pubbuffer, privateKey.n);
// write public key
var pub = forge.util.encode64(pubbuffer.bytes(), 64);
var length = Math.floor(pub.length / 66) + 1; // 66 = 64 + \r\n
ppk += 'Public-Lines: ' + length + '\r\n';
ppk += pub;
// private key into a buffer
var privbuffer = forge.util.createBuffer();
_addBigIntegerToBuffer(privbuffer, privateKey.d);
_addBigIntegerToBuffer(privbuffer, privateKey.p);
_addBigIntegerToBuffer(privbuffer, privateKey.q);
_addBigIntegerToBuffer(privbuffer, privateKey.qInv);
// optionally encrypt the private key
var priv;
if(!passphrase) {
// use the unencrypted buffer
priv = forge.util.encode64(privbuffer.bytes(), 64);
} else {
// encrypt RSA key using passphrase
var encLen = privbuffer.length() + 16 - 1;
encLen -= encLen % 16;
// pad private key with sha1-d data -- needs to be a multiple of 16
var padding = _sha1(privbuffer.bytes());
padding.truncate(padding.length() - encLen + privbuffer.length());
privbuffer.putBuffer(padding);
var aeskey = forge.util.createBuffer();
aeskey.putBuffer(_sha1('\x00\x00\x00\x00', passphrase));
aeskey.putBuffer(_sha1('\x00\x00\x00\x01', passphrase));
// encrypt some bytes using CBC mode
// key is 40 bytes, so truncate *by* 8 bytes
var cipher = forge.aes.createEncryptionCipher(aeskey.truncate(8), 'CBC');
cipher.start(forge.util.createBuffer().fillWithByte(0, 16));
cipher.update(privbuffer.copy());
cipher.finish();
var encrypted = cipher.output;
// Note: this appears to differ from Putty -- is forge wrong, or putty?
// due to padding we finish as an exact multiple of 16
encrypted.truncate(16); // all padding
priv = forge.util.encode64(encrypted.bytes(), 64);
}
// output private key
length = Math.floor(priv.length / 66) + 1; // 64 + \r\n
ppk += '\r\nPrivate-Lines: ' + length + '\r\n';
ppk += priv;
// MAC
var mackey = _sha1('putty-private-key-file-mac-key', passphrase);
var macbuffer = forge.util.createBuffer();
_addStringToBuffer(macbuffer, algorithm);
_addStringToBuffer(macbuffer, encryptionAlgorithm);
_addStringToBuffer(macbuffer, comment);
macbuffer.putInt32(pubbuffer.length());
macbuffer.putBuffer(pubbuffer);
macbuffer.putInt32(privbuffer.length());
macbuffer.putBuffer(privbuffer);
var hmac = forge.hmac.create();
hmac.start('sha1', mackey);
hmac.update(macbuffer.bytes());
ppk += '\r\nPrivate-MAC: ' + hmac.digest().toHex() + '\r\n';
return ppk;
};
/**
* Encodes a public RSA key as an OpenSSH file.
*
* @param key the key.
* @param comment a comment.
*
* @return the public key in OpenSSH format.
*/
ssh.publicKeyToOpenSSH = function(key, comment) {
var type = 'ssh-rsa';
comment = comment || '';
var buffer = forge.util.createBuffer();
_addStringToBuffer(buffer, type);
_addBigIntegerToBuffer(buffer, key.e);
_addBigIntegerToBuffer(buffer, key.n);
return type + ' ' + forge.util.encode64(buffer.bytes()) + ' ' + comment;
};
/**
* Encodes a private RSA key as an OpenSSH file.
*
* @param key the key.
* @param passphrase a passphrase to protect the key (falsy for no encryption).
*
* @return the public key in OpenSSH format.
*/
ssh.privateKeyToOpenSSH = function(privateKey, passphrase) {
if(!passphrase) {
return forge.pki.privateKeyToPem(privateKey);
}
// OpenSSH private key is just a legacy format, it seems
return forge.pki.encryptRsaPrivateKey(privateKey, passphrase,
{legacy: true, algorithm: 'aes128'});
};
/**
* Gets the SSH fingerprint for the given public key.
*
* @param options the options to use.
* [md] the message digest object to use (defaults to forge.md.md5).
* [encoding] an alternative output encoding, such as 'hex'
* (defaults to none, outputs a byte buffer).
* [delimiter] the delimiter to use between bytes for 'hex' encoded
* output, eg: ':' (defaults to none).
*
* @return the fingerprint as a byte buffer or other encoding based on options.
*/
ssh.getPublicKeyFingerprint = function(key, options) {
options = options || {};
var md = options.md || forge.md.md5.create();
var type = 'ssh-rsa';
var buffer = forge.util.createBuffer();
_addStringToBuffer(buffer, type);
_addBigIntegerToBuffer(buffer, key.e);
_addBigIntegerToBuffer(buffer, key.n);
// hash public key bytes
md.start();
md.update(buffer.getBytes());
var digest = md.digest();
if(options.encoding === 'hex') {
var hex = digest.toHex();
if(options.delimiter) {
return hex.match(/.{2}/g).join(options.delimiter);
}
return hex;
} else if(options.encoding === 'binary') {
return digest.getBytes();
} else if(options.encoding) {
throw new Error('Unknown encoding "' + options.encoding + '".');
}
return digest;
};
/**
* Adds len(val) then val to a buffer.
*
* @param buffer the buffer to add to.
* @param val a big integer.
*/
function _addBigIntegerToBuffer(buffer, val) {
var hexVal = val.toString(16);
// ensure 2s complement +ve
if(hexVal[0] >= '8') {
hexVal = '00' + hexVal;
}
var bytes = forge.util.hexToBytes(hexVal);
buffer.putInt32(bytes.length);
buffer.putBytes(bytes);
}
/**
* Adds len(val) then val to a buffer.
*
* @param buffer the buffer to add to.
* @param val a string.
*/
function _addStringToBuffer(buffer, val) {
buffer.putInt32(val.length);
buffer.putString(val);
}
/**
* Hashes the arguments into one value using SHA-1.
*
* @return the sha1 hash of the provided arguments.
*/
function _sha1() {
var sha = forge.md.sha1.create();
var num = arguments.length;
for (var i = 0; i < num; ++i) {
sha.update(arguments[i]);
}
return sha.digest();
}
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'ssh';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define([
'require',
'module',
'./aes',
'./hmac',
'./md5',
'./sha1',
'./util'
], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
/**
* Secure Hash Algorithm with 160-bit digest (SHA-1) implementation.
*
* @author Dave Longley
*
* Copyright (c) 2010-2014 Digital Bazaar, Inc.
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
var sha1 = forge.sha1 = forge.sha1 || {};
forge.md = forge.md || {};
forge.md.algorithms = forge.md.algorithms || {};
forge.md.sha1 = forge.md.algorithms.sha1 = sha1;
/**
* Creates a SHA-1 message digest object.
*
* @return a message digest object.
*/
sha1.create = function() {
// do initialization as necessary
if(!_initialized) {
_init();
}
// SHA-1 state contains five 32-bit integers
var _state = null;
// input buffer
var _input = forge.util.createBuffer();
// used for word storage
var _w = new Array(80);
// message digest object
var md = {
algorithm: 'sha1',
blockLength: 64,
digestLength: 20,
// 56-bit length of message so far (does not including padding)
messageLength: 0,
// true 64-bit message length as two 32-bit ints
messageLength64: [0, 0]
};
/**
* Starts the digest.
*
* @return this digest object.
*/
md.start = function() {
md.messageLength = 0;
md.messageLength64 = [0, 0];
_input = forge.util.createBuffer();
_state = {
h0: 0x67452301,
h1: 0xEFCDAB89,
h2: 0x98BADCFE,
h3: 0x10325476,
h4: 0xC3D2E1F0
};
return md;
};
// start digest automatically for first time
md.start();
/**
* Updates the digest with the given message input. The given input can
* treated as raw input (no encoding will be applied) or an encoding of
* 'utf8' maybe given to encode the input using UTF-8.
*
* @param msg the message input to update with.
* @param encoding the encoding to use (default: 'raw', other: 'utf8').
*
* @return this digest object.
*/
md.update = function(msg, encoding) {
if(encoding === 'utf8') {
msg = forge.util.encodeUtf8(msg);
}
// update message length
md.messageLength += msg.length;
md.messageLength64[0] += (msg.length / 0x100000000) >>> 0;
md.messageLength64[1] += msg.length >>> 0;
// add bytes to input buffer
_input.putBytes(msg);
// process bytes
_update(_state, _w, _input);
// compact input buffer every 2K or if empty
if(_input.read > 2048 || _input.length() === 0) {
_input.compact();
}
return md;
};
/**
* Produces the digest.
*
* @return a byte buffer containing the digest value.
*/
md.digest = function() {
/* Note: Here we copy the remaining bytes in the input buffer and
add the appropriate SHA-1 padding. Then we do the final update
on a copy of the state so that if the user wants to get
intermediate digests they can do so. */
/* Determine the number of bytes that must be added to the message
to ensure its length is congruent to 448 mod 512. In other words,
the data to be digested must be a multiple of 512 bits (or 128 bytes).
This data includes the message, some padding, and the length of the
message. Since the length of the message will be encoded as 8 bytes (64
bits), that means that the last segment of the data must have 56 bytes
(448 bits) of message and padding. Therefore, the length of the message
plus the padding must be congruent to 448 mod 512 because
512 - 128 = 448.
In order to fill up the message length it must be filled with
padding that begins with 1 bit followed by all 0 bits. Padding
must *always* be present, so if the message length is already
congruent to 448 mod 512, then 512 padding bits must be added. */
// 512 bits == 64 bytes, 448 bits == 56 bytes, 64 bits = 8 bytes
// _padding starts with 1 byte with first bit is set in it which
// is byte value 128, then there may be up to 63 other pad bytes
var padBytes = forge.util.createBuffer();
padBytes.putBytes(_input.bytes());
// 64 - (remaining msg + 8 bytes msg length) mod 64
padBytes.putBytes(
_padding.substr(0, 64 - ((md.messageLength64[1] + 8) & 0x3F)));
/* Now append length of the message. The length is appended in bits
as a 64-bit number in big-endian order. Since we store the length in
bytes, we must multiply the 64-bit length by 8 (or left shift by 3). */
padBytes.putInt32(
(md.messageLength64[0] << 3) | (md.messageLength64[0] >>> 28));
padBytes.putInt32(md.messageLength64[1] << 3);
var s2 = {
h0: _state.h0,
h1: _state.h1,
h2: _state.h2,
h3: _state.h3,
h4: _state.h4
};
_update(s2, _w, padBytes);
var rval = forge.util.createBuffer();
rval.putInt32(s2.h0);
rval.putInt32(s2.h1);
rval.putInt32(s2.h2);
rval.putInt32(s2.h3);
rval.putInt32(s2.h4);
return rval;
};
return md;
};
// sha-1 padding bytes not initialized yet
var _padding = null;
var _initialized = false;
/**
* Initializes the constant tables.
*/
function _init() {
// create padding
_padding = String.fromCharCode(128);
_padding += forge.util.fillString(String.fromCharCode(0x00), 64);
// now initialized
_initialized = true;
}
/**
* Updates a SHA-1 state with the given byte buffer.
*
* @param s the SHA-1 state to update.
* @param w the array to use to store words.
* @param bytes the byte buffer to update with.
*/
function _update(s, w, bytes) {
// consume 512 bit (64 byte) chunks
var t, a, b, c, d, e, f, i;
var len = bytes.length();
while(len >= 64) {
// the w array will be populated with sixteen 32-bit big-endian words
// and then extended into 80 32-bit words according to SHA-1 algorithm
// and for 32-79 using Max Locktyukhin's optimization
// initialize hash value for this chunk
a = s.h0;
b = s.h1;
c = s.h2;
d = s.h3;
e = s.h4;
// round 1
for(i = 0; i < 16; ++i) {
t = bytes.getInt32();
w[i] = t;
f = d ^ (b & (c ^ d));
t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t;
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
for(; i < 20; ++i) {
t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]);
t = (t << 1) | (t >>> 31);
w[i] = t;
f = d ^ (b & (c ^ d));
t = ((a << 5) | (a >>> 27)) + f + e + 0x5A827999 + t;
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
// round 2
for(; i < 32; ++i) {
t = (w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]);
t = (t << 1) | (t >>> 31);
w[i] = t;
f = b ^ c ^ d;
t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
for(; i < 40; ++i) {
t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]);
t = (t << 2) | (t >>> 30);
w[i] = t;
f = b ^ c ^ d;
t = ((a << 5) | (a >>> 27)) + f + e + 0x6ED9EBA1 + t;
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
// round 3
for(; i < 60; ++i) {
t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]);
t = (t << 2) | (t >>> 30);
w[i] = t;
f = (b & c) | (d & (b ^ c));
t = ((a << 5) | (a >>> 27)) + f + e + 0x8F1BBCDC + t;
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
// round 4
for(; i < 80; ++i) {
t = (w[i - 6] ^ w[i - 16] ^ w[i - 28] ^ w[i - 32]);
t = (t << 2) | (t >>> 30);
w[i] = t;
f = b ^ c ^ d;
t = ((a << 5) | (a >>> 27)) + f + e + 0xCA62C1D6 + t;
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
// update hash state
s.h0 = (s.h0 + a) | 0;
s.h1 = (s.h1 + b) | 0;
s.h2 = (s.h2 + c) | 0;
s.h3 = (s.h3 + d) | 0;
s.h4 = (s.h4 + e) | 0;
len -= 64;
}
}
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'sha1';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define(['require', 'module', './util'], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
var EcAesParameters = function(iv) {
this.iv = forge.util.decode64(iv);
};
EcAesParameters = stjs.extend(EcAesParameters, null, [], function(constructor, prototype) {
prototype.iv = null;
}, {iv: "forge.payload"}, {});
/**
* Javascript implementation of basic RSA algorithms.
*
* @author Dave Longley
*
* Copyright (c) 2010-2014 Digital Bazaar, Inc.
*
* The only algorithm currently supported for PKI is RSA.
*
* An RSA key is often stored in ASN.1 DER format. The SubjectPublicKeyInfo
* ASN.1 structure is composed of an algorithm of type AlgorithmIdentifier
* and a subjectPublicKey of type bit string.
*
* The AlgorithmIdentifier contains an Object Identifier (OID) and parameters
* for the algorithm, if any. In the case of RSA, there aren't any.
*
* SubjectPublicKeyInfo ::= SEQUENCE {
* algorithm AlgorithmIdentifier,
* subjectPublicKey BIT STRING
* }
*
* AlgorithmIdentifer ::= SEQUENCE {
* algorithm OBJECT IDENTIFIER,
* parameters ANY DEFINED BY algorithm OPTIONAL
* }
*
* For an RSA public key, the subjectPublicKey is:
*
* RSAPublicKey ::= SEQUENCE {
* modulus INTEGER, -- n
* publicExponent INTEGER -- e
* }
*
* PrivateKeyInfo ::= SEQUENCE {
* version Version,
* privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
* privateKey PrivateKey,
* attributes [0] IMPLICIT Attributes OPTIONAL
* }
*
* Version ::= INTEGER
* PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
* PrivateKey ::= OCTET STRING
* Attributes ::= SET OF Attribute
*
* An RSA private key as the following structure:
*
* RSAPrivateKey ::= SEQUENCE {
* version Version,
* modulus INTEGER, -- n
* publicExponent INTEGER, -- e
* privateExponent INTEGER, -- d
* prime1 INTEGER, -- p
* prime2 INTEGER, -- q
* exponent1 INTEGER, -- d mod (p-1)
* exponent2 INTEGER, -- d mod (q-1)
* coefficient INTEGER -- (inverse of q) mod p
* }
*
* Version ::= INTEGER
*
* The OID for the RSA key algorithm is: 1.2.840.113549.1.1.1
*/
(function() {
function initModule(forge) {
/* ########## Begin module implementation ########## */
if(typeof BigInteger === 'undefined') {
var BigInteger = forge.jsbn.BigInteger;
}
// shortcut for asn.1 API
var asn1 = forge.asn1;
/*
* RSA encryption and decryption, see RFC 2313.
*/
forge.pki = forge.pki || {};
forge.pki.rsa = forge.rsa = forge.rsa || {};
var pki = forge.pki;
// for finding primes, which are 30k+i for i = 1, 7, 11, 13, 17, 19, 23, 29
var GCD_30_DELTA = [6, 4, 2, 4, 2, 4, 6, 2];
// validator for a PrivateKeyInfo structure
var privateKeyValidator = {
// PrivateKeyInfo
name: 'PrivateKeyInfo',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.SEQUENCE,
constructed: true,
value: [{
// Version (INTEGER)
name: 'PrivateKeyInfo.version',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyVersion'
}, {
// privateKeyAlgorithm
name: 'PrivateKeyInfo.privateKeyAlgorithm',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.SEQUENCE,
constructed: true,
value: [{
name: 'AlgorithmIdentifier.algorithm',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.OID,
constructed: false,
capture: 'privateKeyOid'
}]
}, {
// PrivateKey
name: 'PrivateKeyInfo',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.OCTETSTRING,
constructed: false,
capture: 'privateKey'
}]
};
// validator for an RSA private key
var rsaPrivateKeyValidator = {
// RSAPrivateKey
name: 'RSAPrivateKey',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.SEQUENCE,
constructed: true,
value: [{
// Version (INTEGER)
name: 'RSAPrivateKey.version',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyVersion'
}, {
// modulus (n)
name: 'RSAPrivateKey.modulus',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyModulus'
}, {
// publicExponent (e)
name: 'RSAPrivateKey.publicExponent',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyPublicExponent'
}, {
// privateExponent (d)
name: 'RSAPrivateKey.privateExponent',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyPrivateExponent'
}, {
// prime1 (p)
name: 'RSAPrivateKey.prime1',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyPrime1'
}, {
// prime2 (q)
name: 'RSAPrivateKey.prime2',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyPrime2'
}, {
// exponent1 (d mod (p-1))
name: 'RSAPrivateKey.exponent1',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyExponent1'
}, {
// exponent2 (d mod (q-1))
name: 'RSAPrivateKey.exponent2',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyExponent2'
}, {
// coefficient ((inverse of q) mod p)
name: 'RSAPrivateKey.coefficient',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'privateKeyCoefficient'
}]
};
// validator for an RSA public key
var rsaPublicKeyValidator = {
// RSAPublicKey
name: 'RSAPublicKey',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.SEQUENCE,
constructed: true,
value: [{
// modulus (n)
name: 'RSAPublicKey.modulus',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'publicKeyModulus'
}, {
// publicExponent (e)
name: 'RSAPublicKey.exponent',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.INTEGER,
constructed: false,
capture: 'publicKeyExponent'
}]
};
// validator for an SubjectPublicKeyInfo structure
// Note: Currently only works with an RSA public key
var publicKeyValidator = forge.pki.rsa.publicKeyValidator = {
name: 'SubjectPublicKeyInfo',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.SEQUENCE,
constructed: true,
captureAsn1: 'subjectPublicKeyInfo',
value: [{
name: 'SubjectPublicKeyInfo.AlgorithmIdentifier',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.SEQUENCE,
constructed: true,
value: [{
name: 'AlgorithmIdentifier.algorithm',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.OID,
constructed: false,
capture: 'publicKeyOid'
}]
}, {
// subjectPublicKey
name: 'SubjectPublicKeyInfo.subjectPublicKey',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.BITSTRING,
constructed: false,
value: [{
// RSAPublicKey
name: 'SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey',
tagClass: asn1.Class.UNIVERSAL,
type: asn1.Type.SEQUENCE,
constructed: true,
optional: true,
captureAsn1: 'rsaPublicKey'
}]
}]
};
/**
* Wrap digest in DigestInfo object.
*
* This function implements EMSA-PKCS1-v1_5-ENCODE as per RFC 3447.
*
* DigestInfo ::= SEQUENCE {
* digestAlgorithm DigestAlgorithmIdentifier,
* digest Digest
* }
*
* DigestAlgorithmIdentifier ::= AlgorithmIdentifier
* Digest ::= OCTET STRING
*
* @param md the message digest object with the hash to sign.
*
* @return the encoded message (ready for RSA encrytion)
*/
var emsaPkcs1v15encode = function(md) {
// get the oid for the algorithm
var oid;
if(md.algorithm in pki.oids) {
oid = pki.oids[md.algorithm];
} else {
var error = new Error('Unknown message digest algorithm.');
error.algorithm = md.algorithm;
throw error;
}
var oidBytes = asn1.oidToDer(oid).getBytes();
// create the digest info
var digestInfo = asn1.create(
asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
var digestAlgorithm = asn1.create(
asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, []);
digestAlgorithm.value.push(asn1.create(
asn1.Class.UNIVERSAL, asn1.Type.OID, false, oidBytes));
digestAlgorithm.value.push(asn1.create(
asn1.Class.UNIVERSAL, asn1.Type.NULL, false, ''));
var digest = asn1.create(
asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING,
false, md.digest().getBytes());
digestInfo.value.push(digestAlgorithm);
digestInfo.value.push(digest);
// encode digest info
return asn1.toDer(digestInfo).getBytes();
};
/**
* Performs x^c mod n (RSA encryption or decryption operation).
*
* @param x the number to raise and mod.
* @param key the key to use.
* @param pub true if the key is public, false if private.
*
* @return the result of x^c mod n.
*/
var _modPow = function(x, key, pub) {
if(pub) {
return x.modPow(key.e, key.n);
}
if(!key.p || !key.q) {
// allow calculation without CRT params (slow)
return x.modPow(key.d, key.n);
}
// pre-compute dP, dQ, and qInv if necessary
if(!key.dP) {
key.dP = key.d.mod(key.p.subtract(BigInteger.ONE));
}
if(!key.dQ) {
key.dQ = key.d.mod(key.q.subtract(BigInteger.ONE));
}
if(!key.qInv) {
key.qInv = key.q.modInverse(key.p);
}
/* Chinese remainder theorem (CRT) states:
Suppose n1, n2, ..., nk are positive integers which are pairwise
coprime (n1 and n2 have no common factors other than 1). For any
integers x1, x2, ..., xk there exists an integer x solving the
system of simultaneous congruences (where ~= means modularly
congruent so a ~= b mod n means a mod n = b mod n):
x ~= x1 mod n1
x ~= x2 mod n2
...
x ~= xk mod nk
This system of congruences has a single simultaneous solution x
between 0 and n - 1. Furthermore, each xk solution and x itself
is congruent modulo the product n = n1*n2*...*nk.
So x1 mod n = x2 mod n = xk mod n = x mod n.
The single simultaneous solution x can be solved with the following
equation:
x = sum(xi*ri*si) mod n where ri = n/ni and si = ri^-1 mod ni.
Where x is less than n, xi = x mod ni.
For RSA we are only concerned with k = 2. The modulus n = pq, where
p and q are coprime. The RSA decryption algorithm is:
y = x^d mod n
Given the above:
x1 = x^d mod p
r1 = n/p = q
s1 = q^-1 mod p
x2 = x^d mod q
r2 = n/q = p
s2 = p^-1 mod q
So y = (x1r1s1 + x2r2s2) mod n
= ((x^d mod p)q(q^-1 mod p) + (x^d mod q)p(p^-1 mod q)) mod n
According to Fermat's Little Theorem, if the modulus P is prime,
for any integer A not evenly divisible by P, A^(P-1) ~= 1 mod P.
Since A is not divisible by P it follows that if:
N ~= M mod (P - 1), then A^N mod P = A^M mod P. Therefore:
A^N mod P = A^(M mod (P - 1)) mod P. (The latter takes less effort
to calculate). In order to calculate x^d mod p more quickly the
exponent d mod (p - 1) is stored in the RSA private key (the same
is done for x^d mod q). These values are referred to as dP and dQ
respectively. Therefore we now have:
y = ((x^dP mod p)q(q^-1 mod p) + (x^dQ mod q)p(p^-1 mod q)) mod n
Since we'll be reducing x^dP by modulo p (same for q) we can also
reduce x by p (and q respectively) before hand. Therefore, let
xp = ((x mod p)^dP mod p), and
xq = ((x mod q)^dQ mod q), yielding:
y = (xp*q*(q^-1 mod p) + xq*p*(p^-1 mod q)) mod n
This can be further reduced to a simple algorithm that only
requires 1 inverse (the q inverse is used) to be used and stored.
The algorithm is called Garner's algorithm. If qInv is the
inverse of q, we simply calculate:
y = (qInv*(xp - xq) mod p) * q + xq
However, there are two further complications. First, we need to
ensure that xp > xq to prevent signed BigIntegers from being used
so we add p until this is true (since we will be mod'ing with
p anyway). Then, there is a known timing attack on algorithms
using the CRT. To mitigate this risk, "cryptographic blinding"
should be used. This requires simply generating a random number r between
0 and n-1 and its inverse and multiplying x by r^e before calculating y
and then multiplying y by r^-1 afterwards.
*/
// cryptographic blinding
var r;
do {
r = new BigInteger(
forge.util.bytesToHex(forge.random.getBytes(key.n.bitLength() / 8)),
16).mod(key.n);
} while(r.equals(BigInteger.ZERO));
x = x.multiply(r.modPow(key.e, key.n)).mod(key.n);
// calculate xp and xq
var xp = x.mod(key.p).modPow(key.dP, key.p);
var xq = x.mod(key.q).modPow(key.dQ, key.q);
// xp must be larger than xq to avoid signed bit usage
while(xp.compareTo(xq) < 0) {
xp = xp.add(key.p);
}
// do last step
var y = xp.subtract(xq)
.multiply(key.qInv).mod(key.p)
.multiply(key.q).add(xq);
// remove effect of random for cryptographic blinding
y = y.multiply(r.modInverse(key.n)).mod(key.n);
return y;
};
/**
* NOTE: THIS METHOD IS DEPRECATED, use 'sign' on a private key object or
* 'encrypt' on a public key object instead.
*
* Performs RSA encryption.
*
* The parameter bt controls whether to put padding bytes before the
* message passed in. Set bt to either true or false to disable padding
* completely (in order to handle e.g. EMSA-PSS encoding seperately before),
* signaling whether the encryption operation is a public key operation
* (i.e. encrypting data) or not, i.e. private key operation (data signing).
*
* For PKCS#1 v1.5 padding pass in the block type to use, i.e. either 0x01
* (for signing) or 0x02 (for encryption). The key operation mode (private
* or public) is derived from this flag in that case).
*
* @param m the message to encrypt as a byte string.
* @param key the RSA key to use.
* @param bt for PKCS#1 v1.5 padding, the block type to use
* (0x01 for private key, 0x02 for public),
* to disable padding: true = public key, false = private key.
*
* @return the encrypted bytes as a string.
*/
pki.rsa.encrypt = function(m, key, bt) {
var pub = bt;
var eb;
// get the length of the modulus in bytes
var k = Math.ceil(key.n.bitLength() / 8);
if(bt !== false && bt !== true) {
// legacy, default to PKCS#1 v1.5 padding
pub = (bt === 0x02);
eb = _encodePkcs1_v1_5(m, key, bt);
} else {
eb = forge.util.createBuffer();
eb.putBytes(m);
}
// load encryption block as big integer 'x'
// FIXME: hex conversion inefficient, get BigInteger w/byte strings
var x = new BigInteger(eb.toHex(), 16);
// do RSA encryption
var y = _modPow(x, key, pub);
// convert y into the encrypted data byte string, if y is shorter in
// bytes than k, then prepend zero bytes to fill up ed
// FIXME: hex conversion inefficient, get BigInteger w/byte strings
var yhex = y.toString(16);
var ed = forge.util.createBuffer();
var zeros = k - Math.ceil(yhex.length / 2);
while(zeros > 0) {
ed.putByte(0x00);
--zeros;
}
ed.putBytes(forge.util.hexToBytes(yhex));
return ed.getBytes();
};
/**
* NOTE: THIS METHOD IS DEPRECATED, use 'decrypt' on a private key object or
* 'verify' on a public key object instead.
*
* Performs RSA decryption.
*
* The parameter ml controls whether to apply PKCS#1 v1.5 padding
* or not. Set ml = false to disable padding removal completely
* (in order to handle e.g. EMSA-PSS later on) and simply pass back
* the RSA encryption block.
*
* @param ed the encrypted data to decrypt in as a byte string.
* @param key the RSA key to use.
* @param pub true for a public key operation, false for private.
* @param ml the message length, if known, false to disable padding.
*
* @return the decrypted message as a byte string.
*/
pki.rsa.decrypt = function(ed, key, pub, ml) {
// get the length of the modulus in bytes
var k = Math.ceil(key.n.bitLength() / 8);
// error if the length of the encrypted data ED is not k
if(ed.length !== k) {
var error = new Error('Encrypted message length is invalid.');
error.length = ed.length;
error.expected = k;
throw error;
}
// convert encrypted data into a big integer
// FIXME: hex conversion inefficient, get BigInteger w/byte strings
var y = new BigInteger(forge.util.createBuffer(ed).toHex(), 16);
// y must be less than the modulus or it wasn't the result of
// a previous mod operation (encryption) using that modulus
if(y.compareTo(key.n) >= 0) {
throw new Error('Encrypted message is invalid.');
}
// do RSA decryption
var x = _modPow(y, key, pub);
// create the encryption block, if x is shorter in bytes than k, then
// prepend zero bytes to fill up eb
// FIXME: hex conversion inefficient, get BigInteger w/byte strings
var xhex = x.toString(16);
var eb = forge.util.createBuffer();
var zeros = k - Math.ceil(xhex.length / 2);
while(zeros > 0) {
eb.putByte(0x00);
--zeros;
}
eb.putBytes(forge.util.hexToBytes(xhex));
if(ml !== false) {
// legacy, default to PKCS#1 v1.5 padding
return _decodePkcs1_v1_5(eb.getBytes(), key, pub);
}
// return message
return eb.getBytes();
};
/**
* Creates an RSA key-pair generation state object. It is used to allow
* key-generation to be performed in steps. It also allows for a UI to
* display progress updates.
*
* @param bits the size for the private key in bits, defaults to 2048.
* @param e the public exponent to use, defaults to 65537 (0x10001).
* @param [options] the options to use.
* prng a custom crypto-secure pseudo-random number generator to use,
* that must define "getBytesSync".
* algorithm the algorithm to use (default: 'PRIMEINC').
*
* @return the state object to use to generate the key-pair.
*/
pki.rsa.createKeyPairGenerationState = function(bits, e, options) {
// TODO: migrate step-based prime generation code to forge.prime
// set default bits
if(typeof(bits) === 'string') {
bits = parseInt(bits, 10);
}
bits = bits || 2048;
// create prng with api that matches BigInteger secure random
options = options || {};
var prng = options.prng || forge.random;
var rng = {
// x is an array to fill with bytes
nextBytes: function(x) {
var b = prng.getBytesSync(x.length);
for(var i = 0; i < x.length; ++i) {
x[i] = b.charCodeAt(i);
}
}
};
var algorithm = options.algorithm || 'PRIMEINC';
// create PRIMEINC algorithm state
var rval;
if(algorithm === 'PRIMEINC') {
rval = {
algorithm: algorithm,
state: 0,
bits: bits,
rng: rng,
eInt: e || 65537,
e: new BigInteger(null),
p: null,
q: null,
qBits: bits >> 1,
pBits: bits - (bits >> 1),
pqState: 0,
num: null,
keys: null
};
rval.e.fromInt(rval.eInt);
} else {
throw new Error('Invalid key generation algorithm: ' + algorithm);
}
return rval;
};
/**
* Attempts to runs the key-generation algorithm for at most n seconds
* (approximately) using the given state. When key-generation has completed,
* the keys will be stored in state.keys.
*
* To use this function to update a UI while generating a key or to prevent
* causing browser lockups/warnings, set "n" to a value other than 0. A
* simple pattern for generating a key and showing a progress indicator is:
*
* var state = pki.rsa.createKeyPairGenerationState(2048);
* var step = function() {
* // step key-generation, run algorithm for 100 ms, repeat
* if(!forge.pki.rsa.stepKeyPairGenerationState(state, 100)) {
* setTimeout(step, 1);
* } else {
* // key-generation complete
* // TODO: turn off progress indicator here
* // TODO: use the generated key-pair in "state.keys"
* }
* };
* // TODO: turn on progress indicator here
* setTimeout(step, 0);
*
* @param state the state to use.
* @param n the maximum number of milliseconds to run the algorithm for, 0
* to run the algorithm to completion.
*
* @return true if the key-generation completed, false if not.
*/
pki.rsa.stepKeyPairGenerationState = function(state, n) {
// set default algorithm if not set
if(!('algorithm' in state)) {
state.algorithm = 'PRIMEINC';
}
// TODO: migrate step-based prime generation code to forge.prime
// TODO: abstract as PRIMEINC algorithm
// do key generation (based on Tom Wu's rsa.js, see jsbn.js license)
// with some minor optimizations and designed to run in steps
// local state vars
var THIRTY = new BigInteger(null);
THIRTY.fromInt(30);
var deltaIdx = 0;
var op_or = function(x,y) { return x|y; };
// keep stepping until time limit is reached or done
var t1 = +new Date();
var t2;
var total = 0;
while(state.keys === null && (n <= 0 || total < n)) {
// generate p or q
if(state.state === 0) {
/* Note: All primes are of the form:
30k+i, for i < 30 and gcd(30, i)=1, where there are 8 values for i
When we generate a random number, we always align it at 30k + 1. Each
time the number is determined not to be prime we add to get to the
next 'i', eg: if the number was at 30k + 1 we add 6. */
var bits = (state.p === null) ? state.pBits : state.qBits;
var bits1 = bits - 1;
// get a random number
if(state.pqState === 0) {
state.num = new BigInteger(bits, state.rng);
// force MSB set
if(!state.num.testBit(bits1)) {
state.num.bitwiseTo(
BigInteger.ONE.shiftLeft(bits1), op_or, state.num);
}
// align number on 30k+1 boundary
state.num.dAddOffset(31 - state.num.mod(THIRTY).byteValue(), 0);
deltaIdx = 0;
++state.pqState;
} else if(state.pqState === 1) {
// try to make the number a prime
if(state.num.bitLength() > bits) {
// overflow, try again
state.pqState = 0;
// do primality test
} else if(state.num.isProbablePrime(
_getMillerRabinTests(state.num.bitLength()))) {
++state.pqState;
} else {
// get next potential prime
state.num.dAddOffset(GCD_30_DELTA[deltaIdx++ % 8], 0);
}
} else if(state.pqState === 2) {
// ensure number is coprime with e
state.pqState =
(state.num.subtract(BigInteger.ONE).gcd(state.e)
.compareTo(BigInteger.ONE) === 0) ? 3 : 0;
} else if(state.pqState === 3) {
// store p or q
state.pqState = 0;
if(state.p === null) {
state.p = state.num;
} else {
state.q = state.num;
}
// advance state if both p and q are ready
if(state.p !== null && state.q !== null) {
++state.state;
}
state.num = null;
}
} else if(state.state === 1) {
// ensure p is larger than q (swap them if not)
if(state.p.compareTo(state.q) < 0) {
state.num = state.p;
state.p = state.q;
state.q = state.num;
}
++state.state;
} else if(state.state === 2) {
// compute phi: (p - 1)(q - 1) (Euler's totient function)
state.p1 = state.p.subtract(BigInteger.ONE);
state.q1 = state.q.subtract(BigInteger.ONE);
state.phi = state.p1.multiply(state.q1);
++state.state;
} else if(state.state === 3) {
// ensure e and phi are coprime
if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) === 0) {
// phi and e are coprime, advance
++state.state;
} else {
// phi and e aren't coprime, so generate a new p and q
state.p = null;
state.q = null;
state.state = 0;
}
} else if(state.state === 4) {
// create n, ensure n is has the right number of bits
state.n = state.p.multiply(state.q);
// ensure n is right number of bits
if(state.n.bitLength() === state.bits) {
// success, advance
++state.state;
} else {
// failed, get new q
state.q = null;
state.state = 0;
}
} else if(state.state === 5) {
// set keys
var d = state.e.modInverse(state.phi);
state.keys = {
privateKey: pki.rsa.setPrivateKey(
state.n, state.e, d, state.p, state.q,
d.mod(state.p1), d.mod(state.q1),
state.q.modInverse(state.p)),
publicKey: pki.rsa.setPublicKey(state.n, state.e)
};
}
// update timing
t2 = +new Date();
total += t2 - t1;
t1 = t2;
}
return state.keys !== null;
};
/**
* Generates an RSA public-private key pair in a single call.
*
* To generate a key-pair in steps (to allow for progress updates and to
* prevent blocking or warnings in slow browsers) then use the key-pair
* generation state functions.
*
* To generate a key-pair asynchronously (either through web-workers, if
* available, or by breaking up the work on the main thread), pass a
* callback function.
*
* @param [bits] the size for the private key in bits, defaults to 2048.
* @param [e] the public exponent to use, defaults to 65537.
* @param [options] options for key-pair generation, if given then 'bits'
* and 'e' must *not* be given:
* bits the size for the private key in bits, (default: 2048).
* e the public exponent to use, (default: 65537 (0x10001)).
* workerScript the worker script URL.
* workers the number of web workers (if supported) to use,
* (default: 2).
* workLoad the size of the work load, ie: number of possible prime
* numbers for each web worker to check per work assignment,
* (default: 100).
* e the public exponent to use, defaults to 65537.
* prng a custom crypto-secure pseudo-random number generator to use,
* that must define "getBytesSync".
* algorithm the algorithm to use (default: 'PRIMEINC').
* @param [callback(err, keypair)] called once the operation completes.
*
* @return an object with privateKey and publicKey properties.
*/
pki.rsa.generateKeyPair = function(bits, e, options, callback) {
// (bits), (options), (callback)
if(arguments.length === 1) {
if(typeof bits === 'object') {
options = bits;
bits = undefined;
} else if(typeof bits === 'function') {
callback = bits;
bits = undefined;
}
} else if(arguments.length === 2) {
// (bits, e), (bits, options), (bits, callback), (options, callback)
if(typeof bits === 'number') {
if(typeof e === 'function') {
callback = e;
e = undefined;
} else if(typeof e !== 'number') {
options = e;
e = undefined;
}
} else {
options = bits;
callback = e;
bits = undefined;
e = undefined;
}
} else if(arguments.length === 3) {
// (bits, e, options), (bits, e, callback), (bits, options, callback)
if(typeof e === 'number') {
if(typeof options === 'function') {
callback = options;
options = undefined;
}
} else {
callback = options;
options = e;
e = undefined;
}
}
options = options || {};
if(bits === undefined) {
bits = options.bits || 2048;
}
if(e === undefined) {
e = options.e || 0x10001;
}
var state = pki.rsa.createKeyPairGenerationState(bits, e, options);
if(!callback) {
pki.rsa.stepKeyPairGenerationState(state, 0);
return state.keys;
}
_generateKeyPair(state, options, callback);
};
/**
* Sets an RSA public key from BigIntegers modulus and exponent.
*
* @param n the modulus.
* @param e the exponent.
*
* @return the public key.
*/
pki.setRsaPublicKey = pki.rsa.setPublicKey = function(n, e) {
var key = {
n: n,
e: e
};
/**
* Encrypts the given data with this public key. Newer applications
* should use the 'RSA-OAEP' decryption scheme, 'RSAES-PKCS1-V1_5' is for
* legacy applications.
*
* @param data the byte string to encrypt.
* @param scheme the encryption scheme to use:
* 'RSAES-PKCS1-V1_5' (default),
* 'RSA-OAEP',
* 'RAW', 'NONE', or null to perform raw RSA encryption,
* an object with an 'encode' property set to a function
* with the signature 'function(data, key)' that returns
* a binary-encoded string representing the encoded data.
* @param schemeOptions any scheme-specific options.
*
* @return the encrypted byte string.
*/
key.encrypt = function(data, scheme, schemeOptions) {
if(typeof scheme === 'string') {
scheme = scheme.toUpperCase();
} else if(scheme === undefined) {
scheme = 'RSAES-PKCS1-V1_5';
}
if(scheme === 'RSAES-PKCS1-V1_5') {
scheme = {
encode: function(m, key, pub) {
return _encodePkcs1_v1_5(m, key, 0x02).getBytes();
}
};
} else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') {
scheme = {
encode: function(m, key) {
return forge.pkcs1.encode_rsa_oaep(key, m, schemeOptions);
}
};
} else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) {
scheme = { encode: function(e) { return e; } };
} else if(typeof scheme === 'string') {
throw new Error('Unsupported encryption scheme: "' + scheme + '".');
}
// do scheme-based encoding then rsa encryption
var e = scheme.encode(data, key, true);
return pki.rsa.encrypt(e, key, true);
};
/**
* Verifies the given signature against the given digest.
*
* PKCS#1 supports multiple (currently two) signature schemes:
* RSASSA-PKCS1-V1_5 and RSASSA-PSS.
*
* By default this implementation uses the "old scheme", i.e.
* RSASSA-PKCS1-V1_5, in which case once RSA-decrypted, the
* signature is an OCTET STRING that holds a DigestInfo.
*
* DigestInfo ::= SEQUENCE {
* digestAlgorithm DigestAlgorithmIdentifier,
* digest Digest
* }
* DigestAlgorithmIdentifier ::= AlgorithmIdentifier
* Digest ::= OCTET STRING
*
* To perform PSS signature verification, provide an instance
* of Forge PSS object as the scheme parameter.
*
* @param digest the message digest hash to compare against the signature,
* as a binary-encoded string.
* @param signature the signature to verify, as a binary-encoded string.
* @param scheme signature verification scheme to use:
* 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5,
* a Forge PSS object for RSASSA-PSS,
* 'NONE' or null for none, DigestInfo will not be expected, but
* PKCS#1 v1.5 padding will still be used.
*
* @return true if the signature was verified, false if not.
*/
key.verify = function(digest, signature, scheme) {
if(typeof scheme === 'string') {
scheme = scheme.toUpperCase();
} else if(scheme === undefined) {
scheme = 'RSASSA-PKCS1-V1_5';
}
if(scheme === 'RSASSA-PKCS1-V1_5') {
scheme = {
verify: function(digest, d) {
// remove padding
d = _decodePkcs1_v1_5(d, key, true);
// d is ASN.1 BER-encoded DigestInfo
var obj = asn1.fromDer(d);
// compare the given digest to the decrypted one
return digest === obj.value[1].value;
}
};
} else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) {
scheme = {
verify: function(digest, d) {
// remove padding
d = _decodePkcs1_v1_5(d, key, true);
return digest === d;
}
};
}
// do rsa decryption w/o any decoding, then verify -- which does decoding
var d = pki.rsa.decrypt(signature, key, true, false);
return scheme.verify(digest, d, key.n.bitLength());
};
return key;
};
/**
* Sets an RSA private key from BigIntegers modulus, exponent, primes,
* prime exponents, and modular multiplicative inverse.
*
* @param n the modulus.
* @param e the public exponent.
* @param d the private exponent ((inverse of e) mod n).
* @param p the first prime.
* @param q the second prime.
* @param dP exponent1 (d mod (p-1)).
* @param dQ exponent2 (d mod (q-1)).
* @param qInv ((inverse of q) mod p)
*
* @return the private key.
*/
pki.setRsaPrivateKey = pki.rsa.setPrivateKey = function(
n, e, d, p, q, dP, dQ, qInv) {
var key = {
n: n,
e: e,
d: d,
p: p,
q: q,
dP: dP,
dQ: dQ,
qInv: qInv
};
/**
* Decrypts the given data with this private key. The decryption scheme
* must match the one used to encrypt the data.
*
* @param data the byte string to decrypt.
* @param scheme the decryption scheme to use:
* 'RSAES-PKCS1-V1_5' (default),
* 'RSA-OAEP',
* 'RAW', 'NONE', or null to perform raw RSA decryption.
* @param schemeOptions any scheme-specific options.
*
* @return the decrypted byte string.
*/
key.decrypt = function(data, scheme, schemeOptions) {
if(typeof scheme === 'string') {
scheme = scheme.toUpperCase();
} else if(scheme === undefined) {
scheme = 'RSAES-PKCS1-V1_5';
}
// do rsa decryption w/o any decoding
var d = pki.rsa.decrypt(data, key, false, false);
if(scheme === 'RSAES-PKCS1-V1_5') {
scheme = { decode: _decodePkcs1_v1_5 };
} else if(scheme === 'RSA-OAEP' || scheme === 'RSAES-OAEP') {
scheme = {
decode: function(d, key) {
return forge.pkcs1.decode_rsa_oaep(key, d, schemeOptions);
}
};
} else if(['RAW', 'NONE', 'NULL', null].indexOf(scheme) !== -1) {
scheme = { decode: function(d) { return d; } };
} else {
throw new Error('Unsupported encryption scheme: "' + scheme + '".');
}
// decode according to scheme
return scheme.decode(d, key, false);
};
/**
* Signs the given digest, producing a signature.
*
* PKCS#1 supports multiple (currently two) signature schemes:
* RSASSA-PKCS1-V1_5 and RSASSA-PSS.
*
* By default this implementation uses the "old scheme", i.e.
* RSASSA-PKCS1-V1_5. In order to generate a PSS signature, provide
* an instance of Forge PSS object as the scheme parameter.
*
* @param md the message digest object with the hash to sign.
* @param scheme the signature scheme to use:
* 'RSASSA-PKCS1-V1_5' or undefined for RSASSA PKCS#1 v1.5,
* a Forge PSS object for RSASSA-PSS,
* 'NONE' or null for none, DigestInfo will not be used but
* PKCS#1 v1.5 padding will still be used.
*
* @return the signature as a byte string.
*/
key.sign = function(md, scheme) {
/* Note: The internal implementation of RSA operations is being
transitioned away from a PKCS#1 v1.5 hard-coded scheme. Some legacy
code like the use of an encoding block identifier 'bt' will eventually
be removed. */
// private key operation
var bt = false;
if(typeof scheme === 'string') {
scheme = scheme.toUpperCase();
}
if(scheme === undefined || scheme === 'RSASSA-PKCS1-V1_5') {
scheme = { encode: emsaPkcs1v15encode };
bt = 0x01;
} else if(scheme === 'NONE' || scheme === 'NULL' || scheme === null) {
scheme = { encode: function() { return md; } };
bt = 0x01;
}
// encode and then encrypt
var d = scheme.encode(md, key.n.bitLength());
return pki.rsa.encrypt(d, key, bt);
};
return key;
};
/**
* Wraps an RSAPrivateKey ASN.1 object in an ASN.1 PrivateKeyInfo object.
*
* @param rsaKey the ASN.1 RSAPrivateKey.
*
* @return the ASN.1 PrivateKeyInfo.
*/
pki.wrapRsaPrivateKey = function(rsaKey) {
// PrivateKeyInfo
return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
// version (0)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
asn1.integerToDer(0).getBytes()),
// privateKeyAlgorithm
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
asn1.create(
asn1.Class.UNIVERSAL, asn1.Type.OID, false,
asn1.oidToDer(pki.oids.rsaEncryption).getBytes()),
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')
]),
// PrivateKey
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,
asn1.toDer(rsaKey).getBytes())
]);
};
/**
* Converts a private key from an ASN.1 object.
*
* @param obj the ASN.1 representation of a PrivateKeyInfo containing an
* RSAPrivateKey or an RSAPrivateKey.
*
* @return the private key.
*/
pki.privateKeyFromAsn1 = function(obj) {
// get PrivateKeyInfo
var capture = {};
var errors = [];
if(asn1.validate(obj, privateKeyValidator, capture, errors)) {
obj = asn1.fromDer(forge.util.createBuffer(capture.privateKey));
}
// get RSAPrivateKey
capture = {};
errors = [];
if(!asn1.validate(obj, rsaPrivateKeyValidator, capture, errors)) {
var error = new Error('Cannot read private key. ' +
'ASN.1 object does not contain an RSAPrivateKey.');
error.errors = errors;
throw error;
}
// Note: Version is currently ignored.
// capture.privateKeyVersion
// FIXME: inefficient, get a BigInteger that uses byte strings
var n, e, d, p, q, dP, dQ, qInv;
n = forge.util.createBuffer(capture.privateKeyModulus).toHex();
e = forge.util.createBuffer(capture.privateKeyPublicExponent).toHex();
d = forge.util.createBuffer(capture.privateKeyPrivateExponent).toHex();
p = forge.util.createBuffer(capture.privateKeyPrime1).toHex();
q = forge.util.createBuffer(capture.privateKeyPrime2).toHex();
dP = forge.util.createBuffer(capture.privateKeyExponent1).toHex();
dQ = forge.util.createBuffer(capture.privateKeyExponent2).toHex();
qInv = forge.util.createBuffer(capture.privateKeyCoefficient).toHex();
// set private key
return pki.setRsaPrivateKey(
new BigInteger(n, 16),
new BigInteger(e, 16),
new BigInteger(d, 16),
new BigInteger(p, 16),
new BigInteger(q, 16),
new BigInteger(dP, 16),
new BigInteger(dQ, 16),
new BigInteger(qInv, 16));
};
/**
* Converts a private key to an ASN.1 RSAPrivateKey.
*
* @param key the private key.
*
* @return the ASN.1 representation of an RSAPrivateKey.
*/
pki.privateKeyToAsn1 = pki.privateKeyToRSAPrivateKey = function(key) {
// RSAPrivateKey
return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
// version (0 = only 2 primes, 1 multiple primes)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
asn1.integerToDer(0).getBytes()),
// modulus (n)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.n)),
// publicExponent (e)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.e)),
// privateExponent (d)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.d)),
// privateKeyPrime1 (p)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.p)),
// privateKeyPrime2 (q)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.q)),
// privateKeyExponent1 (dP)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.dP)),
// privateKeyExponent2 (dQ)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.dQ)),
// coefficient (qInv)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.qInv))
]);
};
/**
* Converts a public key from an ASN.1 SubjectPublicKeyInfo or RSAPublicKey.
*
* @param obj the asn1 representation of a SubjectPublicKeyInfo or RSAPublicKey.
*
* @return the public key.
*/
pki.publicKeyFromAsn1 = function(obj) {
// get SubjectPublicKeyInfo
var capture = {};
var errors = [];
if(asn1.validate(obj, publicKeyValidator, capture, errors)) {
// get oid
var oid = asn1.derToOid(capture.publicKeyOid);
if(oid !== pki.oids.rsaEncryption) {
var error = new Error('Cannot read public key. Unknown OID.');
error.oid = oid;
throw error;
}
obj = capture.rsaPublicKey;
}
// get RSA params
errors = [];
if(!asn1.validate(obj, rsaPublicKeyValidator, capture, errors)) {
var error = new Error('Cannot read public key. ' +
'ASN.1 object does not contain an RSAPublicKey.');
error.errors = errors;
throw error;
}
// FIXME: inefficient, get a BigInteger that uses byte strings
var n = forge.util.createBuffer(capture.publicKeyModulus).toHex();
var e = forge.util.createBuffer(capture.publicKeyExponent).toHex();
// set public key
return pki.setRsaPublicKey(
new BigInteger(n, 16),
new BigInteger(e, 16));
};
/**
* Converts a public key to an ASN.1 SubjectPublicKeyInfo.
*
* @param key the public key.
*
* @return the asn1 representation of a SubjectPublicKeyInfo.
*/
pki.publicKeyToAsn1 = pki.publicKeyToSubjectPublicKeyInfo = function(key) {
// SubjectPublicKeyInfo
return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
// AlgorithmIdentifier
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
// algorithm
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,
asn1.oidToDer(pki.oids.rsaEncryption).getBytes()),
// parameters (null)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.NULL, false, '')
]),
// subjectPublicKey
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.BITSTRING, false, [
pki.publicKeyToRSAPublicKey(key)
])
]);
};
/**
* Converts a public key to an ASN.1 RSAPublicKey.
*
* @param key the public key.
*
* @return the asn1 representation of a RSAPublicKey.
*/
pki.publicKeyToRSAPublicKey = function(key) {
// RSAPublicKey
return asn1.create(asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
// modulus (n)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.n)),
// publicExponent (e)
asn1.create(asn1.Class.UNIVERSAL, asn1.Type.INTEGER, false,
_bnToBytes(key.e))
]);
};
/**
* Encodes a message using PKCS#1 v1.5 padding.
*
* @param m the message to encode.
* @param key the RSA key to use.
* @param bt the block type to use, i.e. either 0x01 (for signing) or 0x02
* (for encryption).
*
* @return the padded byte buffer.
*/
function _encodePkcs1_v1_5(m, key, bt) {
var eb = forge.util.createBuffer();
// get the length of the modulus in bytes
var k = Math.ceil(key.n.bitLength() / 8);
/* use PKCS#1 v1.5 padding */
if(m.length > (k - 11)) {
var error = new Error('Message is too long for PKCS#1 v1.5 padding.');
error.length = m.length;
error.max = k - 11;
throw error;
}
/* A block type BT, a padding string PS, and the data D shall be
formatted into an octet string EB, the encryption block:
EB = 00 || BT || PS || 00 || D
The block type BT shall be a single octet indicating the structure of
the encryption block. For this version of the document it shall have
value 00, 01, or 02. For a private-key operation, the block type
shall be 00 or 01. For a public-key operation, it shall be 02.
The padding string PS shall consist of k-3-||D|| octets. For block
type 00, the octets shall have value 00; for block type 01, they
shall have value FF; and for block type 02, they shall be
pseudorandomly generated and nonzero. This makes the length of the
encryption block EB equal to k. */
// build the encryption block
eb.putByte(0x00);
eb.putByte(bt);
// create the padding
var padNum = k - 3 - m.length;
var padByte;
// private key op
if(bt === 0x00 || bt === 0x01) {
padByte = (bt === 0x00) ? 0x00 : 0xFF;
for(var i = 0; i < padNum; ++i) {
eb.putByte(padByte);
}
} else {
// public key op
// pad with random non-zero values
while(padNum > 0) {
var numZeros = 0;
var padBytes = forge.random.getBytes(padNum);
for(var i = 0; i < padNum; ++i) {
padByte = padBytes.charCodeAt(i);
if(padByte === 0) {
++numZeros;
} else {
eb.putByte(padByte);
}
}
padNum = numZeros;
}
}
// zero followed by message
eb.putByte(0x00);
eb.putBytes(m);
return eb;
}
/**
* Decodes a message using PKCS#1 v1.5 padding.
*
* @param em the message to decode.
* @param key the RSA key to use.
* @param pub true if the key is a public key, false if it is private.
* @param ml the message length, if specified.
*
* @return the decoded bytes.
*/
function _decodePkcs1_v1_5(em, key, pub, ml) {
// get the length of the modulus in bytes
var k = Math.ceil(key.n.bitLength() / 8);
/* It is an error if any of the following conditions occurs:
1. The encryption block EB cannot be parsed unambiguously.
2. The padding string PS consists of fewer than eight octets
or is inconsisent with the block type BT.
3. The decryption process is a public-key operation and the block
type BT is not 00 or 01, or the decryption process is a
private-key operation and the block type is not 02.
*/
// parse the encryption block
var eb = forge.util.createBuffer(em);
var first = eb.getByte();
var bt = eb.getByte();
if(first !== 0x00 ||
(pub && bt !== 0x00 && bt !== 0x01) ||
(!pub && bt != 0x02) ||
(pub && bt === 0x00 && typeof(ml) === 'undefined')) {
throw new Error('Encryption block is invalid.');
}
var padNum = 0;
if(bt === 0x00) {
// check all padding bytes for 0x00
padNum = k - 3 - ml;
for(var i = 0; i < padNum; ++i) {
if(eb.getByte() !== 0x00) {
throw new Error('Encryption block is invalid.');
}
}
} else if(bt === 0x01) {
// find the first byte that isn't 0xFF, should be after all padding
padNum = 0;
while(eb.length() > 1) {
if(eb.getByte() !== 0xFF) {
--eb.read;
break;
}
++padNum;
}
} else if(bt === 0x02) {
// look for 0x00 byte
padNum = 0;
while(eb.length() > 1) {
if(eb.getByte() === 0x00) {
--eb.read;
break;
}
++padNum;
}
}
// zero must be 0x00 and padNum must be (k - 3 - message length)
var zero = eb.getByte();
if(zero !== 0x00 || padNum !== (k - 3 - eb.length())) {
throw new Error('Encryption block is invalid.');
}
return eb.getBytes();
}
/**
* Runs the key-generation algorithm asynchronously, either in the background
* via Web Workers, or using the main thread and setImmediate.
*
* @param state the key-pair generation state.
* @param [options] options for key-pair generation:
* workerScript the worker script URL.
* workers the number of web workers (if supported) to use,
* (default: 2, -1 to use estimated cores minus one).
* workLoad the size of the work load, ie: number of possible prime
* numbers for each web worker to check per work assignment,
* (default: 100).
* @param callback(err, keypair) called once the operation completes.
*/
function _generateKeyPair(state, options, callback) {
if(typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
var opts = {
algorithm: {
name: options.algorithm || 'PRIMEINC',
options: {
workers: options.workers || 2,
workLoad: options.workLoad || 100,
workerScript: options.workerScript
}
}
};
if('prng' in options) {
opts.prng = options.prng;
}
generate();
function generate() {
// find p and then q (done in series to simplify)
getPrime(state.pBits, function(err, num) {
if(err) {
return callback(err);
}
state.p = num;
if(state.q !== null) {
return finish(err, state.q);
}
getPrime(state.qBits, finish);
});
}
function getPrime(bits, callback) {
forge.prime.generateProbablePrime(bits, opts, callback);
}
function finish(err, num) {
if(err) {
return callback(err);
}
// set q
state.q = num;
// ensure p is larger than q (swap them if not)
if(state.p.compareTo(state.q) < 0) {
var tmp = state.p;
state.p = state.q;
state.q = tmp;
}
// ensure p is coprime with e
if(state.p.subtract(BigInteger.ONE).gcd(state.e)
.compareTo(BigInteger.ONE) !== 0) {
state.p = null;
generate();
return;
}
// ensure q is coprime with e
if(state.q.subtract(BigInteger.ONE).gcd(state.e)
.compareTo(BigInteger.ONE) !== 0) {
state.q = null;
getPrime(state.qBits, finish);
return;
}
// compute phi: (p - 1)(q - 1) (Euler's totient function)
state.p1 = state.p.subtract(BigInteger.ONE);
state.q1 = state.q.subtract(BigInteger.ONE);
state.phi = state.p1.multiply(state.q1);
// ensure e and phi are coprime
if(state.phi.gcd(state.e).compareTo(BigInteger.ONE) !== 0) {
// phi and e aren't coprime, so generate a new p and q
state.p = state.q = null;
generate();
return;
}
// create n, ensure n is has the right number of bits
state.n = state.p.multiply(state.q);
if(state.n.bitLength() !== state.bits) {
// failed, get new q
state.q = null;
getPrime(state.qBits, finish);
return;
}
// set keys
var d = state.e.modInverse(state.phi);
state.keys = {
privateKey: pki.rsa.setPrivateKey(
state.n, state.e, d, state.p, state.q,
d.mod(state.p1), d.mod(state.q1),
state.q.modInverse(state.p)),
publicKey: pki.rsa.setPublicKey(state.n, state.e)
};
callback(null, state.keys);
}
}
/**
* Converts a positive BigInteger into 2's-complement big-endian bytes.
*
* @param b the big integer to convert.
*
* @return the bytes.
*/
function _bnToBytes(b) {
// prepend 0x00 if first byte >= 0x80
var hex = b.toString(16);
if(hex[0] >= '8') {
hex = '00' + hex;
}
return forge.util.hexToBytes(hex);
}
/**
* Returns the required number of Miller-Rabin tests to generate a
* prime with an error probability of (1/2)^80.
*
* See Handbook of Applied Cryptography Chapter 4, Table 4.4.
*
* @param bits the bit size.
*
* @return the required number of iterations.
*/
function _getMillerRabinTests(bits) {
if(bits <= 100) return 27;
if(bits <= 150) return 18;
if(bits <= 200) return 15;
if(bits <= 250) return 12;
if(bits <= 300) return 9;
if(bits <= 350) return 8;
if(bits <= 400) return 7;
if(bits <= 500) return 6;
if(bits <= 600) return 5;
if(bits <= 800) return 4;
if(bits <= 1250) return 3;
return 2;
}
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'rsa';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define([
'require',
'module',
'./asn1',
'./jsbn',
'./oids',
'./pkcs1',
'./prime',
'./random',
'./util'
], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
/**
* Cipher base API.
*
* @author Dave Longley
*
* Copyright (c) 2010-2014 Digital Bazaar, Inc.
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
forge.cipher = forge.cipher || {};
// registered algorithms
forge.cipher.algorithms = forge.cipher.algorithms || {};
/**
* Creates a cipher object that can be used to encrypt data using the given
* algorithm and key. The algorithm may be provided as a string value for a
* previously registered algorithm or it may be given as a cipher algorithm
* API object.
*
* @param algorithm the algorithm to use, either a string or an algorithm API
* object.
* @param key the key to use, as a binary-encoded string of bytes or a
* byte buffer.
*
* @return the cipher.
*/
forge.cipher.createCipher = function(algorithm, key) {
var api = algorithm;
if(typeof api === 'string') {
api = forge.cipher.getAlgorithm(api);
if(api) {
api = api();
}
}
if(!api) {
throw new Error('Unsupported algorithm: ' + algorithm);
}
// assume block cipher
return new forge.cipher.BlockCipher({
algorithm: api,
key: key,
decrypt: false
});
};
/**
* Creates a decipher object that can be used to decrypt data using the given
* algorithm and key. The algorithm may be provided as a string value for a
* previously registered algorithm or it may be given as a cipher algorithm
* API object.
*
* @param algorithm the algorithm to use, either a string or an algorithm API
* object.
* @param key the key to use, as a binary-encoded string of bytes or a
* byte buffer.
*
* @return the cipher.
*/
forge.cipher.createDecipher = function(algorithm, key) {
var api = algorithm;
if(typeof api === 'string') {
api = forge.cipher.getAlgorithm(api);
if(api) {
api = api();
}
}
if(!api) {
throw new Error('Unsupported algorithm: ' + algorithm);
}
// assume block cipher
return new forge.cipher.BlockCipher({
algorithm: api,
key: key,
decrypt: true
});
};
/**
* Registers an algorithm by name. If the name was already registered, the
* algorithm API object will be overwritten.
*
* @param name the name of the algorithm.
* @param algorithm the algorithm API object.
*/
forge.cipher.registerAlgorithm = function(name, algorithm) {
name = name.toUpperCase();
forge.cipher.algorithms[name] = algorithm;
};
/**
* Gets a registered algorithm by name.
*
* @param name the name of the algorithm.
*
* @return the algorithm, if found, null if not.
*/
forge.cipher.getAlgorithm = function(name) {
name = name.toUpperCase();
if(name in forge.cipher.algorithms) {
return forge.cipher.algorithms[name];
}
return null;
};
var BlockCipher = forge.cipher.BlockCipher = function(options) {
this.algorithm = options.algorithm;
this.mode = this.algorithm.mode;
this.blockSize = this.mode.blockSize;
this._finish = false;
this._input = null;
this.output = null;
this._op = options.decrypt ? this.mode.decrypt : this.mode.encrypt;
this._decrypt = options.decrypt;
this.algorithm.initialize(options);
};
/**
* Starts or restarts the encryption or decryption process, whichever
* was previously configured.
*
* For non-GCM mode, the IV may be a binary-encoded string of bytes, an array
* of bytes, a byte buffer, or an array of 32-bit integers. If the IV is in
* bytes, then it must be Nb (16) bytes in length. If the IV is given in as
* 32-bit integers, then it must be 4 integers long.
*
* Note: an IV is not required or used in ECB mode.
*
* For GCM-mode, the IV must be given as a binary-encoded string of bytes or
* a byte buffer. The number of bytes should be 12 (96 bits) as recommended
* by NIST SP-800-38D but another length may be given.
*
* @param options the options to use:
* iv the initialization vector to use as a binary-encoded string of
* bytes, null to reuse the last ciphered block from a previous
* update() (this "residue" method is for legacy support only).
* additionalData additional authentication data as a binary-encoded
* string of bytes, for 'GCM' mode, (default: none).
* tagLength desired length of authentication tag, in bits, for
* 'GCM' mode (0-128, default: 128).
* tag the authentication tag to check if decrypting, as a
* binary-encoded string of bytes.
* output the output the buffer to write to, null to create one.
*/
BlockCipher.prototype.start = function(options) {
options = options || {};
var opts = {};
for(var key in options) {
opts[key] = options[key];
}
opts.decrypt = this._decrypt;
this._finish = false;
this._input = forge.util.createBuffer();
this.output = options.output || forge.util.createBuffer();
this.mode.start(opts);
};
/**
* Updates the next block according to the cipher mode.
*
* @param input the buffer to read from.
*/
BlockCipher.prototype.update = function(input) {
if(input) {
// input given, so empty it into the input buffer
this._input.putBuffer(input);
}
// do cipher operation until it needs more input and not finished
while(!this._op.call(this.mode, this._input, this.output, this._finish) &&
!this._finish) {}
// free consumed memory from input buffer
this._input.compact();
};
/**
* Finishes encrypting or decrypting.
*
* @param pad a padding function to use in CBC mode, null for default,
* signature(blockSize, buffer, decrypt).
*
* @return true if successful, false on error.
*/
BlockCipher.prototype.finish = function(pad) {
// backwards-compatibility w/deprecated padding API
// Note: will overwrite padding functions even after another start() call
if(pad && (this.mode.name === 'ECB' || this.mode.name === 'CBC')) {
this.mode.pad = function(input) {
return pad(this.blockSize, input, false);
};
this.mode.unpad = function(output) {
return pad(this.blockSize, output, true);
};
}
// build options for padding and afterFinish functions
var options = {};
options.decrypt = this._decrypt;
// get # of bytes that won't fill a block
options.overflow = this._input.length() % this.blockSize;
if(!this._decrypt && this.mode.pad) {
if(!this.mode.pad(this._input, options)) {
return false;
}
}
// do final update
this._finish = true;
this.update();
if(this._decrypt && this.mode.unpad) {
if(!this.mode.unpad(this.output, options)) {
return false;
}
}
if(this.mode.afterFinish) {
if(!this.mode.afterFinish(this.output, options)) {
return false;
}
}
return true;
};
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'cipher';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define(['require', 'module', './util'], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
/**
* Message Digest Algorithm 5 with 128-bit digest (MD5) implementation.
*
* @author Dave Longley
*
* Copyright (c) 2010-2014 Digital Bazaar, Inc.
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
var md5 = forge.md5 = forge.md5 || {};
forge.md = forge.md || {};
forge.md.algorithms = forge.md.algorithms || {};
forge.md.md5 = forge.md.algorithms.md5 = md5;
/**
* Creates an MD5 message digest object.
*
* @return a message digest object.
*/
md5.create = function() {
// do initialization as necessary
if(!_initialized) {
_init();
}
// MD5 state contains four 32-bit integers
var _state = null;
// input buffer
var _input = forge.util.createBuffer();
// used for word storage
var _w = new Array(16);
// message digest object
var md = {
algorithm: 'md5',
blockLength: 64,
digestLength: 16,
// 56-bit length of message so far (does not including padding)
messageLength: 0,
// true 64-bit message length as two 32-bit ints
messageLength64: [0, 0]
};
/**
* Starts the digest.
*
* @return this digest object.
*/
md.start = function() {
md.messageLength = 0;
md.messageLength64 = [0, 0];
_input = forge.util.createBuffer();
_state = {
h0: 0x67452301,
h1: 0xEFCDAB89,
h2: 0x98BADCFE,
h3: 0x10325476
};
return md;
};
// start digest automatically for first time
md.start();
/**
* Updates the digest with the given message input. The given input can
* treated as raw input (no encoding will be applied) or an encoding of
* 'utf8' maybe given to encode the input using UTF-8.
*
* @param msg the message input to update with.
* @param encoding the encoding to use (default: 'raw', other: 'utf8').
*
* @return this digest object.
*/
md.update = function(msg, encoding) {
if(encoding === 'utf8') {
msg = forge.util.encodeUtf8(msg);
}
// update message length
md.messageLength += msg.length;
md.messageLength64[0] += (msg.length / 0x100000000) >>> 0;
md.messageLength64[1] += msg.length >>> 0;
// add bytes to input buffer
_input.putBytes(msg);
// process bytes
_update(_state, _w, _input);
// compact input buffer every 2K or if empty
if(_input.read > 2048 || _input.length() === 0) {
_input.compact();
}
return md;
};
/**
* Produces the digest.
*
* @return a byte buffer containing the digest value.
*/
md.digest = function() {
/* Note: Here we copy the remaining bytes in the input buffer and
add the appropriate MD5 padding. Then we do the final update
on a copy of the state so that if the user wants to get
intermediate digests they can do so. */
/* Determine the number of bytes that must be added to the message
to ensure its length is congruent to 448 mod 512. In other words,
the data to be digested must be a multiple of 512 bits (or 128 bytes).
This data includes the message, some padding, and the length of the
message. Since the length of the message will be encoded as 8 bytes (64
bits), that means that the last segment of the data must have 56 bytes
(448 bits) of message and padding. Therefore, the length of the message
plus the padding must be congruent to 448 mod 512 because
512 - 128 = 448.
In order to fill up the message length it must be filled with
padding that begins with 1 bit followed by all 0 bits. Padding
must *always* be present, so if the message length is already
congruent to 448 mod 512, then 512 padding bits must be added. */
// 512 bits == 64 bytes, 448 bits == 56 bytes, 64 bits = 8 bytes
// _padding starts with 1 byte with first bit is set in it which
// is byte value 128, then there may be up to 63 other pad bytes
var padBytes = forge.util.createBuffer();
padBytes.putBytes(_input.bytes());
// 64 - (remaining msg + 8 bytes msg length) mod 64
padBytes.putBytes(
_padding.substr(0, 64 - ((md.messageLength64[1] + 8) & 0x3F)));
/* Now append length of the message. The length is appended in bits
as a 64-bit number in little-endian order. Since we store the length in
bytes, we must multiply the 64-bit length by 8 (or left shift by 3). */
padBytes.putInt32Le(md.messageLength64[1] << 3);
padBytes.putInt32Le(
(md.messageLength64[0] << 3) | (md.messageLength64[0] >>> 28));
var s2 = {
h0: _state.h0,
h1: _state.h1,
h2: _state.h2,
h3: _state.h3
};
_update(s2, _w, padBytes);
var rval = forge.util.createBuffer();
rval.putInt32Le(s2.h0);
rval.putInt32Le(s2.h1);
rval.putInt32Le(s2.h2);
rval.putInt32Le(s2.h3);
return rval;
};
return md;
};
// padding, constant tables for calculating md5
var _padding = null;
var _g = null;
var _r = null;
var _k = null;
var _initialized = false;
/**
* Initializes the constant tables.
*/
function _init() {
// create padding
_padding = String.fromCharCode(128);
_padding += forge.util.fillString(String.fromCharCode(0x00), 64);
// g values
_g = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1, 6, 11, 0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12,
5, 8, 11, 14, 1, 4, 7, 10, 13, 0, 3, 6, 9, 12, 15, 2,
0, 7, 14, 5, 12, 3, 10, 1, 8, 15, 6, 13, 4, 11, 2, 9];
// rounds table
_r = [
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21];
// get the result of abs(sin(i + 1)) as a 32-bit integer
_k = new Array(64);
for(var i = 0; i < 64; ++i) {
_k[i] = Math.floor(Math.abs(Math.sin(i + 1)) * 0x100000000);
}
// now initialized
_initialized = true;
}
/**
* Updates an MD5 state with the given byte buffer.
*
* @param s the MD5 state to update.
* @param w the array to use to store words.
* @param bytes the byte buffer to update with.
*/
function _update(s, w, bytes) {
// consume 512 bit (64 byte) chunks
var t, a, b, c, d, f, r, i;
var len = bytes.length();
while(len >= 64) {
// initialize hash value for this chunk
a = s.h0;
b = s.h1;
c = s.h2;
d = s.h3;
// round 1
for(i = 0; i < 16; ++i) {
w[i] = bytes.getInt32Le();
f = d ^ (b & (c ^ d));
t = (a + f + _k[i] + w[i]);
r = _r[i];
a = d;
d = c;
c = b;
b += (t << r) | (t >>> (32 - r));
}
// round 2
for(; i < 32; ++i) {
f = c ^ (d & (b ^ c));
t = (a + f + _k[i] + w[_g[i]]);
r = _r[i];
a = d;
d = c;
c = b;
b += (t << r) | (t >>> (32 - r));
}
// round 3
for(; i < 48; ++i) {
f = b ^ c ^ d;
t = (a + f + _k[i] + w[_g[i]]);
r = _r[i];
a = d;
d = c;
c = b;
b += (t << r) | (t >>> (32 - r));
}
// round 4
for(; i < 64; ++i) {
f = c ^ (b | ~d);
t = (a + f + _k[i] + w[_g[i]]);
r = _r[i];
a = d;
d = c;
c = b;
b += (t << r) | (t >>> (32 - r));
}
// update hash state
s.h0 = (s.h0 + a) | 0;
s.h1 = (s.h1 + b) | 0;
s.h2 = (s.h2 + c) | 0;
s.h3 = (s.h3 + d) | 0;
len -= 64;
}
}
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'md5';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define(['require', 'module', './util'], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
var SubtleCrypto = function() {};
SubtleCrypto = stjs.extend(SubtleCrypto, null, [], function(constructor, prototype) {
prototype.encrypt = function(algorithm, key, data) {
return null;
};
prototype.decrypt = function(algorithm, key, data) {
return null;
};
prototype.sign = function(algorithm, key, data) {
return null;
};
prototype.verify = function(algorithm, key, signature, data) {
return null;
};
prototype.generateKey = function(algorithm, extractable, keyUsages) {
return null;
};
prototype.deriveBits = function(algorithm, baseKey, length) {
return null;
};
prototype.importKey = function(format, keyData, algorithm, extractable, keyUsages) {
return null;
};
}, {}, {});
/**
* Javascript implementation of a basic Public Key Infrastructure, including
* support for RSA public and private keys.
*
* @author Dave Longley
*
* Copyright (c) 2010-2013 Digital Bazaar, Inc.
*/
(function() {
/* ########## Begin module implementation ########## */
function initModule(forge) {
// shortcut for asn.1 API
var asn1 = forge.asn1;
/* Public Key Infrastructure (PKI) implementation. */
var pki = forge.pki = forge.pki || {};
/**
* NOTE: THIS METHOD IS DEPRECATED. Use pem.decode() instead.
*
* Converts PEM-formatted data to DER.
*
* @param pem the PEM-formatted data.
*
* @return the DER-formatted data.
*/
pki.pemToDer = function(pem) {
var msg = forge.pem.decode(pem)[0];
if(msg.procType && msg.procType.type === 'ENCRYPTED') {
throw new Error('Could not convert PEM to DER; PEM is encrypted.');
}
return forge.util.createBuffer(msg.body);
};
/**
* Converts an RSA private key from PEM format.
*
* @param pem the PEM-formatted private key.
*
* @return the private key.
*/
pki.privateKeyFromPem = function(pem) {
var msg = forge.pem.decode(pem)[0];
if(msg.type !== 'PRIVATE KEY' && msg.type !== 'RSA PRIVATE KEY') {
var error = new Error('Could not convert private key from PEM; PEM ' +
'header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');
error.headerType = msg.type;
throw error;
}
if(msg.procType && msg.procType.type === 'ENCRYPTED') {
throw new Error('Could not convert private key from PEM; PEM is encrypted.');
}
// convert DER to ASN.1 object
var obj = asn1.fromDer(msg.body);
return pki.privateKeyFromAsn1(obj);
};
/**
* Converts an RSA private key to PEM format.
*
* @param key the private key.
* @param maxline the maximum characters per line, defaults to 64.
*
* @return the PEM-formatted private key.
*/
pki.privateKeyToPem = function(key, maxline) {
// convert to ASN.1, then DER, then PEM-encode
var msg = {
type: 'RSA PRIVATE KEY',
body: asn1.toDer(pki.privateKeyToAsn1(key)).getBytes()
};
return forge.pem.encode(msg, {maxline: maxline});
};
/**
* Converts a PrivateKeyInfo to PEM format.
*
* @param pki the PrivateKeyInfo.
* @param maxline the maximum characters per line, defaults to 64.
*
* @return the PEM-formatted private key.
*/
pki.privateKeyInfoToPem = function(pki, maxline) {
// convert to DER, then PEM-encode
var msg = {
type: 'PRIVATE KEY',
body: asn1.toDer(pki).getBytes()
};
return forge.pem.encode(msg, {maxline: maxline});
};
} // end module implementation
/* ########## Begin module wrapper ########## */
var name = 'pki';
if(typeof define !== 'function') {
// NodeJS -> AMD
if(typeof module === 'object' && module.exports) {
var nodeJS = true;
define = function(ids, factory) {
factory(require, module);
};
} else {
// <script>
if(typeof forge === 'undefined') {
forge = {};
}
return initModule(forge);
}
}
// AMD
var deps;
var defineFunc = function(require, module) {
module.exports = function(forge) {
var mods = deps.map(function(dep) {
return require(dep);
}).concat(initModule);
// handle circular dependencies
forge = forge || {};
forge.defined = forge.defined || {};
if(forge.defined[name]) {
return forge[name];
}
forge.defined[name] = true;
for(var i = 0; i < mods.length; ++i) {
mods[i](forge);
}
return forge[name];
};
};
var tmpDefine = define;
define = function(ids, factory) {
deps = (typeof ids === 'string') ? factory.slice(2) : ids.slice(2);
if(nodeJS) {
delete define;
return tmpDefine.apply(null, Array.prototype.slice.call(arguments, 0));
}
define = tmpDefine;
return define.apply(null, Array.prototype.slice.call(arguments, 0));
};
define([
'require',
'module',
'./asn1',
'./oids',
'./pbe',
'./pem',
'./pbkdf2',
'./pkcs12',
'./pss',
'./rsa',
'./util',
'./x509'
], function() {
defineFunc.apply(null, Array.prototype.slice.call(arguments, 0));
});
})();
/**
* Helper methods for performing RSA Encryption methods. Uses Optimal Asymmetric
* Encryption Padding (OAEP) encryption and decryption. Uses RSA SSA PKCS#1 v1.5
* (RSASSA-PKCS1-V1_5) signing and verifying with UTF8 encoding.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcRsaOaep
*/
var EcRsaOaep = function() {};
EcRsaOaep = stjs.extend(EcRsaOaep, null, [], function(constructor, prototype) {
/**
* Encrypts a block of plaintext (no more than 256 bytes) with a public key
* using RSA OAEP encryption. Returns a base64 encoded ciphertext.
*
* @param {EcPk} pk Public Key.
* @param {string} plaintext Plaintext. Does not perform encoding.
* @method encrypt
* @static
*/
constructor.encrypt = function(pk, plaintext) {
if ($ == null) {
return rsaEncrypt(plaintext, pk.toPem());
}
return forge.util.encode64(pk.pk.encrypt(plaintext, "RSA-OAEP"));
};
/**
* Decrypts a block of ciphertext (no more than 256 bytes) with a private
* key using RSA OAEP encryption. Returns a unencoded plaintext.
*
* @param {EcPpk} ppk Public private keypair.
* @param {string} ciphertext Ciphertext.
* @return {string} Unencoded plaintext.
* @method decrypt
* @static
*/
constructor.decrypt = function(ppk, ciphertext) {
if (EcCrypto.caching) {
var cacheGet = null;
cacheGet = (EcCrypto.decryptionCache)[ppk.toPem() + ciphertext];
if (cacheGet != null) {
return cacheGet;
}
}
var result;
if ($ == null) {
result = rsaDecrypt(ciphertext, ppk.toPem());
} else {
result = ppk.ppk.decrypt(forge.util.decode64(ciphertext), "RSA-OAEP");
}
if (EcCrypto.caching) {
(EcCrypto.decryptionCache)[ppk.toPem() + ciphertext] = result;
}
return result;
};
/**
* Creates a signature for the provided text using the public private
* keypair. May be verified with the public key. Uses SHA1 hash with a UTF8
* decoding of the text. Returns base64 encoded signature.
*
* @param {EcPpk} ppk Public private keypair.
* @param {string} text Text to sign.
* @return Base64 encoded signature.
* @method sign
* @static
*/
constructor.sign = function(ppk, text) {
if ($ == null) {
return rsaSign(text, ppk.toPem());
}
var s = forge.md.sha1.create();
s.update(text, "utf8");
return forge.util.encode64(ppk.ppk.sign(s));
};
/**
* Creates a signature for the provided text using the public private
* keypair. May be verified with the public key. Uses SHA256 hash with a
* UTF8 decoding of the text. Returns base64 encoded signature.
*
* @param {EcPpk} ppk Public private keypair.
* @param {string} text Text to sign.
* @return Base64 encoded signature.
* @method signSha256
* @static
*/
constructor.signSha256 = function(ppk, text) {
var s = forge.md.sha256.create();
s.update(text, "utf8");
return forge.util.encode64(ppk.ppk.sign(s));
};
/**
* Verifies the integrity of the provided text using a signature and a
* public key. Uses SHA1 hash with a UTF8 decoding of the text.
*
* @param {EcPk} pk Public key.
* @param {string} text Text to verify.
* @param {string} signature Base64 encoded signature.
* @return True IFF the signature is valid.
* @static
* @method verify
*/
constructor.verify = function(pk, text, signature) {
if ($ == null) {
return rsaVerify(signature, pk.toPem(), text);
}
var s = forge.md.sha1.create();
s.update(text, "utf8");
try {
return pk.verify(s.digest().bytes(), forge.util.decode64(signature));
}catch (ex) {
return false;
}
};
}, {}, {});
/**
* Helper classes for dealing with RSA Private Keys.
*
* @author fritz.ray@eduworks.com
* @class EcPpk
* @module com.eduworks.ec
*/
var EcPpk = function() {};
EcPpk = stjs.extend(EcPpk, null, [], function(constructor, prototype) {
prototype.jwk = null;
prototype.key = null;
prototype.signKey = null;
prototype.ppk = null;
/**
* Decodes a PEM encoded PrivateKeyInfo (PKCS#8) or RSAPrivateKey (PKCS#1) formatted RSA Public Key.
* (In case you were curious.)
*
* @param {string} pem PEM as a string.
* @return {EcPk} Object used to perform public key operations.
* @method fromPem
* @static
*/
constructor.fromPem = function(pem) {
var pk = new EcPpk();
try {
pk.ppk = forge.pki.privateKeyFromPem(pem);
}catch (ex) {
return null;
}
return pk;
};
/**
* Generates an RSA Keypair using web workers.
*
* @param {function(EcPpk)} callback Method called when the keypair is generated.
* @method generateKeyAsync
* @static
*/
constructor.generateKeyAsync = function(callback) {
var o = new Object();
(o)["workers"] = -1;
forge.pki.rsa.generateKeyPair(o, function(err, keypair) {
var ppk = new EcPpk();
ppk.ppk = keypair.privateKey;
callback(ppk);
});
};
/**
* Generates an RSA Keypair synchronously. Can take a while.
*
* @return {EcPpk} Public private keypair.
* @method generateKey
* @static
*/
constructor.generateKey = function() {
var o = new Object();
(o)["workers"] = -1;
var keypair = forge.pki.rsa.generateKeyPair(o, null);
var ppk = new EcPpk();
ppk.ppk = keypair.privateKey;
return ppk;
};
/**
* Returns true iff the PEM forms of the public private keypair match.
* Can also match against a public key if the public portion of the keypair match.
*
* @param {EcPpk|EcPk} Key to compare to.
* @return boolean If they match.
* @method equals
*/
prototype.equals = function(obj) {
if (stjs.isInstanceOf(obj.constructor, EcPpk))
return this.toPem().equals((obj).toPem());
if (stjs.isInstanceOf(obj.constructor, EcPk))
return this.toPk().toPem().equals((obj).toPem());
return Object.prototype.equals.call(this, obj);
};
/**
* Encodes the private key into a PEM encoded RSAPrivateKey (PKCS#1) formatted RSA Public Key.
* (In case you were curious.)
*
* @return {string} PEM encoded public key without whitespace.
* @method toPem
*/
prototype.toPem = function() {
return forge.pki.privateKeyToPem(this.ppk).replaceAll("\r?\n", "");
};
/**
* Encodes the private key into a PEM encoded RSAPrivateKey (PKCS#1) formatted RSA Public Key.
* (In case you were curious.)
*
* @return {string} PEM encoded public key without whitespace.
* @method toPkcs1Pem
*/
prototype.toPkcs1Pem = function() {
return forge.pki.privateKeyToPem(this.ppk).replaceAll("\r?\n", "");
};
/**
* Encodes the private key into a PEM encoded PrivateKeyInfo (PKCS#8) formatted RSA Public Key.
* (In case you were curious.)
*
* @return {string} PEM encoded public key without whitespace.
* @method toPkcs8Pem
*/
prototype.toPkcs8Pem = function() {
return forge.pki.privateKeyInfoToPem(forge.pki.wrapRsaPrivateKey(forge.pki.privateKeyToAsn1(this.ppk))).replaceAll("\r?\n", "");
};
prototype.toJwk = function() {
if (this.jwk == null)
this.jwk = pemJwk.pem2jwk(forge.pki.privateKeyToPem(this.ppk));
return this.jwk;
};
prototype.toPkcs8 = function() {
return forge.pki.wrapRsaPrivateKey(forge.pki.privateKeyToAsn1(this.ppk));
};
/**
* Extracts the public key portion from the public private keypair.
*
* @return {EcPk} Public Key Helper.
* @method toPk
*/
prototype.toPk = function() {
var pk = new EcPk();
pk.pk = forge.pki.rsa.setPublicKey(this.ppk.n, this.ppk.e);
return pk;
};
/**
* Returns true if this PPK is in an array of PPKs.
*
* @param {Array<EcPpk>} ppks Array of ppks
* @return true iff this PPK in ppks.
* @method inArray
*/
prototype.inArray = function(ppks) {
for (var i = 0; i < ppks.length; i++) {
if (ppks[i].equals(this))
return true;
}
return false;
};
}, {jwk: "Object", key: "CryptoKey", signKey: "CryptoKey", ppk: "forge.ppk"}, {});
/**
* Encrypts data synchronously using AES-256-CTR. Requires secret and iv to be 32 bytes.
* Output is encoded in base64 for easier handling.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcAesCtr
*/
var EcAesCtr = function() {};
EcAesCtr = stjs.extend(EcAesCtr, null, [], function(constructor, prototype) {
/**
* Encrypts plaintext using AES-256-CTR.
* Plaintext is treated as as a sequence of bytes, does not perform UTF8 decoding.
* Returns base64 encoded ciphertext.
*
* @param {string} plaintext Text to encrypt.
* @param {string} secret Secret to use to encrypt.
* @param {string} iv Initialization Vector to use to encrypt.
* @return {string} Ciphertext encoded using base64.
* @method encrypt
* @static
*/
constructor.encrypt = function(plaintext, secret, iv) {
if ($ == null && forge.util.decode64(secret).length == 16 && forge.util.decode64(iv).length == 16)
return aesEncrypt(plaintext, iv, secret);
var c = forge.cipher.createCipher("AES-CTR", forge.util.decode64(secret));
c.start(new EcAesParameters(iv));
c.update(forge.util.createBuffer(plaintext));
c.finish();
var encrypted = c.output;
return forge.util.encode64(encrypted.bytes());
};
/**
* Decrypts ciphertext using AES-256-CTR.
* Ciphertext must be base64 encoded ciphertext.
* Returns plaintext as a string (Sequence of bytes, no encoding).
*
* @param {string} ciphertext Ciphertext to decrypt.
* @param {string} secret Secret to use to decrypt.
* @param {string} iv Initialization Vector to use to decrypt.
* @return {string} Plaintext with no encoding.
* @method decrypt
* @static
*/
constructor.decrypt = function(ciphertext, secret, iv) {
if (EcCrypto.caching) {
var cacheGet = (EcCrypto.decryptionCache)[secret + iv + ciphertext];
if (cacheGet != null)
return cacheGet;
}
if ($ == null && forge.util.decode64(secret).length == 16 && forge.util.decode64(iv).length == 16) {
var result = aesDecrypt(ciphertext, iv, secret);
if (EcCrypto.caching)
(EcCrypto.decryptionCache)[secret + iv + ciphertext] = result;
return result;
}
var c = forge.cipher.createDecipher("AES-CTR", forge.util.decode64(secret));
c.start(new EcAesParameters(iv));
c.update(forge.util.createBuffer(forge.util.decode64(ciphertext)));
c.finish();
var decrypted = c.output;
if (EcCrypto.caching)
(EcCrypto.decryptionCache)[secret + iv + ciphertext] = decrypted.data;
return decrypted.data;
};
}, {}, {});
/**
* Asynchronous implementation of {{#crossLink
* "EcRsaOaep"}}EcRsaOaep{{/crossLink}}. Uses web workers and assumes 8 workers.
*
* @author fritz.ray@eduworks.com
* @class EcRsaOaepAsync
* @module com.eduworks.ec
*/
var EcRsaOaepAsyncWorker = function() {};
EcRsaOaepAsyncWorker = stjs.extend(EcRsaOaepAsyncWorker, null, [], function(constructor, prototype) {
constructor.rotator = 0;
constructor.w = null;
constructor.q1 = null;
constructor.q2 = null;
constructor.initWorker = function() {
if (window == null && (typeof self).equals("undefined")) {
return;
}
if (!EcRemote.async) {
return;
}
if (EcRsaOaepAsyncWorker.w != null) {
return;
}
EcRsaOaepAsyncWorker.rotator = 0;
EcRsaOaepAsyncWorker.q1 = new Array();
EcRsaOaepAsyncWorker.q2 = new Array();
EcRsaOaepAsyncWorker.w = new Array();
for (var index = 0; index < 8; index++) {
EcRsaOaepAsyncWorker.createWorker(index);
}
};
constructor.createWorker = function(index) {
EcRsaOaepAsyncWorker.q1.push(new Array());
EcRsaOaepAsyncWorker.q2.push(new Array());
var wkr;
EcRsaOaepAsyncWorker.w.push(wkr = new Worker((window)["scriptPath"] + "forgeAsync.js"));
wkr.onmessage = function(p1) {
var o = p1.data;
var success = EcRsaOaepAsyncWorker.q1[index].shift();
var failure = EcRsaOaepAsyncWorker.q2[index].shift();
if ((o)["error"] != null) {
if (failure != null)
failure((o)["error"]);
} else if (success != null) {
success((o)["result"]);
}
};
wkr.onerror = function(p1) {
var success = EcRsaOaepAsyncWorker.q1[index].shift();
var failure = EcRsaOaepAsyncWorker.q2[index].shift();
if (failure != null) {
failure(p1.toString());
}
};
};
/**
* Asynchronous form of {{#crossLink
* "EcRsaOaep/encrypt:method"}}EcRsaOaep.encrypt{{/crossLink}}
*
* @param {EcPk} pk Public Key to use to encrypt.
* @param {string} plaintext Plaintext to encrypt.
* @param {function(string)} success Success method, result is Base64
* encoded Ciphertext.
* @param {function(string)} failure Failure method, parameter is error
* message.
* @method encrypt
* @static
*/
constructor.encrypt = function(pk, plaintext, success, failure) {
EcRsaOaepAsyncWorker.initWorker();
if (!EcRemote.async || EcRsaOaepAsyncWorker.w == null) {
success(EcRsaOaep.encrypt(pk, plaintext));
} else {
var worker = EcRsaOaepAsyncWorker.rotator++;
EcRsaOaepAsyncWorker.rotator = EcRsaOaepAsyncWorker.rotator % 8;
var o = new Object();
(o)["pk"] = pk.toPem();
(o)["text"] = plaintext;
(o)["cmd"] = "encryptRsaOaep";
EcRsaOaepAsyncWorker.q1[worker].push(success);
EcRsaOaepAsyncWorker.q2[worker].push(failure);
EcRsaOaepAsyncWorker.w[worker].postMessage(o);
}
};
/**
* Asynchronous form of {{#crossLink
* "EcRsaOaep/decrypt:method"}}EcRsaOaep.decrypt{{/crossLink}}
*
* @param {EcPpk} ppk Public private keypair to use to decrypt.
* @param {string} ciphertext Ciphertext to decrypt.
* @param {function(string)} success Success method, result is unencoded
* plaintext.
* @param {function(string)} failure Failure method, parameter is error
* message.
* @method decrypt
* @static
*/
constructor.decrypt = function(ppk, ciphertext, success, failure) {
if (EcCrypto.caching) {
var cacheGet = null;
cacheGet = (EcCrypto.decryptionCache)[ppk.toPem() + ciphertext];
if (cacheGet != null) {
success(cacheGet);
return;
}
}
EcRsaOaepAsyncWorker.initWorker();
if (!EcRemote.async || EcRsaOaepAsyncWorker.w == null) {
success(EcRsaOaep.decrypt(ppk, ciphertext));
} else {
var worker = EcRsaOaepAsyncWorker.rotator++;
EcRsaOaepAsyncWorker.rotator = EcRsaOaepAsyncWorker.rotator % 8;
var o = new Object();
(o)["ppk"] = ppk.toPem();
(o)["text"] = ciphertext;
(o)["cmd"] = "decryptRsaOaep";
if (EcCrypto.caching) {
EcRsaOaepAsyncWorker.q1[worker].push(function(p1) {
(EcCrypto.decryptionCache)[ppk.toPem() + ciphertext] = p1;
success(p1);
});
} else {
EcRsaOaepAsyncWorker.q1[worker].push(success);
}
EcRsaOaepAsyncWorker.q2[worker].push(failure);
EcRsaOaepAsyncWorker.w[worker].postMessage(o);
}
};
/**
* Asynchronous form of {{#crossLink
* "EcRsaOaep/sign:method"}}EcRsaOaep.sign{{/crossLink}}
*
* @param {EcPpk} ppk Public private keypair to use to sign message.
* @param {string} text Text to sign.
* @param {function(string)} success Success method, result is Base64
* encoded signature.
* @param {function(string)} failure Failure method, parameter is error
* message.
* @method sign
* @static
*/
constructor.sign = function(ppk, text, success, failure) {
EcRsaOaepAsyncWorker.initWorker();
if (!EcRemote.async || EcRsaOaepAsyncWorker.w == null) {
success(EcRsaOaep.sign(ppk, text));
} else {
var worker = EcRsaOaepAsyncWorker.rotator++;
EcRsaOaepAsyncWorker.rotator = EcRsaOaepAsyncWorker.rotator % 8;
var o = new Object();
(o)["ppk"] = ppk.toPem();
(o)["text"] = text;
(o)["cmd"] = "signRsaOaep";
EcRsaOaepAsyncWorker.q1[worker].push(success);
EcRsaOaepAsyncWorker.q2[worker].push(failure);
EcRsaOaepAsyncWorker.w[worker].postMessage(o);
}
};
/**
* Asynchronous form of {{#crossLink
* "EcRsaOaep/signSha256:method"}}EcRsaOaep.signSha256{{/crossLink}}
*
* @param {EcPpk} ppk Public private keypair to use to sign message.
* @param {string} text Text to sign.
* @param {function(string)} success Success method, result is Base64
* encoded signature.
* @param {function(string)} failure Failure method, parameter is error
* message.
* @method signSha256
* @static
*/
constructor.signSha256 = function(ppk, text, success, failure) {
EcRsaOaepAsyncWorker.initWorker();
if (!EcRemote.async || EcRsaOaepAsyncWorker.w == null) {
success(EcRsaOaep.signSha256(ppk, text));
} else {
var worker = EcRsaOaepAsyncWorker.rotator++;
EcRsaOaepAsyncWorker.rotator = EcRsaOaepAsyncWorker.rotator % 8;
var o = new Object();
(o)["ppk"] = ppk.toPem();
(o)["text"] = text;
(o)["cmd"] = "signSha256RsaOaep";
EcRsaOaepAsyncWorker.q1[worker].push(success);
EcRsaOaepAsyncWorker.q2[worker].push(failure);
EcRsaOaepAsyncWorker.w[worker].postMessage(o);
}
};
/**
* Asynchronous form of {{#crossLink
* "EcRsaOaep/verify:method"}}EcRsaOaep.verify{{/crossLink}}
*
* @param {EcPk} pk Public key to use to verify message.
* @param {string} text Text to use in verification.
* @param {string} signature Signature to use in verification.
* @param {function(boolean)} success Success method, result is whether
* signature is valid.
* @param {function(string)} failure Failure method, parameter is error
* message.
* @method verify
* @static
*/
constructor.verify = function(pk, text, signature, success, failure) {
EcRsaOaepAsyncWorker.initWorker();
if (!EcRemote.async || EcRsaOaepAsyncWorker.w == null) {
success(EcRsaOaep.verify(pk, text, signature));
} else {
var worker = EcRsaOaepAsyncWorker.rotator++;
EcRsaOaepAsyncWorker.rotator = EcRsaOaepAsyncWorker.rotator % 8;
var o = new Object();
(o)["pk"] = pk.toPem();
(o)["text"] = text;
(o)["signature"] = signature;
(o)["cmd"] = "verifyRsaOaep";
EcRsaOaepAsyncWorker.q1[worker].push(success);
EcRsaOaepAsyncWorker.q2[worker].push(failure);
EcRsaOaepAsyncWorker.w[worker].postMessage(o);
}
};
}, {w: {name: "Array", arguments: [{name: "Worker", arguments: ["Object"]}]}, q1: {name: "Array", arguments: [{name: "Array", arguments: ["Callback1"]}]}, q2: {name: "Array", arguments: [{name: "Array", arguments: ["Callback1"]}]}}, {});
/**
* Asynchronous implementation of {{#crossLink
* "EcAesCtr"}}EcAesCtr{{/crossLink}}. Uses web workers and assumes 8 workers.
*
* @author fritz.ray@eduworks.com
* @class EcAesCtrAsync
* @module com.eduworks.ec
*/
var EcAesCtrAsyncWorker = function() {};
EcAesCtrAsyncWorker = stjs.extend(EcAesCtrAsyncWorker, null, [], function(constructor, prototype) {
constructor.rotator = 0;
constructor.w = null;
constructor.q1 = null;
constructor.q2 = null;
constructor.initWorker = function() {
if (window == null && (typeof self).equals("undefined")) {
return;
}
if (!EcRemote.async) {
return;
}
if (EcAesCtrAsyncWorker.w != null) {
return;
}
EcAesCtrAsyncWorker.rotator = 0;
EcAesCtrAsyncWorker.q1 = new Array();
EcAesCtrAsyncWorker.q2 = new Array();
EcAesCtrAsyncWorker.w = new Array();
for (var index = 0; index < 8; index++) {
EcAesCtrAsyncWorker.createWorker(index);
}
};
constructor.createWorker = function(index) {
EcAesCtrAsyncWorker.q1.push(new Array());
EcAesCtrAsyncWorker.q2.push(new Array());
var wkr;
EcAesCtrAsyncWorker.w.push(wkr = new Worker((window)["scriptPath"] + "forgeAsync.js"));
wkr.onmessage = function(p1) {
var o = p1.data;
var success = EcAesCtrAsyncWorker.q1[index].shift();
var failure = EcAesCtrAsyncWorker.q2[index].shift();
if ((o)["error"] != null) {
if (failure != null)
failure((o)["error"]);
} else if (success != null) {
success((o)["result"]);
}
};
wkr.onerror = function(p1) {
var success = EcAesCtrAsyncWorker.q1[index].shift();
var failure = EcAesCtrAsyncWorker.q2[index].shift();
if (failure != null) {
failure(p1.toString());
}
};
};
/**
* Asynchronous form of {{#crossLink
* "EcAesCtr/encrypt:method"}}EcAesCtr.encrypt{{/crossLink}}
*
* @param {string} plaintext Text to encrypt.
* @param {string} secret Secret to use to encrypt.
* @param {string} iv Initialization Vector to use to encrypt.
* @param {function(string)} success Success method, result is Base64
* encoded Ciphertext.
* @param {function(string)} failure Failure method, parameter is error
* message.
* @method encrypt
* @static
*/
constructor.encrypt = function(plaintext, secret, iv, success, failure) {
EcAesCtrAsyncWorker.initWorker();
if (!EcRemote.async || EcAesCtrAsyncWorker.w == null) {
success(EcAesCtr.encrypt(plaintext, secret, iv));
} else {
var worker = EcAesCtrAsyncWorker.rotator++;
EcAesCtrAsyncWorker.rotator = EcAesCtrAsyncWorker.rotator % 8;
var o = new Object();
(o)["secret"] = secret;
(o)["iv"] = iv;
(o)["text"] = plaintext;
(o)["cmd"] = "encryptAesCtr";
EcAesCtrAsyncWorker.q1[worker].push(success);
EcAesCtrAsyncWorker.q2[worker].push(failure);
EcAesCtrAsyncWorker.w[worker].postMessage(o);
}
};
/**
* Asynchronous form of {{#crossLink
* "EcAesCtr/decrypt:method"}}EcAesCtr.decrypt{{/crossLink}}
*
* @param {string} ciphertext Text to decrypt.
* @param {string} secret Secret to use to decrypt.
* @param {string} iv Initialization Vector to use to decrypt.
* @param {function(string)} success Success method, result is Plaintext
* with no encoding.
* @param {function(string)} failure Failure method, parameter is error
* message.
* @method decrypt
* @static
*/
constructor.decrypt = function(ciphertext, secret, iv, success, failure) {
if (EcCrypto.caching) {
var cacheGet = null;
cacheGet = (EcCrypto.decryptionCache)[secret + iv + ciphertext];
if (cacheGet != null) {
success(cacheGet);
return;
}
}
EcAesCtrAsyncWorker.initWorker();
if (!EcRemote.async || EcAesCtrAsyncWorker.w == null) {
success(EcAesCtr.decrypt(ciphertext, secret, iv));
} else {
var worker = EcAesCtrAsyncWorker.rotator++;
EcAesCtrAsyncWorker.rotator = EcAesCtrAsyncWorker.rotator % 8;
var o = new Object();
(o)["secret"] = secret;
(o)["iv"] = iv;
(o)["text"] = ciphertext;
(o)["cmd"] = "decryptAesCtr";
if (EcCrypto.caching) {
EcAesCtrAsyncWorker.q1[worker].push(function(p1) {
(EcCrypto.decryptionCache)[secret + iv + ciphertext] = p1;
success(p1);
});
} else {
EcAesCtrAsyncWorker.q1[worker].push(success);
}
EcAesCtrAsyncWorker.q2[worker].push(failure);
EcAesCtrAsyncWorker.w[worker].postMessage(o);
}
};
}, {w: {name: "Array", arguments: [{name: "Worker", arguments: ["Object"]}]}, q1: {name: "Array", arguments: [{name: "Array", arguments: ["Callback1"]}]}, q2: {name: "Array", arguments: [{name: "Array", arguments: ["Callback1"]}]}}, {});
var EcRsaOaepAsync = function() {};
EcRsaOaepAsync = stjs.extend(EcRsaOaepAsync, null, [], function(constructor, prototype) {
constructor.encrypt = function(pk, text, success, failure) {
if (EcRemote.async == false) {
success(EcRsaOaep.encrypt(pk, text));
return;
}
if (window.crypto == null || window.crypto.subtle == null) {
EcRsaOaepAsyncWorker.encrypt(pk, text, success, failure);
return;
}
var keyUsages = new Array();
keyUsages.push("encrypt");
var algorithm = new Object();
algorithm.name = "RSA-OAEP";
algorithm.hash = "SHA-1";
if (pk.key == null)
window.crypto.subtle.importKey("jwk", pk.toJwk(), algorithm, false, keyUsages).then(function(key) {
pk.key = key;
window.crypto.subtle.encrypt(algorithm, key, str2ab(text)).then(function(p1) {
success(base64.encode(p1));
}, failure);
}, failure);
else
window.crypto.subtle.encrypt(algorithm, pk.key, str2ab(text)).then(function(p1) {
success(base64.encode(p1));
}, failure);
};
constructor.decrypt = function(ppk, text, success, failure) {
if (EcCrypto.caching) {
var cacheGet = null;
cacheGet = (EcCrypto.decryptionCache)[ppk.toPem() + text];
if (cacheGet != null) {
success(cacheGet);
return;
}
}
if (EcRemote.async == false) {
success(EcRsaOaep.decrypt(ppk, text));
return;
}
if (window.crypto == null || window.crypto.subtle == null) {
EcRsaOaepAsyncWorker.decrypt(ppk, text, success, failure);
return;
}
var keyUsages = new Array();
keyUsages.push("decrypt");
var algorithm = new Object();
algorithm.name = "RSA-OAEP";
algorithm.hash = "SHA-1";
if (ppk.key == null)
window.crypto.subtle.importKey("jwk", ppk.toJwk(), algorithm, false, keyUsages).then(function(key) {
ppk.key = key;
window.crypto.subtle.decrypt(algorithm, key, base64.decode(text)).then(function(p1) {
success(ab2str(p1));
}, failure);
}, failure);
else
window.crypto.subtle.decrypt(algorithm, ppk.key, base64.decode(text)).then(function(p1) {
success(ab2str(p1));
}, failure);
};
constructor.sign = function(ppk, text, success, failure) {
if (EcRemote.async == false) {
success(EcRsaOaep.sign(ppk, text));
return;
}
if (window.crypto == null || window.crypto.subtle == null) {
EcRsaOaepAsyncWorker.sign(ppk, text, success, failure);
return;
}
var keyUsages = new Array();
keyUsages.push("sign");
var algorithm = new Object();
algorithm.name = "RSASSA-PKCS1-v1_5";
algorithm.hash = "SHA-1";
if (ppk.signKey == null)
window.crypto.subtle.importKey("jwk", ppk.toJwk(), algorithm, false, keyUsages).then(function(key) {
ppk.signKey = key;
window.crypto.subtle.sign(algorithm, key, str2ab(text)).then(function(p1) {
success(base64.encode(p1));
}, failure);
}, failure);
else
window.crypto.subtle.sign(algorithm, ppk.signKey, str2ab(text)).then(function(p1) {
success(base64.encode(p1));
}, failure);
};
constructor.signSha256 = function(ppk, text, success, failure) {
if (EcRemote.async == false) {
success(EcRsaOaep.signSha256(ppk, text));
return;
}
if (window.crypto == null || window.crypto.subtle == null) {
EcRsaOaepAsyncWorker.sign(ppk, text, success, failure);
return;
}
var keyUsages = new Array();
keyUsages.push("sign");
var algorithm = new Object();
algorithm.name = "RSASSA-PKCS1-v1_5";
algorithm.hash = "SHA-256";
if (ppk.signKey == null)
window.crypto.subtle.importKey("jwk", ppk.toJwk(), algorithm, false, keyUsages).then(function(key) {
ppk.signKey = key;
window.crypto.subtle.sign(algorithm, key, str2ab(text)).then(function(p1) {
success(base64.encode(p1));
}, failure);
}, failure);
else
window.crypto.subtle.sign(algorithm, ppk.signKey, str2ab(text)).then(function(p1) {
success(base64.encode(p1));
}, failure);
};
constructor.verify = function(pk, text, signature, success, failure) {
if (EcRemote.async == false) {
success(EcRsaOaep.verify(pk, text, signature));
return;
}
if (window.crypto == null || window.crypto.subtle == null) {
EcRsaOaepAsyncWorker.verify(pk, text, signature, success, failure);
return;
}
var keyUsages = new Array();
keyUsages.push("verify");
var algorithm = new Object();
algorithm.name = "RSASSA-PKCS1-v1_5";
algorithm.hash = "SHA-1";
if (pk.signKey == null)
window.crypto.subtle.importKey("jwk", pk.toJwk(), algorithm, false, keyUsages).then(function(key) {
pk.signKey = key;
window.crypto.subtle.verify(algorithm, key, base64.decode(signature), str2ab(text)).then(function(p1) {
success(p1);
}, failure);
}, failure);
else
window.crypto.subtle.verify(algorithm, pk.signKey, base64.decode(signature), str2ab(text)).then(function(p1) {
success(p1);
}, failure);
};
}, {}, {});
var EcAesCtrAsync = function() {};
EcAesCtrAsync = stjs.extend(EcAesCtrAsync, null, [], function(constructor, prototype) {
constructor.encrypt = function(text, secret, iv, success, failure) {
if (window.crypto == null || window.crypto.subtle == null) {
EcAesCtrAsyncWorker.encrypt(text, secret, iv, success, failure);
return;
}
var keyUsages = new Array();
keyUsages.push("encrypt", "decrypt");
var algorithm = new Object();
algorithm.name = "AES-CTR";
algorithm.counter = base64.decode(iv);
algorithm.length = 128;
var data;
data = str2ab(text);
window.crypto.subtle.importKey("raw", base64.decode(secret), algorithm, false, keyUsages).then(function(key) {
var p = window.crypto.subtle.encrypt(algorithm, key, data);
p.then(function(p1) {
success(base64.encode(p1));
}, failure);
}, failure);
};
constructor.decrypt = function(text, secret, iv, success, failure) {
if (EcCrypto.caching) {
var cacheGet = (EcCrypto.decryptionCache)[secret + iv + text];
if (cacheGet != null) {
success(cacheGet);
return;
}
}
if (window.crypto == null || window.crypto.subtle == null) {
EcAesCtrAsyncWorker.decrypt(text, secret, iv, success, failure);
return;
}
var keyUsages = new Array();
keyUsages.push("encrypt", "decrypt");
var algorithm = new Object();
algorithm.name = "AES-CTR";
algorithm.counter = base64.decode(iv);
algorithm.length = 128;
var data;
data = base64.decode(text);
window.crypto.subtle.importKey("raw", base64.decode(secret), algorithm, false, keyUsages).then(function(key) {
var p = window.crypto.subtle.decrypt(algorithm, key, data);
p.then(function(p1) {
success(ab2str(p1));
}, failure);
}, failure);
};
}, {}, {});
/**
* Represents a JSON-LD linked data object and performs serialization.
* Note: Serialization and deserialization remove parameters that begin with '@'.
* Note: This Linked Data Object is not assumed to have an @id field.
*
* @author fritz.ray@eduworks.com
* @module org.json.ld
* @class EcLinkedData
*/
var EcLinkedData = /**
* Create a linked data object.
*
* @param {string} context JSON-LD Context.
* @param {string} type JSON-LD Type.
* @constructor
*/
function(context, type) {
this.setContextAndType(context, type);
};
EcLinkedData = stjs.extend(EcLinkedData, null, [], function(constructor, prototype) {
constructor.atProperties = ["id", "type", "schema", "context", "signature", "owner", "reader", "encryptedType"];
/**
* JSON-LD @type field.
*
* @property type
* @type string
*/
prototype.type = null;
/**
* JSON-LD @context field.
*
* @property context
* @type string
*/
prototype.context = null;
/**
* Determines which fields to serialize into @fields.
*
* @param {string} key Property name to check if it should be an @property.
* @return {boolean} True if property is in the set of atProperties.
* @internal
* @static
* @method isAtProperty
*/
constructor.isAtProperty = function(key) {
for (var i = 0; i < EcLinkedData.atProperties.length; i++)
if (EcLinkedData.atProperties[i].equals(key))
return true;
return false;
};
/**
* Helper function to determine if a piece of data is probably a JSON
* object.
*
* @param {string} probableJson JSON to test.
* @return {boolean} True if it is probably JSON. False if not.
* @method isProbablyJson
* @static
*/
constructor.isProbablyJson = function(probableJson) {
return probableJson.trim().startsWith("{") && probableJson.trim().endsWith("}");
};
/**
* Set the JSON-LD @context and @type.
*
* @param {string} context JSON-LD Context.
* @param {string} type JSON-LD Type.
* @method setContextAndType
*/
prototype.setContextAndType = function(context, type) {
this.context = context;
this.type = type;
if (type != null) {
this.type = type.replace(context, "");
if (this.type.startsWith("/"))
this.type = this.type.substring(1);
}
};
/**
* Serializes this object to JSON.
*
* @return {string} JSON formatted object (with JSON-LD fields).
* @method toJson
*/
prototype.toJson = function() {
var o = this.atIfy();
return JSON.stringify(o);
};
/**
* Forces Javascript to encode the object in alphabetical order in order to
* make signature based actions more viable. Also places @(at) symbols in
* front of appropriate fields.
*
* @return {Object} Serializable JSON object.
* @internal
* @method atIfy
*/
prototype.atIfy = function() {
return this.atIfyObject(this);
};
prototype.atIfyArray = function(o) {
var a = new Array();
for (var i = 0; i < o.length; i++) {
if (EcObject.isObject(o[i])) {
if (stjs.isInstanceOf(o[i].constructor, EcLinkedData))
a[i] = this.atIfyObject(o[i]);
else {
a[i] = o[i];
}
} else if (EcArray.isArray(o[i]))
a[i] = this.atIfyArray(o[i]);
else
a[i] = o[i];
}
return a;
};
prototype.atIfyObject = function(o) {
var keys = new Array();
var me = (o);
for (var key in me) {
if (EcLinkedData.isAtProperty(key))
key = "@" + key;
keys.push(key);
}
keys.sort(function(a, b) {
return a.compareTo(b);
});
var op = (new Object());
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = me[key.replace("@", "")];
if (value != null)
if (stjs.isInstanceOf(value.constructor, EcLinkedData))
value = (value).atIfy();
else if (EcArray.isArray(value))
value = this.atIfyArray(value);
if (value != null)
op[key] = value;
else
value = me[key];
if (value != null)
op[key] = value;
}
return op;
};
/**
* Uses the object's fully qualified type name and compares it to the
* provided type.
*
* @param {string} type Fully qualified type name uri.
* @return {boolean} True if match, False if not.
* @method isA
*/
prototype.isA = function(type) {
var computedType = this.getFullType();
return computedType.equals(type) || this.type.equals(type);
};
/**
* Uses the object's fully qualified type name and compares it to the
* provided type.
*
* @param {string[]} type Fully qualified type name uris.
* @return {boolean} True if match, False if not.
* @method isAny
*/
prototype.isAny = function(type) {
var computedType = this.getFullType();
if (type.length == 0)
return true;
for (var i = 0; i < type.length; i++)
if (type[i].equals(computedType) || type[i].equals(this.type))
return true;
return false;
};
/**
* Gets the fully qualified type name, as JSON-LD allows the "namespace" of
* the type to be defined in @context.
*
* @return {string} Fully qualified type name.
* @method getFullType
*/
prototype.getFullType = function() {
if (this.context == null)
return this.type;
if (this.type.indexOf("http") != -1)
return this.type;
var computedType = this.context;
if (EcObject.isObject(this.context)) {
var typeParts = this.type.split(":");
if (typeParts.length == 2) {
computedType = (this.context)[typeParts[0]];
if (!computedType.endsWith("/"))
computedType += "/";
computedType += typeParts[1];
return computedType;
} else if ((this.context)["@vocab"] != null)
computedType = (this.context)["@vocab"];
}
if (!computedType.endsWith("/"))
computedType += "/";
computedType += this.type;
return computedType;
};
/**
* Also could be called "upcast", for those in the know.
* <p>
* Ghetto method of copying properties from some other object. As freshly
* deserialized javascript objects do not inherently attach the functions of
* their type, it is this or factory hell.
*
* @param that The freshly deserialized object, or the object to upcast into this object.
* @method copyFrom
*/
prototype.copyFrom = function(that) {
var me = (this);
for (var key in me) {
if ((typeof me[key]) != "function")
delete me[key];
}
var you = (that);
for (var key in you) {
if ((typeof you[key]) != "function")
me[key.replace("@", "")] = you[key];
}
var stripNamespace = null;
var newContext = null;
if (this.type != null && this.context != null && EcObject.isObject(this.context)) {
var typeParts = this.type.split(":");
if (typeParts.length == 2) {
newContext = (this.context)[typeParts[0]];
stripNamespace = typeParts[0];
if (!newContext.endsWith("/"))
newContext += "/";
} else if ((this.context)["@vocab"] != null)
newContext = (this.context)["@vocab"];
}
if (stripNamespace != null)
for (var key in me) {
if ((typeof me[key]) != "function") {
if (key.startsWith(stripNamespace + ":")) {
if (EcArray.isArray(me[key])) {
(me)[key.replace(stripNamespace + ":", "")] = JSON.parse(JSON.stringify(me[key]).replaceAll(stripNamespace + ":", ""));
} else if (EcObject.isObject(me[key])) {
(me)[key.replace(stripNamespace + ":", "")] = JSON.parse(JSON.stringify(me[key]).replaceAll(stripNamespace + ":", ""));
} else
(me)[key.replace(stripNamespace + ":", "")] = me[key];
delete me[key];
}
}
}
if (newContext != null)
this.context = newContext;
this.upgrade();
if (!this.isAny(this.getTypes()))
throw new RuntimeException("Incompatible type: " + this.getFullType());
};
/**
* Upgrades the object to the latest version, performing transforms and the like.
*
* @method upgrade
*/
prototype.upgrade = function() {};
/**
* Removes the @ symbol from properties in order to make them more
* accessible in Javascript.
*
* @return {EcLinkedData} This object, with @ properties converted to @-less properties.
* @method deAtify
* @internal
*/
prototype.deAtify = function() {
var me = (this);
for (var key in me) {
if (me[key] == null) {
var value = me[key];
if (value != null)
if (stjs.isInstanceOf(value.constructor, EcLinkedData))
value = (value).deAtify();
me[key.replace("@", "")] = value;
}
}
return this;
};
/**
* Gets all versions of JSON-LD type strings for this type of object.
*
* @return {string[]} Array of URIs.
* @method getTypes
*/
prototype.getTypes = function() {
var a = new Array();
if (this.context != null && this.type != null) {
if (!EcObject.isObject(this.context)) {
var context = (!this.context.endsWith("/") ? this.context + "/" : this.context);
a.push(context + this.type);
}
}
return a;
};
prototype.compact = function(remoteContextUrl, success, failure) {
var me = this;
jsonld.compact(this.toJson(), remoteContextUrl, new Object(), function(err, compacted, context) {
if (err != null) {
failure(err);
return;
}
me.copyFrom(compacted);
success(this);
});
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/* FileSaver.js
* A saveAs() FileSaver implementation.
* 1.1.20151003
*
* By Eli Grey, http://eligrey.com
* License: MIT
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
*/
/*global self */
/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var saveAs = saveAs || (function(view) {
"use strict";
// IE <10 is explicitly unsupported
if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) {
return;
}
var
doc = view.document
// only get URL when necessary in case Blob.js hasn't overridden it yet
, get_URL = function() {
return view.URL || view.webkitURL || view;
}
, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
, can_use_save_link = "download" in save_link
, click = function(node) {
var event = new MouseEvent("click");
node.dispatchEvent(event);
}
, is_safari = /Version\/[\d\.]+.*Safari/.test(navigator.userAgent)
, webkit_req_fs = view.webkitRequestFileSystem
, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem
, throw_outside = function(ex) {
(view.setImmediate || view.setTimeout)(function() {
throw ex;
}, 0);
}
, force_saveable_type = "application/octet-stream"
, fs_min_size = 0
// See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and
// https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
// for the reasoning behind the timeout and revocation flow
, arbitrary_revoke_timeout = 500 // in ms
, revoke = function(file) {
var revoker = function() {
if (typeof file === "string") { // file is an object URL
get_URL().revokeObjectURL(file);
} else { // file is a File
file.remove();
}
};
if (view.chrome) {
revoker();
} else {
setTimeout(revoker, arbitrary_revoke_timeout);
}
}
, dispatch = function(filesaver, event_types, event) {
event_types = [].concat(event_types);
var i = event_types.length;
while (i--) {
var listener = filesaver["on" + event_types[i]];
if (typeof listener === "function") {
try {
listener.call(filesaver, event || filesaver);
} catch (ex) {
throw_outside(ex);
}
}
}
}
, auto_bom = function(blob) {
// prepend BOM for UTF-8 XML and text/* types (including HTML)
if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
return new Blob(["\ufeff", blob], {type: blob.type});
}
return blob;
}
, FileSaver = function(blob, name, no_auto_bom) {
if (!no_auto_bom) {
blob = auto_bom(blob);
}
// First try a.download, then web filesystem, then object URLs
var
filesaver = this
, type = blob.type
, blob_changed = false
, object_url
, target_view
, dispatch_all = function() {
dispatch(filesaver, "writestart progress write writeend".split(" "));
}
// on any filesys errors revert to saving with object URLs
, fs_error = function() {
if (target_view && is_safari && typeof FileReader !== "undefined") {
// Safari doesn't allow downloading of blob urls
var reader = new FileReader();
reader.onloadend = function() {
var base64Data = reader.result;
target_view.location.href = "data:attachment/file" + base64Data.slice(base64Data.search(/[,;]/));
filesaver.readyState = filesaver.DONE;
dispatch_all();
};
reader.readAsDataURL(blob);
filesaver.readyState = filesaver.INIT;
return;
}
// don't create more object URLs than needed
if (blob_changed || !object_url) {
object_url = get_URL().createObjectURL(blob);
}
if (target_view) {
target_view.location.href = object_url;
} else {
var new_tab = view.open(object_url, "_blank");
if (new_tab == undefined && is_safari) {
//Apple do not allow window.open, see http://bit.ly/1kZffRI
view.location.href = object_url
}
}
filesaver.readyState = filesaver.DONE;
dispatch_all();
revoke(object_url);
}
, abortable = function(func) {
return function() {
if (filesaver.readyState !== filesaver.DONE) {
return func.apply(this, arguments);
}
};
}
, create_if_not_found = {create: true, exclusive: false}
, slice
;
filesaver.readyState = filesaver.INIT;
if (!name) {
name = "download";
}
if (can_use_save_link) {
object_url = get_URL().createObjectURL(blob);
setTimeout(function() {
save_link.href = object_url;
save_link.download = name;
click(save_link);
dispatch_all();
revoke(object_url);
filesaver.readyState = filesaver.DONE;
});
return;
}
// Object and web filesystem URLs have a problem saving in Google Chrome when
// viewed in a tab, so I force save with application/octet-stream
// http://code.google.com/p/chromium/issues/detail?id=91158
// Update: Google errantly closed 91158, I submitted it again:
// https://code.google.com/p/chromium/issues/detail?id=389642
if (view.chrome && type && type !== force_saveable_type) {
slice = blob.slice || blob.webkitSlice;
blob = slice.call(blob, 0, blob.size, force_saveable_type);
blob_changed = true;
}
// Since I can't be sure that the guessed media type will trigger a download
// in WebKit, I append .download to the filename.
// https://bugs.webkit.org/show_bug.cgi?id=65440
if (webkit_req_fs && name !== "download") {
name += ".download";
}
if (type === force_saveable_type || webkit_req_fs) {
target_view = view;
}
if (!req_fs) {
fs_error();
return;
}
fs_min_size += blob.size;
req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) {
fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) {
var save = function() {
dir.getFile(name, create_if_not_found, abortable(function(file) {
file.createWriter(abortable(function(writer) {
writer.onwriteend = function(event) {
target_view.location.href = file.toURL();
filesaver.readyState = filesaver.DONE;
dispatch(filesaver, "writeend", event);
revoke(file);
};
writer.onerror = function() {
var error = writer.error;
if (error.code !== error.ABORT_ERR) {
fs_error();
}
};
"writestart progress write abort".split(" ").forEach(function(event) {
writer["on" + event] = filesaver["on" + event];
});
writer.write(blob);
filesaver.abort = function() {
writer.abort();
filesaver.readyState = filesaver.DONE;
};
filesaver.readyState = filesaver.WRITING;
}), fs_error);
}), fs_error);
};
dir.getFile(name, {create: false}, abortable(function(file) {
// delete file if it already exists
file.remove();
save();
}), abortable(function(ex) {
if (ex.code === ex.NOT_FOUND_ERR) {
save();
} else {
fs_error();
}
}));
}), fs_error);
}), fs_error);
}
, FS_proto = FileSaver.prototype
, saveAs = function(blob, name, no_auto_bom) {
return new FileSaver(blob, name, no_auto_bom);
}
;
// IE 10+ (native saveAs)
if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) {
return function(blob, name, no_auto_bom) {
if (!no_auto_bom) {
blob = auto_bom(blob);
}
return navigator.msSaveOrOpenBlob(blob, name || "download");
};
}
FS_proto.abort = function() {
var filesaver = this;
filesaver.readyState = filesaver.DONE;
dispatch(filesaver, "abort");
};
FS_proto.readyState = FS_proto.INIT = 0;
FS_proto.WRITING = 1;
FS_proto.DONE = 2;
FS_proto.error =
FS_proto.onwritestart =
FS_proto.onprogress =
FS_proto.onwrite =
FS_proto.onabort =
FS_proto.onerror =
FS_proto.onwriteend =
null;
return saveAs;
}(
typeof self !== "undefined" && self
|| typeof window !== "undefined" && window
|| this.content
));
// `self` is undefined in Firefox for Android content script context
// while `this` is nsIContentFrameMessageManager
// with an attribute `content` that corresponds to the window
if (typeof module !== "undefined" && module.exports) {
module.exports.saveAs = saveAs;
} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
define([], function() {
return saveAs;
});
}
/**
* Location of strings that store the current namespace for general Eduworks Objects.
*
* @author fritz.ray@eduworks.com
* @class General
* @module com.eduworks.ec
*/
var General = function() {};
General = stjs.extend(General, null, [], function(constructor, prototype) {
constructor.context_0_2 = "http://schema.eduworks.com/general/0.2";
constructor.context_0_1 = "http://schema.eduworks.com/general/0.1";
/**
* The latest version of the Eduworks Object namespace.
*
* @property context
* @static
* @type {string}
*/
constructor.context = "http://schema.eduworks.com/general/0.2";
}, {}, {});
/**
* Location of strings that store the current namespace for EBAC/KBAC.
*
* @author fritz.ray@eduworks.com
* @class Ebac
* @module org.cassproject
*/
var Ebac = function() {};
Ebac = stjs.extend(Ebac, null, [], function(constructor, prototype) {
constructor.context_0_1 = "http://schema.eduworks.com/ebac/0.1";
constructor.context_0_2 = "http://schema.eduworks.com/ebac/0.2";
constructor.context_0_3 = "http://schema.cassproject.org/kbac/0.2";
/**
* Current version of KBAC.
*
* @property context
* @static
* @type string (URL)
*/
constructor.context = "http://schema.cassproject.org/kbac/0.2";
}, {}, {});
/**
* Data wrapper to represent remotely hosted data. Includes necessary KBAC fields for
* permission controls, signing, identifying and locating the object.
*
* @author fritz.ray@eduworks.com
* @class EcRemoteLinkedData
* @extends EcLinkedData
* @module org.cassproject
*/
var EcRemoteLinkedData = /**
* Constructor for remote linked data object.
*
* @param {string} context JSON-LD Context.
* @param {string} type JSON-LD Type.
* @constructor
*/
function(context, type) {
EcLinkedData.call(this, context, type);
};
EcRemoteLinkedData = stjs.extend(EcRemoteLinkedData, EcLinkedData, [], function(constructor, prototype) {
/**
* PEM encoded public keys of the owner of the object. A repository, upon
* receiving a write operation, will ensure either the data did not
* previously exist, or that an owner has provided a signature authorizing
* the replacement of the old data with the new data.
*
* @property owner
* @type string[] (PEM)
*/
prototype.owner = null;
/**
* Signatures of the object. The signing method is as follows: Remove the
* signature field. Encode the object and its fields in ascii-sort order
* JSON-LD using a space-free, tab-free encoding. Sign the aforementioned
* string.
*
* @property signature
* @type string[] (Base64)
*/
prototype.signature = null;
/**
* URL/URI used to retrieve, store and identify the object.
*
* @property id
* @type string (URL)
*/
prototype.id = null;
/**
* PEM encoded public keys of identities authorized to view the object. A
* repository will ignore write operations from these identities, but will
* allow them to read the object.
*
* @property reader
* @type string[] (PEM)
*/
prototype.reader = null;
/**
* Removes the version information from an identifier.
* Warning: Will remove identifier if the identifier is composed solely of digits!!!
*
* @param {string} id Slash delimited URL or path.
* @return ID without version.
* @method trimVersionFromUrl
* @static
*/
constructor.trimVersionFromUrl = function(id) {
if (id == null)
return null;
if (!id.substring(id.lastIndexOf("/")).matches("\\/[0-9]+"))
return id;
var rawId = id.substring(0, id.lastIndexOf("/"));
if (rawId.endsWith("/"))
rawId = rawId.substring(0, rawId.length - 1);
return rawId;
};
/**
* Will generate an identifier using the server URL provided (usually from
* an EcRepository).
*
* @param {string} server Base URL of the server's repository functionality.
* @method generateId
*/
prototype.generateId = function(server) {
this.id = server;
if (!this.id.endsWith("/"))
this.id += "/";
this.id += "data/";
this.id += this.getDottedType();
this.id += "/";
this.id += generateUUID();
this.id += "/";
this.id += new Date().getTime();
};
prototype.getDottedType = function() {
return this.getFullType().replace("http://", "").replaceAll("/", ".");
};
/**
* Will generate an identifier using the server URL provided (usually from
* an EcRepository) and unique identifier.
*
* @param {string} server Base URL of the server's repository functionality.
* @param {string} uniqueIdentifier Canonical identifier. Must contain a letter or symbol.
* @method assignId
*/
prototype.assignId = function(server, uniqueIdentifier) {
this.id = server;
if (!this.id.endsWith("/"))
this.id += "/";
this.id += "data/";
this.id += this.getDottedType();
this.id += "/";
this.id += uniqueIdentifier;
this.id += "/";
this.id += new Date().getTime();
};
/**
* Will generate an identifier using the server URL provided (usually from
* an EcRepository) and unique identifier.
*
* @param {string} server Base URL of the server's repository functionality.
* @param {string} uniqueIdentifier Canonical identifier. Must contain a letter or symbol.
* @method assignId
*/
prototype.assignIdAndVersion = function(server, uniqueIdentifier, version) {
this.id = server;
if (!this.id.endsWith("/"))
this.id += "/";
this.id += "data/";
this.id += this.getDottedType();
this.id += "/";
this.id += uniqueIdentifier;
this.id += "/";
this.id += version;
};
/**
* Determines if the object has an owner identified by pk.
* Homogenizes the PEM strings for comparison.
* Homogenization is necessary for comparing PKCS#1 and PKCS#8 or PKs with Certificates, etc.
*
* @param {EcPk} pk Public Key of the owner.
* @return {boolean} True if owner is represented by the PK, false otherwise.
* @method hasOwner
*/
prototype.hasOwner = function(pk) {
if (this.owner == null)
return false;
var pkPem = pk.toPem();
for (var i = 0; i < this.owner.length; i++)
if (pkPem == EcPk.fromPem(this.owner[i]).toPem())
return true;
return false;
};
/**
* Determines if the object has a reader identified by pk.
* Homogenizes the PEM strings for comparison.
* Homogenization is necessary for comparing PKCS#1 and PKCS#8 or PKs with Certificates, etc.
*
* @param {EcPk} pk Public Key of the owner.
* @return {boolean} True if owner is represented by the PK, false otherwise.
* @method hasOwner
*/
prototype.hasReader = function(pk) {
if (this.reader == null)
return false;
var pkPem = pk.toPem();
for (var i = 0; i < this.reader.length; i++)
if (pkPem == EcPk.fromPem(this.reader[i]).toPem())
return true;
return false;
};
/**
* Determines if the PK matches an owner or if the object is public.
* Homogenizes the PEM strings for comparison.
* Homogenization is necessary for comparing PKCS#1 and PKCS#8 or PKs with Certificates, etc.
*
* @param {EcPk} pk Public Key of the owner.
* @return {boolean} True if owner is represented by the PK, false otherwise.
* @method canEdit
*/
prototype.canEdit = function(pk) {
if (this.owner == null || this.owner.length == 0)
return true;
return this.hasOwner(pk);
};
/**
* Determines if the PK matches an owner or if the object is public.
* Homogenizes the PEM strings for comparison.
* Homogenization is necessary for comparing PKCS#1 and PKCS#8 or PKs with Certificates, etc.
*
* @param {EcPk} pk Public Key of the owner.
* @return {boolean} True if owner is represented by the PK, false otherwise.
* @method canEdit
*/
prototype.canEditAny = function(ids) {
if (this.owner == null || this.owner.length == 0)
return true;
if (ids == null)
return false;
for (var i = 0; i < ids.length; i++)
if (this.hasOwner(ids[i]))
return true;
return false;
};
/**
* Encodes the object in a form where it is ready to be signed.
* This method is under long term review, and may change from version to version.
*
* @return ASCII-sort order encoded space-free and tab-free JSON-LD.
* @method toSignableJson
*/
prototype.toSignableJson = function() {
var d = JSON.parse(this.toJson());
if (this.type.indexOf("http://schema.eduworks.com/") != -1 && this.type.indexOf("/0.1/") != -1) {
delete (d)["@signature"];
delete (d)["@owner"];
delete (d)["@reader"];
delete (d)["@id"];
} else {
delete (d)["@signature"];
delete (d)["@id"];
}
var e = new EcLinkedData(d.context, d.type);
e.copyFrom(d);
return e.toJson();
};
/**
* Sign this object using a private key.
* Does not check for ownership, objects signed with keys absent from @owner or @reader may be removed.
*
* @param {EcPpk} ppk Public private keypair.
* @method signWith
*/
prototype.signWith = function(ppk) {
var signableJson = this.toSignableJson();
var signed = EcRsaOaep.sign(ppk, signableJson);
if (this.signature != null) {
for (var i = 0; i < this.signature.length; i++)
if (this.signature[i] == signed)
return;
} else {
this.signature = new Array();
}
this.signature.push(signed);
};
/**
* Verifies the object's signatures.
*
* @return {boolean} true if all of the signatures could be verified, false if they could not
* @method verify
*/
prototype.verify = function() {
if (this.signature != null) {
for (var i = 0; i < this.signature.length; ) {
var works = false;
var sig = this.signature[i];
if (this.owner != null) {
for (var j = 0; j < this.owner.length; j++) {
var own = this.owner[j];
var pk = EcPk.fromPem(own);
var verify = false;
try {
verify = EcRsaOaep.verify(pk, this.toSignableJson(), sig);
}catch (ex) {}
if (verify) {
works = true;
break;
}
}
}
if (!works)
return false;
else
i++;
}
if (this.signature.length == 0)
return false;
return true;
}
return false;
};
/**
* Adds an owner to the object, if the owner does not exist.
* Note that this method invalidates all signatures.
*
* @param {EcPk} newOwner PK of the new owner.
* @method addOwner
*/
prototype.addOwner = function(newOwner) {
var pem = newOwner.toPem();
if (this.owner == null)
this.owner = new Array();
for (var i = 0; i < this.owner.length; i++)
if (this.owner[i] == pem)
return;
this.owner.push(pem);
this.signature = null;
};
/**
* Removes an owner from the object, if the owner does exist.
* Note that this method invalidates all signatures.
*
* @param {EcPk} oldOwner PK to remove.
* @method removeOwner
*/
prototype.removeOwner = function(oldOwner) {
var pem = oldOwner.toPem();
if (this.owner == null)
this.owner = new Array();
for (var i = 0; i < this.owner.length; i++)
if (this.owner[i] == pem)
this.owner.splice(i, 1);
this.signature = null;
};
/**
* Adds a reader to the object, if the reader does not exist.
* Note that this method invalidates all signatures.
*
* @param {EcPk} newReader PK of the new reader.
* @method addReader
*/
prototype.addReader = function(newReader) {
var pem = newReader.toPem();
if (this.reader == null)
this.reader = new Array();
for (var i = 0; i < this.reader.length; i++)
if (this.reader[i] == pem)
return;
this.reader.push(pem);
this.signature = null;
};
/**
* Removes a reader from the object, if the reader does exist.
* Note that this method invalidates all signatures.
*
* @param {EcPk} oldReader PK of the old reader.
* @method removeReader
*/
prototype.removeReader = function(oldReader) {
var pem = oldReader.toPem();
if (this.reader == null)
this.reader = new Array();
for (var i = 0; i < this.reader.length; i++)
if (this.reader[i] == pem)
this.reader.splice(i, 1);
this.signature = null;
};
/**
* Determines if the object is not retrievable from a repository should it be written.
*
* @return {boolean} True if the object is NOT VALID for storage, false otherwise.
* @method invalid
*/
prototype.invalid = function() {
if (this.id == null)
return true;
if (this.context == null)
return true;
if (this.getFullType() == null)
return true;
if (this.getFullType().indexOf("http://") == -1 && this.getFullType().indexOf("https://") == -1)
return true;
return false;
};
/**
* Updates the ID timestamp of the object, for versioning purposes.
*
* @method updateTimestamp
*/
prototype.updateTimestamp = function() {
var rawId = this.id.substring(0, this.id.lastIndexOf("/"));
if (rawId.endsWith("/") == false)
rawId += "/";
rawId += new Date().getTime();
this.id = rawId;
};
/**
* Updates the ID timestamp of the object, for versioning purposes.
*
* @method updateTimestamp
*/
prototype.getTimestamp = function() {
return Integer.parseInt(this.id.substring(this.id.lastIndexOf("/")));
};
/**
* Returns true if the provided ID represents this object.
* Use this, as version information can make direct comparison difficult.
*
* @param {string} id
* @return {boolean} True if the provided ID represents this object.
* @method isId
*/
prototype.isId = function(id) {
return EcRemoteLinkedData.trimVersionFromUrl(this.id) == EcRemoteLinkedData.trimVersionFromUrl(id);
};
/**
* Return the ID of this object without the version information.
* Used to reference the latest version of an object.
*
* @return {string} ID of the latest version of this object.
* @method shortId
*/
prototype.shortId = function() {
return EcRemoteLinkedData.trimVersionFromUrl(this.id);
};
/**
* Return the GUID portion of the short ID.
*
* @return {string} Guid of the linked data object.
* @method getGuid
*/
prototype.getGuid = function() {
var shortId = EcRemoteLinkedData.trimVersionFromUrl(this.id);
var parts = shortId.split("/");
return parts[parts.length - 1];
};
/**
* Return the URL Base portion of the short ID.
*
* @return {string} Server Base URL of the linked data object.
* @method getServerBaseUrl
*/
prototype.getServerBaseUrl = function() {
var shortId = EcRemoteLinkedData.trimVersionFromUrl(this.id);
var parts = shortId.split("/");
return parts.slice(0, parts.indexOf("data")).join("/");
};
/**
* Return a valid ElasticSearch search string that will retrieve all objects with this type.
*
* @return {string} ElasticSearch compatible search string.
* @method getSearchStringByType
*/
prototype.getSearchStringByType = function() {
var types = this.getTypes();
var result = "";
for (var i = 0; i < types.length; i++) {
if (i != 0)
result += " OR ";
result += "@type:\"" + types[i] + "\"";
var lastSlash = types[i].lastIndexOf("/");
result += " OR (@context:\"" + types[i].substring(0, lastSlash + 1) + "\" AND @type:\"" + types[i].substring(lastSlash + 1) + "\")";
}
for (var i = 0; i < types.length; i++) {
if (result != "")
result += " OR ";
result += "@encryptedType:\"" + types[i] + "\"";
var lastSlash = types[i].lastIndexOf("/");
result += " OR (@context:\"" + Ebac.context + "\" AND @encryptedType:\"" + types[i].substring(lastSlash + 1) + "\")";
}
return "(" + result + ")";
};
prototype.asRdfXml = function(success, failure, signatureSheet) {
var fd = new FormData();
var id = this.id;
if (signatureSheet != null || signatureSheet != undefined)
fd.append("signatureSheet", signatureSheet);
var headers = {};
headers["Accept"] = "application/rdf+xml";
EcRemote.postWithHeadersExpectingString(id, "", fd, headers, success, failure);
};
prototype.asNQuads = function(success, failure, signatureSheet) {
var fd = new FormData();
var id = this.id;
if (signatureSheet != null || signatureSheet != undefined)
fd.append("signatureSheet", signatureSheet);
var headers = {};
headers["Accept"] = "text/n4";
EcRemote.postWithHeadersExpectingString(id, "", fd, headers, success, failure);
};
prototype.asTurtle = function(success, failure, signatureSheet) {
var fd = new FormData();
var id = this.id;
if (signatureSheet != null || signatureSheet != undefined)
fd.append("signatureSheet", signatureSheet);
var headers = {};
headers["Accept"] = "text/turtle";
EcRemote.postWithHeadersExpectingString(id, "", fd, headers, success, failure);
};
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Thing
* The most generic type of item.
*
* @author schema.org
* @class Thing
* @module org.schema
*/
var Thing = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.org/", "Thing");
};
Thing = stjs.extend(Thing, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* Schema.org/name
* The name of the item.
*
* @property name
* @type Text
*/
prototype.name = null;
/**
* Schema.org/identifier
* The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.
*
* @property identifier
* @type schema, URL | schema,Text | schema,PropertyValue
*/
prototype.identifier = null;
/**
* Schema.org/url
* URL of the item.
*
* @property url
* @type URL
*/
prototype.url = null;
/**
* Schema.org/image
* An image of the item. This can be a [[URL]] or a fully described [[ImageObject]].
*
* @property image
* @type schema, URL | schema,ImageObject
*/
prototype.image = null;
/**
* Schema.org/description
* A description of the item.
*
* @property description
* @type Text
*/
prototype.description = null;
/**
* Schema.org/disambiguatingDescription
* A sub property of description. A short description of the item used to disambiguate from other, similar items. Information from other properties (in particular, name) may be necessary for the description to be useful for disambiguation.
*
* @property disambiguatingDescription
* @type Text
*/
prototype.disambiguatingDescription = null;
/**
* Schema.org/alternateName
* An alias for the item.
*
* @property alternateName
* @type Text
*/
prototype.alternateName = null;
/**
* Schema.org/sameAs
* URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.
*
* @property sameAs
* @type URL
*/
prototype.sameAs = null;
/**
* Schema.org/additionalType
* An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally.
*
* @property additionalType
* @type URL
*/
prototype.additionalType = null;
/**
* Schema.org/potentialAction
* Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role.
*
* @property potentialAction
* @type Action
*/
prototype.potentialAction = null;
/**
* Schema.org/mainEntityOfPage
* Indicates a page (or other CreativeWork) for which this thing is the main entity being described. See [background notes](/docs/datamodel.html#mainEntityBackground) for details.
*
* @property mainEntityOfPage
* @type schema, URL | schema,CreativeWork
*/
prototype.mainEntityOfPage = null;
/**
* Returns the name of the thing
*
* @return {String} name of Thing
* @memberOf Thing
* @method getName
*/
prototype.getName = function() {
if (this.name != null && EcObject.isObject(this.name) && (this.name).hasOwnProperty("@value")) {
return (this.name)["@value"];
} else {
return this.name;
}
};
/**
* Method to set Thing name
*
* @param {String} name
* Name to set for this Thing
* @memberOf Thing
* @method setName
*/
prototype.setName = function(name) {
if (this.name != null && EcObject.isObject(this.name) && (this.name).hasOwnProperty("@value")) {
var obj = (this)["name"];
(obj)["@value"] = name;
(this)["name"] = obj;
} else {
this.name = name;
}
};
/**
* Returns the description of the thing
*
* @return {String} description of Thing
* @memberOf Thing
* @method getDescription
*/
prototype.getDescription = function() {
if (this.description != null && EcObject.isObject(this.description) && (this.description).hasOwnProperty("@value")) {
return (this.description)["@value"];
} else {
return this.description;
}
};
/**
* Method to set Thing description
*
* @param {String} description
* Description to set for its Thing
* @memberOf Thing
* @method setDescription
*/
prototype.setDescription = function(description) {
if (this.description != null && EcObject.isObject(this.description) && (this.description).hasOwnProperty("@value")) {
var obj = (this)["description"];
(obj)["@value"] = description;
(this)["description"] = obj;
} else {
this.description = description;
}
};
}, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Place
* Entities that have a somewhat fixed, physical extension.
*
* @author schema.org
* @class Place
* @module org.schema
* @extends Thing
*/
var Place = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "Place";
};
Place = stjs.extend(Place, Thing, [], function(constructor, prototype) {
/**
* Schema.org/reviews
* Review of the item.
*
* @property reviews
* @type Review
*/
prototype.reviews = null;
/**
* Schema.org/amenityFeature
* An amenity feature (e.g. a characteristic or service) of the Accommodation. This generic property does not make a statement about whether the feature is included in an offer for the main accommodation or available at extra costs.
*
* @property amenityFeature
* @type LocationFeatureSpecification
*/
prototype.amenityFeature = null;
/**
* Schema.org/event
* Upcoming or past event associated with this place, organization, or action.
*
* @property event
* @type Event
*/
prototype.event = null;
/**
* Schema.org/faxNumber
* The fax number.
*
* @property faxNumber
* @type Text
*/
prototype.faxNumber = null;
/**
* Schema.org/additionalProperty
* A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.\n\nNote: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
*
* @property additionalProperty
* @type PropertyValue
*/
prototype.additionalProperty = null;
/**
* Schema.org/isicV4
* The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.
*
* @property isicV4
* @type Text
*/
prototype.isicV4 = null;
/**
* Schema.org/events
* Upcoming or past events associated with this place or organization.
*
* @property events
* @type Event
*/
prototype.events = null;
/**
* Schema.org/containsPlace
* The basic containment relation between a place and another that it contains.
*
* @property containsPlace
* @type Place
*/
prototype.containsPlace = null;
/**
* Schema.org/maximumAttendeeCapacity
* The total number of individuals that may attend an event or venue.
*
* @property maximumAttendeeCapacity
* @type Integer
*/
prototype.maximumAttendeeCapacity = null;
/**
* Schema.org/maps
* A URL to a map of the place.
*
* @property maps
* @type URL
*/
prototype.maps = null;
/**
* Schema.org/containedIn
* The basic containment relation between a place and one that contains it.
*
* @property containedIn
* @type Place
*/
prototype.containedIn = null;
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/containedInPlace
* The basic containment relation between a place and one that contains it.
*
* @property containedInPlace
* @type Place
*/
prototype.containedInPlace = null;
/**
* Schema.org/photo
* A photograph of this place.
*
* @property photo
* @type schema, Photograph | schema,ImageObject
*/
prototype.photo = null;
/**
* Schema.org/address
* Physical address of the item.
*
* @property address
* @type schema, PostalAddress | schema,Text
*/
prototype.address = null;
/**
* Schema.org/geo
* The geo coordinates of the place.
*
* @property geo
* @type schema, GeoShape | schema,GeoCoordinates
*/
prototype.geo = null;
/**
* Schema.org/openingHoursSpecification
* The opening hours of a certain place.
*
* @property openingHoursSpecification
* @type OpeningHoursSpecification
*/
prototype.openingHoursSpecification = null;
/**
* Schema.org/photos
* Photographs of this place.
*
* @property photos
* @type schema, Photograph | schema,ImageObject
*/
prototype.photos = null;
/**
* Schema.org/map
* A URL to a map of the place.
*
* @property map
* @type URL
*/
prototype.map = null;
/**
* Schema.org/hasMap
* A URL to a map of the place.
*
* @property hasMap
* @type schema, URL | schema,Map
*/
prototype.hasMap = null;
/**
* Schema.org/smokingAllowed
* Indicates whether it is allowed to smoke in the place, e.g. in the restaurant, hotel or hotel room.
*
* @property smokingAllowed
* @type Boolean
*/
prototype.smokingAllowed = null;
/**
* Schema.org/telephone
* The telephone number.
*
* @property telephone
* @type Text
*/
prototype.telephone = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/specialOpeningHoursSpecification
* The special opening hours of a certain place.\n\nUse this to explicitly override general opening hours brought in scope by [[openingHoursSpecification]] or [[openingHours]].
*
* @property specialOpeningHoursSpecification
* @type OpeningHoursSpecification
*/
prototype.specialOpeningHoursSpecification = null;
/**
* Schema.org/branchCode
* A short textual code (also called "store code") that uniquely identifies a place of business. The code is typically assigned by the parentOrganization and used in structured URLs.\n\nFor example, in the URL http://www.starbucks.co.uk/store-locator/etc/detail/3047 the code "3047" is a branchCode for a particular branch.
*
* @property branchCode
* @type Text
*/
prototype.branchCode = null;
/**
* Schema.org/logo
* An associated logo.
*
* @property logo
* @type schema, URL | schema,ImageObject
*/
prototype.logo = null;
/**
* Schema.org/globalLocationNumber
* The [Global Location Number](http://www.gs1.org/gln) (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.
*
* @property globalLocationNumber
* @type Text
*/
prototype.globalLocationNumber = null;
}, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Person
* A person (alive, dead, undead, or fictional).
*
* @author schema.org
* @class Person
* @module org.schema
* @extends Thing
*/
var Person = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "Person";
};
Person = stjs.extend(Person, Thing, [], function(constructor, prototype) {
/**
* Schema.org/birthPlace
* The place where the person was born.
*
* @property birthPlace
* @type Place
*/
prototype.birthPlace = null;
/**
* Schema.org/relatedTo
* The most generic familial relation.
*
* @property relatedTo
* @type Person
*/
prototype.relatedTo = null;
/**
* Schema.org/alumniOf
* An organization that the person is an alumni of.
*
* @property alumniOf
* @type schema, Organization | schema,EducationalOrganization
*/
prototype.alumniOf = null;
/**
* Schema.org/memberOf
* An Organization (or ProgramMembership) to which this Person or Organization belongs.
*
* @property memberOf
* @type schema, Organization | schema,ProgramMembership
*/
prototype.memberOf = null;
/**
* Schema.org/affiliation
* An organization that this person is affiliated with. For example, a school/university, a club, or a team.
*
* @property affiliation
* @type Organization
*/
prototype.affiliation = null;
/**
* Schema.org/award
* An award won by or for this item.
*
* @property award
* @type Text
*/
prototype.award = null;
/**
* Schema.org/taxID
* The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain.
*
* @property taxID
* @type Text
*/
prototype.taxID = null;
/**
* Schema.org/contactPoints
* A contact point for a person or organization.
*
* @property contactPoints
* @type ContactPoint
*/
prototype.contactPoints = null;
/**
* Schema.org/faxNumber
* The fax number.
*
* @property faxNumber
* @type Text
*/
prototype.faxNumber = null;
/**
* Schema.org/children
* A child of the person.
*
* @property children
* @type Person
*/
prototype.children = null;
/**
* Schema.org/height
* The height of the item.
*
* @property height
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.height = null;
/**
* Schema.org/duns
* The Dun & Bradstreet DUNS number for identifying an organization or business person.
*
* @property duns
* @type Text
*/
prototype.duns = null;
/**
* Schema.org/isicV4
* The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.
*
* @property isicV4
* @type Text
*/
prototype.isicV4 = null;
/**
* Schema.org/additionalName
* An additional name for a Person, can be used for a middle name.
*
* @property additionalName
* @type Text
*/
prototype.additionalName = null;
/**
* Schema.org/parents
* A parents of the person.
*
* @property parents
* @type Person
*/
prototype.parents = null;
/**
* Schema.org/honorificSuffix
* An honorific suffix preceding a Person's name such as M.D. /PhD/MSCSW.
*
* @property honorificSuffix
* @type Text
*/
prototype.honorificSuffix = null;
/**
* Schema.org/worksFor
* Organizations that the person works for.
*
* @property worksFor
* @type Organization
*/
prototype.worksFor = null;
/**
* Schema.org/follows
* The most generic uni-directional social relation.
*
* @property follows
* @type Person
*/
prototype.follows = null;
/**
* Schema.org/colleagues
* A colleague of the person.
*
* @property colleagues
* @type Person
*/
prototype.colleagues = null;
/**
* Schema.org/brand
* The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
*
* @property brand
* @type schema, Organization | schema,Brand
*/
prototype.brand = null;
/**
* Schema.org/familyName
* Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the name property.
*
* @property familyName
* @type Text
*/
prototype.familyName = null;
/**
* Schema.org/homeLocation
* A contact location for a person's residence.
*
* @property homeLocation
* @type schema, ContactPoint | schema,Place
*/
prototype.homeLocation = null;
/**
* Schema.org/jobTitle
* The job title of the person (for example, Financial Manager).
*
* @property jobTitle
* @type Text
*/
prototype.jobTitle = null;
/**
* Schema.org/siblings
* A sibling of the person.
*
* @property siblings
* @type Person
*/
prototype.siblings = null;
/**
* Schema.org/address
* Physical address of the item.
*
* @property address
* @type schema, PostalAddress | schema,Text
*/
prototype.address = null;
/**
* Schema.org/deathDate
* Date of death.
*
* @property deathDate
* @type Date
*/
prototype.deathDate = null;
/**
* Schema.org/awards
* Awards won by or for this item.
*
* @property awards
* @type Text
*/
prototype.awards = null;
/**
* Schema.org/knows
* The most generic bi-directional social/work relation.
*
* @property knows
* @type Person
*/
prototype.knows = null;
/**
* Schema.org/contactPoint
* A contact point for a person or organization.
*
* @property contactPoint
* @type ContactPoint
*/
prototype.contactPoint = null;
/**
* Schema.org/performerIn
* Event that this person is a performer or participant in.
*
* @property performerIn
* @type Event
*/
prototype.performerIn = null;
/**
* Schema.org/funder
* A person or organization that supports (sponsors) something through some kind of financial contribution.
*
* @property funder
* @type schema, Organization | schema,Person
*/
prototype.funder = null;
/**
* Schema.org/email
* Email address.
*
* @property email
* @type Text
*/
prototype.email = null;
/**
* Schema.org/sibling
* A sibling of the person.
*
* @property sibling
* @type Person
*/
prototype.sibling = null;
/**
* Schema.org/vatID
* The Value-added Tax ID of the organization or person.
*
* @property vatID
* @type Text
*/
prototype.vatID = null;
/**
* Schema.org/gender
* Gender of the person. While http://schema.org/Male and http://schema.org/Female may be used, text strings are also acceptable for people who do not identify as a binary gender.
*
* @property gender
* @type schema, GenderType | schema,Text
*/
prototype.gender = null;
/**
* Schema.org/seeks
* A pointer to products or services sought by the organization or person (demand).
*
* @property seeks
* @type Demand
*/
prototype.seeks = null;
/**
* Schema.org/nationality
* Nationality of the person.
*
* @property nationality
* @type Country
*/
prototype.nationality = null;
/**
* Schema.org/sponsor
* A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event.
*
* @property sponsor
* @type schema, Organization | schema,Person
*/
prototype.sponsor = null;
/**
* Schema.org/weight
* The weight of the product or person.
*
* @property weight
* @type QuantitativeValue
*/
prototype.weight = null;
/**
* Schema.org/givenName
* Given name. In the U.S., the first name of a Person. This can be used along with familyName instead of the name property.
*
* @property givenName
* @type Text
*/
prototype.givenName = null;
/**
* Schema.org/hasPOS
* Points-of-Sales operated by the organization or person.
*
* @property hasPOS
* @type Place
*/
prototype.hasPOS = null;
/**
* Schema.org/telephone
* The telephone number.
*
* @property telephone
* @type Text
*/
prototype.telephone = null;
/**
* Schema.org/deathPlace
* The place where the person died.
*
* @property deathPlace
* @type Place
*/
prototype.deathPlace = null;
/**
* Schema.org/colleague
* A colleague of the person.
*
* @property colleague
* @type schema, URL | schema,Person
*/
prototype.colleague = null;
/**
* Schema.org/netWorth
* The total financial value of the person as calculated by subtracting assets from liabilities.
*
* @property netWorth
* @type schema, PriceSpecification | schema,MonetaryAmount
*/
prototype.netWorth = null;
/**
* Schema.org/honorificPrefix
* An honorific prefix preceding a Person's name such as Dr/Mrs/Mr.
*
* @property honorificPrefix
* @type Text
*/
prototype.honorificPrefix = null;
/**
* Schema.org/spouse
* The person's spouse.
*
* @property spouse
* @type Person
*/
prototype.spouse = null;
/**
* Schema.org/owns
* Products owned by the organization or person.
*
* @property owns
* @type schema, OwnershipInfo | schema,Product
*/
prototype.owns = null;
/**
* Schema.org/naics
* The North American Industry Classification System (NAICS) code for a particular organization or business person.
*
* @property naics
* @type Text
*/
prototype.naics = null;
/**
* Schema.org/birthDate
* Date of birth.
*
* @property birthDate
* @type Date
*/
prototype.birthDate = null;
/**
* Schema.org/workLocation
* A contact location for a person's place of work.
*
* @property workLocation
* @type schema, ContactPoint | schema,Place
*/
prototype.workLocation = null;
/**
* Schema.org/hasOfferCatalog
* Indicates an OfferCatalog listing for this Organization, Person, or Service.
*
* @property hasOfferCatalog
* @type OfferCatalog
*/
prototype.hasOfferCatalog = null;
/**
* Schema.org/makesOffer
* A pointer to products or services offered by the organization or person.
*
* @property makesOffer
* @type Offer
*/
prototype.makesOffer = null;
/**
* Schema.org/parent
* A parent of this person.
*
* @property parent
* @type Person
*/
prototype.parent = null;
/**
* Schema.org/globalLocationNumber
* The [Global Location Number](http://www.gs1.org/gln) (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.
*
* @property globalLocationNumber
* @type Text
*/
prototype.globalLocationNumber = null;
}, {birthPlace: "Place", relatedTo: "Person", alumniOf: "Object", memberOf: "Object", affiliation: "Organization", contactPoints: "ContactPoint", children: "Person", height: "Object", parents: "Person", worksFor: "Organization", follows: "Person", colleagues: "Person", brand: "Object", homeLocation: "Object", siblings: "Person", address: "Object", knows: "Person", contactPoint: "ContactPoint", performerIn: "Event", funder: "Object", sibling: "Person", gender: "Object", seeks: "Demand", nationality: "Country", sponsor: "Object", weight: "QuantitativeValue", hasPOS: "Place", deathPlace: "Place", colleague: "Object", netWorth: "Object", spouse: "Person", owns: "Object", workLocation: "Object", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", parent: "Person", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Intangible
* A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc.
*
* @author schema.org
* @class Intangible
* @module org.schema
* @extends Thing
*/
var Intangible = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "Intangible";
};
Intangible = stjs.extend(Intangible, Thing, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CreativeWork
* The most generic kind of creative work, including books, movies, photographs, software programs, etc.
*
* @author schema.org
* @class CreativeWork
* @module org.schema
* @extends Thing
*/
var CreativeWork = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "CreativeWork";
};
CreativeWork = stjs.extend(CreativeWork, Thing, [], function(constructor, prototype) {
/**
* Schema.org/contributor
* A secondary contributor to the CreativeWork or Event.
*
* @property contributor
* @type schema, Organization | schema,Person
*/
prototype.contributor = null;
/**
* Schema.org/reviews
* Review of the item.
*
* @property reviews
* @type Review
*/
prototype.reviews = null;
/**
* Schema.org/keywords
* Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.
*
* @property keywords
* @type Text
*/
prototype.keywords = null;
/**
* Schema.org/audience
* An intended audience, i.e. a group for whom something was created.
*
* @property audience
* @type Audience
*/
prototype.audience = null;
/**
* Schema.org/timeRequired
* Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'.
*
* @property timeRequired
* @type Duration
*/
prototype.timeRequired = null;
/**
* Schema.org/publication
* A publication event associated with the item.
*
* @property publication
* @type PublicationEvent
*/
prototype.publication = null;
/**
* Schema.org/award
* An award won by or for this item.
*
* @property award
* @type Text
*/
prototype.award = null;
/**
* Schema.org/contentLocation
* The location depicted or described in the content. For example, the location in a photograph or painting.
*
* @property contentLocation
* @type Place
*/
prototype.contentLocation = null;
/**
* Schema.org/temporalCoverage
* The temporalCoverage of a CreativeWork indicates the period that the content applies to, i.e. that it describes, either as a DateTime or as a textual string indicating a time period in [ISO 8601 time interval format](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals). In
* the case of a Dataset it will typically indicate the relevant time period in a precise notation (e.g. for a 2011 census dataset, the year 2011 would be written "2011/2012"). Other forms of content e.g. ScholarlyArticle, Book, TVSeries or TVEpisode may indicate their temporalCoverage in broader terms - textually or via well-known URL.
* Written works such as books may sometimes have precise temporal coverage too, e.g. a work set in 1939 - 1945 can be indicated in ISO 8601 interval format format via "1939/1945".
*
* @property temporalCoverage
* @type schema, URL | schema,Text | schema,DateTime
*/
prototype.temporalCoverage = null;
/**
* Schema.org/isBasedOn
* A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html.
*
* @property isBasedOn
* @type schema, URL | schema,CreativeWork | schema,Product
*/
prototype.isBasedOn = null;
/**
* Schema.org/headline
* Headline of the article.
*
* @property headline
* @type Text
*/
prototype.headline = null;
/**
* Schema.org/fileFormat
* Media type, typically MIME format (see [IANA site](http://www.iana.org/assignments/media-types/media-types.xhtml)) of the content e.g. application/zip of a SoftwareApplication binary. In cases where a CreativeWork has several media type representations, 'encoding' can be used to indicate each MediaObject alongside particular fileFormat information. Unregistered or niche file formats can be indicated instead via the most appropriate URL, e.g. defining Web page or a Wikipedia entry.
*
* @property fileFormat
* @type schema, URL | schema,Text
*/
prototype.fileFormat = null;
/**
* Schema.org/interactionStatistic
* The number of interactions for the CreativeWork using the WebSite or SoftwareApplication. The most specific child type of InteractionCounter should be used.
*
* @property interactionStatistic
* @type InteractionCounter
*/
prototype.interactionStatistic = null;
/**
* Schema.org/recordedAt
* The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event.
*
* @property recordedAt
* @type Event
*/
prototype.recordedAt = null;
/**
* Schema.org/isAccessibleForFree
* A flag to signal that the publication is accessible for free.
*
* @property isAccessibleForFree
* @type Boolean
*/
prototype.isAccessibleForFree = null;
/**
* Schema.org/isPartOf
* Indicates a CreativeWork that this CreativeWork is (in some sense) part of.
*
* @property isPartOf
* @type CreativeWork
*/
prototype.isPartOf = null;
/**
* Schema.org/exampleOfWork
* A creative work that this work is an example/instance/realization/derivation of.
*
* @property exampleOfWork
* @type CreativeWork
*/
prototype.exampleOfWork = null;
/**
* Schema.org/accessibilityFeature
* Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility ([WebSchemas wiki lists possible values](http://www.w3.org/wiki/WebSchemas/Accessibility)).
*
* @property accessibilityFeature
* @type Text
*/
prototype.accessibilityFeature = null;
/**
* Schema.org/dateCreated
* The date on which the CreativeWork was created or the item was added to a DataFeed.
*
* @property dateCreated
* @type schema, DateTime | schema,Date
*/
prototype.dateCreated = null;
/**
* Schema.org/releasedEvent
* The place and time the release was issued, expressed as a PublicationEvent.
*
* @property releasedEvent
* @type PublicationEvent
*/
prototype.releasedEvent = null;
/**
* Schema.org/publisher
* The publisher of the creative work.
*
* @property publisher
* @type schema, Organization | schema,Person
*/
prototype.publisher = null;
/**
* Schema.org/accessibilityControl
* Identifies input methods that are sufficient to fully control the described resource ([WebSchemas wiki lists possible values](http://www.w3.org/wiki/WebSchemas/Accessibility)).
*
* @property accessibilityControl
* @type Text
*/
prototype.accessibilityControl = null;
/**
* Schema.org/isFamilyFriendly
* Indicates whether this content is family friendly.
*
* @property isFamilyFriendly
* @type Boolean
*/
prototype.isFamilyFriendly = null;
/**
* Schema.org/encoding
* A media object that encodes this CreativeWork. This property is a synonym for associatedMedia.
*
* @property encoding
* @type MediaObject
*/
prototype.encoding = null;
/**
* Schema.org/alternativeHeadline
* A secondary title of the CreativeWork.
*
* @property alternativeHeadline
* @type Text
*/
prototype.alternativeHeadline = null;
/**
* Schema.org/educationalUse
* The purpose of a work in the context of education; for example, 'assignment', 'group work'.
*
* @property educationalUse
* @type Text
*/
prototype.educationalUse = null;
/**
* Schema.org/creator
* The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork.
*
* @property creator
* @type schema, Organization | schema,Person
*/
prototype.creator = null;
/**
* Schema.org/hasPart
* Indicates a CreativeWork that is (in some sense) a part of this CreativeWork.
*
* @property hasPart
* @type CreativeWork
*/
prototype.hasPart = null;
/**
* Schema.org/license
* A license document that applies to this content, typically indicated by URL.
*
* @property license
* @type schema, URL | schema,CreativeWork
*/
prototype.license = null;
/**
* Schema.org/translator
* Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market, or that translates during some event.
*
* @property translator
* @type schema, Organization | schema,Person
*/
prototype.translator = null;
/**
* Schema.org/offers
* An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event.
*
* @property offers
* @type Offer
*/
prototype.offers = null;
/**
* Schema.org/publishingPrinciples
* Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork.
*
* @property publishingPrinciples
* @type URL
*/
prototype.publishingPrinciples = null;
/**
* Schema.org/schemaVersion
* Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application.
*
* @property schemaVersion
* @type schema, URL | schema,Text
*/
prototype.schemaVersion = null;
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/position
* The position of an item in a series or sequence of items.
*
* @property position
* @type schema, Integer | schema,Text
*/
prototype.position = null;
/**
* Schema.org/accessMode
* The human sensory perceptual system or cognitive faculty through which a person may process or perceive information. Expected values include: auditory, tactile, textual, visual, colorDependent, chartOnVisual, chemOnVisual, diagramOnVisual, mathOnVisual, musicOnVisual, textOnVisual.
*
* @property accessMode
* @type Text
*/
prototype.accessMode = null;
/**
* Schema.org/genre
* Genre of the creative work, broadcast channel or group.
*
* @property genre
* @type schema, URL | schema,Text
*/
prototype.genre = null;
/**
* Schema.org/character
* Fictional person connected with a creative work.
*
* @property character
* @type Person
*/
prototype.character = null;
/**
* Schema.org/commentCount
* The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere.
*
* @property commentCount
* @type Integer
*/
prototype.commentCount = null;
/**
* Schema.org/contentRating
* Official rating of a piece of content—for example,'MPAA PG-13'.
*
* @property contentRating
* @type Text
*/
prototype.contentRating = null;
/**
* Schema.org/awards
* Awards won by or for this item.
*
* @property awards
* @type Text
*/
prototype.awards = null;
/**
* Schema.org/accessModeSufficient
* A list of single or combined accessModes that are sufficient to understand all the intellectual content of a resource. Expected values include: auditory, tactile, textual, visual.
*
* @property accessModeSufficient
* @type Text
*/
prototype.accessModeSufficient = null;
/**
* Schema.org/producer
* The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.).
*
* @property producer
* @type schema, Organization | schema,Person
*/
prototype.producer = null;
/**
* Schema.org/editor
* Specifies the Person who edited the CreativeWork.
*
* @property editor
* @type Person
*/
prototype.editor = null;
/**
* Schema.org/locationCreated
* The location where the CreativeWork was created, which may not be the same as the location depicted in the CreativeWork.
*
* @property locationCreated
* @type Place
*/
prototype.locationCreated = null;
/**
* Schema.org/about
* The subject matter of the content.
*
* @property about
* @type Thing
*/
prototype.about = null;
/**
* Schema.org/audio
* An embedded audio object.
*
* @property audio
* @type AudioObject
*/
prototype.audio = null;
/**
* Schema.org/encodings
* A media object that encodes this CreativeWork.
*
* @property encodings
* @type MediaObject
*/
prototype.encodings = null;
/**
* Schema.org/thumbnailUrl
* A thumbnail image relevant to the Thing.
*
* @property thumbnailUrl
* @type URL
*/
prototype.thumbnailUrl = null;
/**
* Schema.org/funder
* A person or organization that supports (sponsors) something through some kind of financial contribution.
*
* @property funder
* @type schema, Organization | schema,Person
*/
prototype.funder = null;
/**
* Schema.org/typicalAgeRange
* The typical expected age range, e.g. '7-9', '11-'.
*
* @property typicalAgeRange
* @type Text
*/
prototype.typicalAgeRange = null;
/**
* Schema.org/accountablePerson
* Specifies the Person that is legally accountable for the CreativeWork.
*
* @property accountablePerson
* @type Person
*/
prototype.accountablePerson = null;
/**
* Schema.org/learningResourceType
* The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'.
*
* @property learningResourceType
* @type Text
*/
prototype.learningResourceType = null;
/**
* Schema.org/material
* A material that something is made from, e.g. leather, wool, cotton, paper.
*
* @property material
* @type schema, URL | schema,Text | schema,Product
*/
prototype.material = null;
/**
* Schema.org/interactivityType
* The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'.
*
* @property interactivityType
* @type Text
*/
prototype.interactivityType = null;
/**
* Schema.org/author
* The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.
*
* @property author
* @type schema, Organization | schema,Person
*/
prototype.author = null;
/**
* Schema.org/accessibilityHazard
* A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 ([WebSchemas wiki lists possible values](http://www.w3.org/wiki/WebSchemas/Accessibility)).
*
* @property accessibilityHazard
* @type Text
*/
prototype.accessibilityHazard = null;
/**
* Schema.org/sourceOrganization
* The Organization on whose behalf the creator was working.
*
* @property sourceOrganization
* @type Organization
*/
prototype.sourceOrganization = null;
/**
* Schema.org/sponsor
* A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event.
*
* @property sponsor
* @type schema, Organization | schema,Person
*/
prototype.sponsor = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/copyrightHolder
* The party holding the legal copyright to the CreativeWork.
*
* @property copyrightHolder
* @type schema, Organization | schema,Person
*/
prototype.copyrightHolder = null;
/**
* Schema.org/accessibilityAPI
* Indicates that the resource is compatible with the referenced accessibility API ([WebSchemas wiki lists possible values](http://www.w3.org/wiki/WebSchemas/Accessibility)).
*
* @property accessibilityAPI
* @type Text
*/
prototype.accessibilityAPI = null;
/**
* Schema.org/text
* The textual content of this CreativeWork.
*
* @property text
* @type Text
*/
prototype.text = null;
/**
* Schema.org/comment
* Comments, typically from users.
*
* @property comment
* @type Comment
*/
prototype.comment = null;
/**
* Schema.org/datePublished
* Date of first broadcast/publication.
*
* @property datePublished
* @type Date
*/
prototype.datePublished = null;
/**
* Schema.org/spatialCoverage
* The spatialCoverage of a CreativeWork indicates the place(s) which are the focus of the content. It is a subproperty of
* contentLocation intended primarily for more technical and detailed materials. For example with a Dataset, it indicates
* areas that the dataset describes: a dataset of New York weather would have spatialCoverage which was the place: the state of New York.
*
* @property spatialCoverage
* @type Place
*/
prototype.spatialCoverage = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/educationalAlignment
* An alignment to an established educational framework.
*
* @property educationalAlignment
* @type AlignmentObject
*/
prototype.educationalAlignment = null;
/**
* Schema.org/video
* An embedded video object.
*
* @property video
* @type VideoObject
*/
prototype.video = null;
/**
* Schema.org/version
* The version of the CreativeWork embodied by a specified resource.
*
* @property version
* @type schema, Number | schema,Text
*/
prototype.version = null;
/**
* Schema.org/mainEntity
* Indicates the primary entity described in some page or other CreativeWork.
*
* @property mainEntity
* @type Thing
*/
prototype.mainEntity = null;
/**
* Schema.org/associatedMedia
* A media object that encodes this CreativeWork. This property is a synonym for encoding.
*
* @property associatedMedia
* @type MediaObject
*/
prototype.associatedMedia = null;
/**
* Schema.org/workExample
* Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook.
*
* @property workExample
* @type CreativeWork
*/
prototype.workExample = null;
/**
* Schema.org/copyrightYear
* The year during which the claimed copyright for the CreativeWork was first asserted.
*
* @property copyrightYear
* @type Number
*/
prototype.copyrightYear = null;
/**
* Schema.org/accessibilitySummary
* A human-readable summary of specific accessibility features or deficiencies, consistent with the other accessibility metadata but expressing subtleties such as "short descriptions are present but long descriptions will be needed for non-visual users" or "short descriptions are present and no long descriptions are needed."
*
* @property accessibilitySummary
* @type Text
*/
prototype.accessibilitySummary = null;
/**
* Schema.org/mentions
* Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept.
*
* @property mentions
* @type Thing
*/
prototype.mentions = null;
/**
* Schema.org/citation
* A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.
*
* @property citation
* @type schema, Text | schema,CreativeWork
*/
prototype.citation = null;
/**
* Schema.org/discussionUrl
* A link to the page containing the comments of the CreativeWork.
*
* @property discussionUrl
* @type URL
*/
prototype.discussionUrl = null;
/**
* Schema.org/dateModified
* The date on which the CreativeWork was most recently modified or when the item's entry was modified within a DataFeed.
*
* @property dateModified
* @type schema, DateTime | schema,Date
*/
prototype.dateModified = null;
/**
* Schema.org/inLanguage
* The language of the content or performance or used in an action. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[availableLanguage]].
*
* @property inLanguage
* @type schema, Text | schema,Language
*/
prototype.inLanguage = null;
/**
* Schema.org/isBasedOnUrl
* A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html.
*
* @property isBasedOnUrl
* @type schema, URL | schema,CreativeWork | schema,Product
*/
prototype.isBasedOnUrl = null;
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Organization
* An organization such as a school, NGO, corporation, club, etc.
*
* @author schema.org
* @class Organization
* @module org.schema
* @extends Thing
*/
var Organization = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "Organization";
};
Organization = stjs.extend(Organization, Thing, [], function(constructor, prototype) {
/**
* Schema.org/reviews
* Review of the item.
*
* @property reviews
* @type Review
*/
prototype.reviews = null;
/**
* Schema.org/event
* Upcoming or past event associated with this place, organization, or action.
*
* @property event
* @type Event
*/
prototype.event = null;
/**
* Schema.org/member
* A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals.
*
* @property member
* @type schema, Organization | schema,Person
*/
prototype.member = null;
/**
* Schema.org/memberOf
* An Organization (or ProgramMembership) to which this Person or Organization belongs.
*
* @property memberOf
* @type schema, Organization | schema,ProgramMembership
*/
prototype.memberOf = null;
/**
* Schema.org/award
* An award won by or for this item.
*
* @property award
* @type Text
*/
prototype.award = null;
/**
* Schema.org/taxID
* The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain.
*
* @property taxID
* @type Text
*/
prototype.taxID = null;
/**
* Schema.org/contactPoints
* A contact point for a person or organization.
*
* @property contactPoints
* @type ContactPoint
*/
prototype.contactPoints = null;
/**
* Schema.org/faxNumber
* The fax number.
*
* @property faxNumber
* @type Text
*/
prototype.faxNumber = null;
/**
* Schema.org/duns
* The Dun & Bradstreet DUNS number for identifying an organization or business person.
*
* @property duns
* @type Text
*/
prototype.duns = null;
/**
* Schema.org/isicV4
* The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place.
*
* @property isicV4
* @type Text
*/
prototype.isicV4 = null;
/**
* Schema.org/events
* Upcoming or past events associated with this place or organization.
*
* @property events
* @type Event
*/
prototype.events = null;
/**
* Schema.org/leiCode
* An organization identifier that uniquely identifies a legal entity as defined in ISO 17442.
*
* @property leiCode
* @type Text
*/
prototype.leiCode = null;
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/numberOfEmployees
* The number of employees in an organization e.g. business.
*
* @property numberOfEmployees
* @type QuantitativeValue
*/
prototype.numberOfEmployees = null;
/**
* Schema.org/department
* A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe.
*
* @property department
* @type Organization
*/
prototype.department = null;
/**
* Schema.org/brand
* The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
*
* @property brand
* @type schema, Organization | schema,Brand
*/
prototype.brand = null;
/**
* Schema.org/areaServed
* The geographic area where a service or offered item is provided.
*
* @property areaServed
* @type schema, GeoShape | schema,Text | schema,Place | schema,AdministrativeArea
*/
prototype.areaServed = null;
/**
* Schema.org/parentOrganization
* The larger organization that this organization is a [[subOrganization]] of, if any.
*
* @property parentOrganization
* @type Organization
*/
prototype.parentOrganization = null;
/**
* Schema.org/address
* Physical address of the item.
*
* @property address
* @type schema, PostalAddress | schema,Text
*/
prototype.address = null;
/**
* Schema.org/awards
* Awards won by or for this item.
*
* @property awards
* @type Text
*/
prototype.awards = null;
/**
* Schema.org/contactPoint
* A contact point for a person or organization.
*
* @property contactPoint
* @type ContactPoint
*/
prototype.contactPoint = null;
/**
* Schema.org/funder
* A person or organization that supports (sponsors) something through some kind of financial contribution.
*
* @property funder
* @type schema, Organization | schema,Person
*/
prototype.funder = null;
/**
* Schema.org/subOrganization
* A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property.
*
* @property subOrganization
* @type Organization
*/
prototype.subOrganization = null;
/**
* Schema.org/foundingDate
* The date that this organization was founded.
*
* @property foundingDate
* @type Date
*/
prototype.foundingDate = null;
/**
* Schema.org/email
* Email address.
*
* @property email
* @type Text
*/
prototype.email = null;
/**
* Schema.org/alumni
* Alumni of an organization.
*
* @property alumni
* @type Person
*/
prototype.alumni = null;
/**
* Schema.org/vatID
* The Value-added Tax ID of the organization or person.
*
* @property vatID
* @type Text
*/
prototype.vatID = null;
/**
* Schema.org/seeks
* A pointer to products or services sought by the organization or person (demand).
*
* @property seeks
* @type Demand
*/
prototype.seeks = null;
/**
* Schema.org/sponsor
* A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event.
*
* @property sponsor
* @type schema, Organization | schema,Person
*/
prototype.sponsor = null;
/**
* Schema.org/members
* A member of this organization.
*
* @property members
* @type schema, Organization | schema,Person
*/
prototype.members = null;
/**
* Schema.org/location
* The location of for example where the event is happening, an organization is located, or where an action takes place.
*
* @property location
* @type schema, PostalAddress | schema,Text | schema,Place
*/
prototype.location = null;
/**
* Schema.org/serviceArea
* The geographic area where the service is provided.
*
* @property serviceArea
* @type schema, GeoShape | schema,Place | schema,AdministrativeArea
*/
prototype.serviceArea = null;
/**
* Schema.org/hasPOS
* Points-of-Sales operated by the organization or person.
*
* @property hasPOS
* @type Place
*/
prototype.hasPOS = null;
/**
* Schema.org/telephone
* The telephone number.
*
* @property telephone
* @type Text
*/
prototype.telephone = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/founder
* A person who founded this organization.
*
* @property founder
* @type Person
*/
prototype.founder = null;
/**
* Schema.org/founders
* A person who founded this organization.
*
* @property founders
* @type Person
*/
prototype.founders = null;
/**
* Schema.org/employee
* Someone working for this organization.
*
* @property employee
* @type Person
*/
prototype.employee = null;
/**
* Schema.org/logo
* An associated logo.
*
* @property logo
* @type schema, URL | schema,ImageObject
*/
prototype.logo = null;
/**
* Schema.org/owns
* Products owned by the organization or person.
*
* @property owns
* @type schema, OwnershipInfo | schema,Product
*/
prototype.owns = null;
/**
* Schema.org/legalName
* The official name of the organization, e.g. the registered company name.
*
* @property legalName
* @type Text
*/
prototype.legalName = null;
/**
* Schema.org/naics
* The North American Industry Classification System (NAICS) code for a particular organization or business person.
*
* @property naics
* @type Text
*/
prototype.naics = null;
/**
* Schema.org/employees
* People working for this organization.
*
* @property employees
* @type Person
*/
prototype.employees = null;
/**
* Schema.org/dissolutionDate
* The date that this organization was dissolved.
*
* @property dissolutionDate
* @type Date
*/
prototype.dissolutionDate = null;
/**
* Schema.org/foundingLocation
* The place where the Organization was founded.
*
* @property foundingLocation
* @type Place
*/
prototype.foundingLocation = null;
/**
* Schema.org/hasOfferCatalog
* Indicates an OfferCatalog listing for this Organization, Person, or Service.
*
* @property hasOfferCatalog
* @type OfferCatalog
*/
prototype.hasOfferCatalog = null;
/**
* Schema.org/makesOffer
* A pointer to products or services offered by the organization or person.
*
* @property makesOffer
* @type Offer
*/
prototype.makesOffer = null;
/**
* Schema.org/globalLocationNumber
* The [Global Location Number](http://www.gs1.org/gln) (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations.
*
* @property globalLocationNumber
* @type Text
*/
prototype.globalLocationNumber = null;
}, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Product
* Any offered product or service. For example: a pair of shoes; a concert ticket; the rental of a car; a haircut; or an episode of a TV show streamed online.
*
* @author schema.org
* @class Product
* @module org.schema
* @extends Thing
*/
var Product = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "Product";
};
Product = stjs.extend(Product, Thing, [], function(constructor, prototype) {
/**
* Schema.org/reviews
* Review of the item.
*
* @property reviews
* @type Review
*/
prototype.reviews = null;
/**
* Schema.org/audience
* An intended audience, i.e. a group for whom something was created.
*
* @property audience
* @type Audience
*/
prototype.audience = null;
/**
* Schema.org/award
* An award won by or for this item.
*
* @property award
* @type Text
*/
prototype.award = null;
/**
* Schema.org/isAccessoryOrSparePartFor
* A pointer to another product (or multiple products) for which this product is an accessory or spare part.
*
* @property isAccessoryOrSparePartFor
* @type Product
*/
prototype.isAccessoryOrSparePartFor = null;
/**
* Schema.org/gtin14
* The [GTIN-14](http://apps.gs1.org/GDD/glossary/Pages/GTIN-14.aspx) code of the product, or the product to which the offer refers. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin14
* @type Text
*/
prototype.gtin14 = null;
/**
* Schema.org/gtin13
* The [GTIN-13](http://apps.gs1.org/GDD/glossary/Pages/GTIN-13.aspx) code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin13
* @type Text
*/
prototype.gtin13 = null;
/**
* Schema.org/gtin12
* The [GTIN-12](http://apps.gs1.org/GDD/glossary/Pages/GTIN-12.aspx) code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin12
* @type Text
*/
prototype.gtin12 = null;
/**
* Schema.org/height
* The height of the item.
*
* @property height
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.height = null;
/**
* Schema.org/additionalProperty
* A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.\n\nNote: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
*
* @property additionalProperty
* @type PropertyValue
*/
prototype.additionalProperty = null;
/**
* Schema.org/isRelatedTo
* A pointer to another, somehow related product (or multiple products).
*
* @property isRelatedTo
* @type schema, Service | schema,Product
*/
prototype.isRelatedTo = null;
/**
* Schema.org/purchaseDate
* The date the item e.g. vehicle was purchased by the current owner.
*
* @property purchaseDate
* @type Date
*/
prototype.purchaseDate = null;
/**
* Schema.org/offers
* An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event.
*
* @property offers
* @type Offer
*/
prototype.offers = null;
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/mpn
* The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.
*
* @property mpn
* @type Text
*/
prototype.mpn = null;
/**
* Schema.org/releaseDate
* The release date of a product or product model. This can be used to distinguish the exact variant of a product.
*
* @property releaseDate
* @type Date
*/
prototype.releaseDate = null;
/**
* Schema.org/productionDate
* The date of production of the item, e.g. vehicle.
*
* @property productionDate
* @type Date
*/
prototype.productionDate = null;
/**
* Schema.org/brand
* The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
*
* @property brand
* @type schema, Organization | schema,Brand
*/
prototype.brand = null;
/**
* Schema.org/depth
* The depth of the item.
*
* @property depth
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.depth = null;
/**
* Schema.org/awards
* Awards won by or for this item.
*
* @property awards
* @type Text
*/
prototype.awards = null;
/**
* Schema.org/model
* The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties.
*
* @property model
* @type schema, ProductModel | schema,Text
*/
prototype.model = null;
/**
* Schema.org/color
* The color of the product.
*
* @property color
* @type Text
*/
prototype.color = null;
/**
* Schema.org/sku
* The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
*
* @property sku
* @type Text
*/
prototype.sku = null;
/**
* Schema.org/gtin8
* The [GTIN-8](http://apps.gs1.org/GDD/glossary/Pages/GTIN-8.aspx) code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin8
* @type Text
*/
prototype.gtin8 = null;
/**
* Schema.org/productID
* The product identifier, such as ISBN. For example: ``` meta itemprop="productID" content="isbn:123-456-789" ```.
*
* @property productID
* @type Text
*/
prototype.productID = null;
/**
* Schema.org/material
* A material that something is made from, e.g. leather, wool, cotton, paper.
*
* @property material
* @type schema, URL | schema,Text | schema,Product
*/
prototype.material = null;
/**
* Schema.org/isConsumableFor
* A pointer to another product (or multiple products) for which this product is a consumable.
*
* @property isConsumableFor
* @type Product
*/
prototype.isConsumableFor = null;
/**
* Schema.org/weight
* The weight of the product or person.
*
* @property weight
* @type QuantitativeValue
*/
prototype.weight = null;
/**
* Schema.org/isSimilarTo
* A pointer to another, functionally similar product (or multiple products).
*
* @property isSimilarTo
* @type schema, Service | schema,Product
*/
prototype.isSimilarTo = null;
/**
* Schema.org/width
* The width of the item.
*
* @property width
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.width = null;
/**
* Schema.org/itemCondition
* A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer.
*
* @property itemCondition
* @type OfferItemCondition
*/
prototype.itemCondition = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/manufacturer
* The manufacturer of the product.
*
* @property manufacturer
* @type Organization
*/
prototype.manufacturer = null;
/**
* Schema.org/logo
* An associated logo.
*
* @property logo
* @type schema, URL | schema,ImageObject
*/
prototype.logo = null;
/**
* Schema.org/category
* A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.
*
* @property category
* @type schema, Text | schema,Thing
*/
prototype.category = null;
}, {reviews: "Review", audience: "Audience", isAccessoryOrSparePartFor: "Product", height: "Object", additionalProperty: "PropertyValue", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", depth: "Object", model: "Object", material: "Object", isConsumableFor: "Product", weight: "QuantitativeValue", isSimilarTo: "Object", width: "Object", itemCondition: "OfferItemCondition", aggregateRating: "AggregateRating", manufacturer: "Organization", logo: "Object", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Action
* An action performed by a direct agent and indirect participants upon a direct object. Optionally happens at a location with the help of an inanimate instrument. The execution of the action may produce a result. Specific action sub-type documentation specifies the exact expectation of each argument/role.\n\nSee also [blog post](http://blog.schema.org/2014/04/announcing-schemaorg-actions.html) and [Actions overview document](http://schema.org/docs/actions.html).
*
* @author schema.org
* @class Action
* @module org.schema
* @extends Thing
*/
var Action = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "Action";
};
Action = stjs.extend(Action, Thing, [], function(constructor, prototype) {
/**
* Schema.org/startTime
* The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. e.g. John wrote a book from *January* to December.\n\nNote that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
*
* @property startTime
* @type DateTime
*/
prototype.startTime = null;
/**
* Schema.org/target
* Indicates a target EntryPoint for an Action.
*
* @property target
* @type EntryPoint
*/
prototype.target = null;
/**
* Schema.org/participant
* Other co-agents that participated in the action indirectly. e.g. John wrote a book with *Steve*.
*
* @property participant
* @type schema, Organization | schema,Person
*/
prototype.participant = null;
/**
* Schema.org/instrument
* The object that helped the agent perform the action. e.g. John wrote a book with *a pen*.
*
* @property instrument
* @type Thing
*/
prototype.instrument = null;
/**
* Schema.org/agent
* The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book.
*
* @property agent
* @type schema, Organization | schema,Person
*/
prototype.agent = null;
/**
* Schema.org/object
* The object upon which the action is carried out, whose state is kept intact or changed. Also known as the semantic roles patient, affected or undergoer (which change their state) or theme (which doesn't). e.g. John read *a book*.
*
* @property object
* @type Thing
*/
prototype.object = null;
/**
* Schema.org/actionStatus
* Indicates the current disposition of the Action.
*
* @property actionStatus
* @type ActionStatusType
*/
prototype.actionStatus = null;
/**
* Schema.org/result
* The result produced in the action. e.g. John wrote *a book*.
*
* @property result
* @type Thing
*/
prototype.result = null;
/**
* Schema.org/location
* The location of for example where the event is happening, an organization is located, or where an action takes place.
*
* @property location
* @type schema, PostalAddress | schema,Text | schema,Place
*/
prototype.location = null;
/**
* Schema.org/error
* For failed actions, more information on the cause of the failure.
*
* @property error
* @type Thing
*/
prototype.error = null;
/**
* Schema.org/endTime
* The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. e.g. John wrote a book from January to *December*.\n\nNote that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
*
* @property endTime
* @type DateTime
*/
prototype.endTime = null;
}, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Event
* An event happening at a certain time and location, such as a concert, lecture, or festival. Ticketing information may be added via the [[offers]] property. Repeated events may be structured as separate Event objects.
*
* @author schema.org
* @class Event
* @module org.schema
* @extends Thing
*/
var Event = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Thing.call(this);
this.context = "http://schema.org/";
this.type = "Event";
};
Event = stjs.extend(Event, Thing, [], function(constructor, prototype) {
/**
* Schema.org/contributor
* A secondary contributor to the CreativeWork or Event.
*
* @property contributor
* @type schema, Organization | schema,Person
*/
prototype.contributor = null;
/**
* Schema.org/attendees
* A person attending the event.
*
* @property attendees
* @type schema, Organization | schema,Person
*/
prototype.attendees = null;
/**
* Schema.org/performers
* The main performer or performers of the event—for example, a presenter, musician, or actor.
*
* @property performers
* @type schema, Organization | schema,Person
*/
prototype.performers = null;
/**
* Schema.org/composer
* The person or organization who wrote a composition, or who is the composer of a work performed at some event.
*
* @property composer
* @type schema, Organization | schema,Person
*/
prototype.composer = null;
/**
* Schema.org/performer
* A performer at the event—for example, a presenter, musician, musical group or actor.
*
* @property performer
* @type schema, Organization | schema,Person
*/
prototype.performer = null;
/**
* Schema.org/remainingAttendeeCapacity
* The number of attendee places for an event that remain unallocated.
*
* @property remainingAttendeeCapacity
* @type Integer
*/
prototype.remainingAttendeeCapacity = null;
/**
* Schema.org/isAccessibleForFree
* A flag to signal that the publication is accessible for free.
*
* @property isAccessibleForFree
* @type Boolean
*/
prototype.isAccessibleForFree = null;
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/eventStatus
* An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled.
*
* @property eventStatus
* @type EventStatusType
*/
prototype.eventStatus = null;
/**
* Schema.org/superEvent
* An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent.
*
* @property superEvent
* @type Event
*/
prototype.superEvent = null;
/**
* Schema.org/maximumAttendeeCapacity
* The total number of individuals that may attend an event or venue.
*
* @property maximumAttendeeCapacity
* @type Integer
*/
prototype.maximumAttendeeCapacity = null;
/**
* Schema.org/translator
* Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market, or that translates during some event.
*
* @property translator
* @type schema, Organization | schema,Person
*/
prototype.translator = null;
/**
* Schema.org/offers
* An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event.
*
* @property offers
* @type Offer
*/
prototype.offers = null;
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/duration
* The duration of the item (movie, audio recording, event, etc.) in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property duration
* @type Duration
*/
prototype.duration = null;
/**
* Schema.org/subEvent
* An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference.
*
* @property subEvent
* @type Event
*/
prototype.subEvent = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/attendee
* A person or organization attending the event.
*
* @property attendee
* @type schema, Organization | schema,Person
*/
prototype.attendee = null;
/**
* Schema.org/about
* The subject matter of the content.
*
* @property about
* @type Thing
*/
prototype.about = null;
/**
* Schema.org/funder
* A person or organization that supports (sponsors) something through some kind of financial contribution.
*
* @property funder
* @type schema, Organization | schema,Person
*/
prototype.funder = null;
/**
* Schema.org/typicalAgeRange
* The typical expected age range, e.g. '7-9', '11-'.
*
* @property typicalAgeRange
* @type Text
*/
prototype.typicalAgeRange = null;
/**
* Schema.org/doorTime
* The time admission will commence.
*
* @property doorTime
* @type DateTime
*/
prototype.doorTime = null;
/**
* Schema.org/sponsor
* A person or organization that supports a thing through a pledge, promise, or financial contribution. e.g. a sponsor of a Medical Study or a corporate sponsor of an event.
*
* @property sponsor
* @type schema, Organization | schema,Person
*/
prototype.sponsor = null;
/**
* Schema.org/location
* The location of for example where the event is happening, an organization is located, or where an action takes place.
*
* @property location
* @type schema, PostalAddress | schema,Text | schema,Place
*/
prototype.location = null;
/**
* Schema.org/recordedIn
* The CreativeWork that captured all or part of this Event.
*
* @property recordedIn
* @type CreativeWork
*/
prototype.recordedIn = null;
/**
* Schema.org/organizer
* An organizer of an Event.
*
* @property organizer
* @type schema, Organization | schema,Person
*/
prototype.organizer = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/startDate
* The start date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property startDate
* @type schema, DateTime | schema,Date
*/
prototype.startDate = null;
/**
* Schema.org/previousStartDate
* Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated.
*
* @property previousStartDate
* @type Date
*/
prototype.previousStartDate = null;
/**
* Schema.org/workFeatured
* A work featured in some event, e.g. exhibited in an ExhibitionEvent.
* Specific subproperties are available for workPerformed (e.g. a play), or a workPresented (a Movie at a ScreeningEvent).
*
* @property workFeatured
* @type CreativeWork
*/
prototype.workFeatured = null;
/**
* Schema.org/workPerformed
* A work performed in some event, for example a play performed in a TheaterEvent.
*
* @property workPerformed
* @type CreativeWork
*/
prototype.workPerformed = null;
/**
* Schema.org/endDate
* The end date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property endDate
* @type schema, DateTime | schema,Date
*/
prototype.endDate = null;
/**
* Schema.org/inLanguage
* The language of the content or performance or used in an action. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[availableLanguage]].
*
* @property inLanguage
* @type schema, Text | schema,Language
*/
prototype.inLanguage = null;
/**
* Schema.org/subEvents
* Events that are a part of this event. For example, a conference event includes many presentations, each subEvents of the conference.
*
* @property subEvents
* @type Event
*/
prototype.subEvents = null;
}, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Residence
* The place where a person lives.
*
* @author schema.org
* @class Residence
* @module org.schema
* @extends Place
*/
var Residence = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Place.call(this);
this.context = "http://schema.org/";
this.type = "Residence";
};
Residence = stjs.extend(Residence, Place, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Accommodation
* An accommodation is a place that can accommodate human beings, e.g. a hotel room, a camping pitch, or a meeting room. Many accommodations are for overnight stays, but this is not a mandatory requirement.
* For more specific types of accommodations not defined in schema.org, one can use additionalType with external vocabularies.
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Accommodation
* @module org.schema
* @extends Place
*/
var Accommodation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Place.call(this);
this.context = "http://schema.org/";
this.type = "Accommodation";
};
Accommodation = stjs.extend(Accommodation, Place, [], function(constructor, prototype) {
/**
* Schema.org/amenityFeature
* An amenity feature (e.g. a characteristic or service) of the Accommodation. This generic property does not make a statement about whether the feature is included in an offer for the main accommodation or available at extra costs.
*
* @property amenityFeature
* @type LocationFeatureSpecification
*/
prototype.amenityFeature = null;
/**
* Schema.org/floorSize
* The size of the accommodation, e.g. in square meter or squarefoot.
* Typical unit code(s): MTK for square meter, FTK for square foot, or YDK for square yard
*
* @property floorSize
* @type QuantitativeValue
*/
prototype.floorSize = null;
/**
* Schema.org/permittedUsage
* Indications regarding the permitted usage of the accommodation.
*
* @property permittedUsage
* @type Text
*/
prototype.permittedUsage = null;
/**
* Schema.org/petsAllowed
* Indicates whether pets are allowed to enter the accommodation or lodging business. More detailed information can be put in a text value.
*
* @property petsAllowed
* @type schema, Boolean | schema,Text
*/
prototype.petsAllowed = null;
/**
* Schema.org/numberOfRooms
* The number of rooms (excluding bathrooms and closets) of the acccommodation or lodging business.
* Typical unit code(s): ROM for room or C62 for no unit. The type of room can be put in the unitText property of the QuantitativeValue.
*
* @property numberOfRooms
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfRooms = null;
}, {amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LandmarksOrHistoricalBuildings
* An historical landmark or building.
*
* @author schema.org
* @class LandmarksOrHistoricalBuildings
* @module org.schema
* @extends Place
*/
var LandmarksOrHistoricalBuildings = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Place.call(this);
this.context = "http://schema.org/";
this.type = "LandmarksOrHistoricalBuildings";
};
LandmarksOrHistoricalBuildings = stjs.extend(LandmarksOrHistoricalBuildings, Place, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CivicStructure
* A public structure, such as a town hall or concert hall.
*
* @author schema.org
* @class CivicStructure
* @module org.schema
* @extends Place
*/
var CivicStructure = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Place.call(this);
this.context = "http://schema.org/";
this.type = "CivicStructure";
};
CivicStructure = stjs.extend(CivicStructure, Place, [], function(constructor, prototype) {
/**
* Schema.org/openingHours
* The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.\n\n* Days are specified using the following two-letter combinations: ```Mo```, ```Tu```, ```We```, ```Th```, ```Fr```, ```Sa```, ```Su```.\n* Times are specified using 24:00 time. For example, 3pm is specified as ```15:00```. \n* Here is an example: <code><time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time></code>.\n* If a business is open 7 days a week, then it can be specified as <code><time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time></code>.
*
* @property openingHours
* @type Text
*/
prototype.openingHours = null;
}, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Landform
* A landform or physical feature. Landform elements include mountains, plains, lakes, rivers, seascape and oceanic waterbody interface features such as bays, peninsulas, seas and so forth, including sub-aqueous terrain features such as submersed mountain ranges, volcanoes, and the great ocean basins.
*
* @author schema.org
* @class Landform
* @module org.schema
* @extends Place
*/
var Landform = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Place.call(this);
this.context = "http://schema.org/";
this.type = "Landform";
};
Landform = stjs.extend(Landform, Place, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AdministrativeArea
* A geographical region, typically under the jurisdiction of a particular government.
*
* @author schema.org
* @class AdministrativeArea
* @module org.schema
* @extends Place
*/
var AdministrativeArea = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Place.call(this);
this.context = "http://schema.org/";
this.type = "AdministrativeArea";
};
AdministrativeArea = stjs.extend(AdministrativeArea, Place, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TouristAttraction
* A tourist attraction.
*
* @author schema.org
* @class TouristAttraction
* @module org.schema
* @extends Place
*/
var TouristAttraction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Place.call(this);
this.context = "http://schema.org/";
this.type = "TouristAttraction";
};
TouristAttraction = stjs.extend(TouristAttraction, Place, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Quantity
* Quantities such as distance, time, mass, weight, etc. Particular instances of say Mass are entities like '3 Kg' or '4 milligrams'.
*
* @author schema.org
* @class Quantity
* @module org.schema
* @extends Intangible
*/
var Quantity = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Quantity";
};
Quantity = stjs.extend(Quantity, Intangible, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OrderItem
* An order item is a line of an order. It includes the quantity and shipping details of a bought offer.
*
* @author schema.org
* @class OrderItem
* @module org.schema
* @extends Intangible
*/
var OrderItem = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "OrderItem";
};
OrderItem = stjs.extend(OrderItem, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/orderDelivery
* The delivery of the parcel related to this order or order item.
*
* @property orderDelivery
* @type ParcelDelivery
*/
prototype.orderDelivery = null;
/**
* Schema.org/orderQuantity
* The number of the item ordered. If the property is not set, assume the quantity is one.
*
* @property orderQuantity
* @type Number
*/
prototype.orderQuantity = null;
/**
* Schema.org/orderItemStatus
* The current status of the order item.
*
* @property orderItemStatus
* @type OrderStatus
*/
prototype.orderItemStatus = null;
/**
* Schema.org/orderedItem
* The item ordered.
*
* @property orderedItem
* @type schema, OrderItem | schema,Product
*/
prototype.orderedItem = null;
/**
* Schema.org/orderItemNumber
* The identifier of the order item.
*
* @property orderItemNumber
* @type Text
*/
prototype.orderItemNumber = null;
}, {orderDelivery: "ParcelDelivery", orderItemStatus: "OrderStatus", orderedItem: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Rating
* A rating is an evaluation on a numeric scale, such as 1 to 5 stars.
*
* @author schema.org
* @class Rating
* @module org.schema
* @extends Intangible
*/
var Rating = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Rating";
};
Rating = stjs.extend(Rating, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/bestRating
* The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed.
*
* @property bestRating
* @type schema, Number | schema,Text
*/
prototype.bestRating = null;
/**
* Schema.org/ratingValue
* The rating for the content.
*
* @property ratingValue
* @type schema, Number | schema,Text
*/
prototype.ratingValue = null;
/**
* Schema.org/worstRating
* The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed.
*
* @property worstRating
* @type schema, Number | schema,Text
*/
prototype.worstRating = null;
/**
* Schema.org/author
* The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.
*
* @property author
* @type schema, Organization | schema,Person
*/
prototype.author = null;
}, {bestRating: "Object", ratingValue: "Object", worstRating: "Object", author: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ProgramMembership
* Used to describe membership in a loyalty programs (e.g. "StarAliance"), traveler clubs (e.g. "AAA"), purchase clubs ("Safeway Club"), etc.
*
* @author schema.org
* @class ProgramMembership
* @module org.schema
* @extends Intangible
*/
var ProgramMembership = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "ProgramMembership";
};
ProgramMembership = stjs.extend(ProgramMembership, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/member
* A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals.
*
* @property member
* @type schema, Organization | schema,Person
*/
prototype.member = null;
/**
* Schema.org/programName
* The program providing the membership.
*
* @property programName
* @type Text
*/
prototype.programName = null;
/**
* Schema.org/members
* A member of this organization.
*
* @property members
* @type schema, Organization | schema,Person
*/
prototype.members = null;
/**
* Schema.org/hostingOrganization
* The organization (airline, travelers' club, etc.) the membership is made with.
*
* @property hostingOrganization
* @type Organization
*/
prototype.hostingOrganization = null;
/**
* Schema.org/membershipNumber
* A unique identifier for the membership.
*
* @property membershipNumber
* @type Text
*/
prototype.membershipNumber = null;
}, {member: "Object", members: "Object", hostingOrganization: "Organization", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Brand
* A brand is a name used by an organization or business person for labeling a product, product group, or similar.
*
* @author schema.org
* @class Brand
* @module org.schema
* @extends Intangible
*/
var Brand = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Brand";
};
Brand = stjs.extend(Brand, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/logo
* An associated logo.
*
* @property logo
* @type schema, URL | schema,ImageObject
*/
prototype.logo = null;
}, {review: "Review", aggregateRating: "AggregateRating", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Permit
* A permit issued by an organization, e.g. a parking pass.
*
* @author schema.org
* @class Permit
* @module org.schema
* @extends Intangible
*/
var Permit = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Permit";
};
Permit = stjs.extend(Permit, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/validFrom
* The date when the item becomes valid.
*
* @property validFrom
* @type DateTime
*/
prototype.validFrom = null;
/**
* Schema.org/validUntil
* The date when the item is no longer valid.
*
* @property validUntil
* @type Date
*/
prototype.validUntil = null;
/**
* Schema.org/validIn
* The geographic area where the permit is valid.
*
* @property validIn
* @type AdministrativeArea
*/
prototype.validIn = null;
/**
* Schema.org/issuedBy
* The organization issuing the ticket or permit.
*
* @property issuedBy
* @type Organization
*/
prototype.issuedBy = null;
/**
* Schema.org/issuedThrough
* The service through with the permit was granted.
*
* @property issuedThrough
* @type Service
*/
prototype.issuedThrough = null;
/**
* Schema.org/permitAudience
* The target audience for this permit.
*
* @property permitAudience
* @type Audience
*/
prototype.permitAudience = null;
/**
* Schema.org/validFor
* The time validity of the permit.
*
* @property validFor
* @type Duration
*/
prototype.validFor = null;
}, {validIn: "AdministrativeArea", issuedBy: "Organization", issuedThrough: "Service", permitAudience: "Audience", validFor: "Duration", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Flight
* An airline flight.
*
* @author schema.org
* @class Flight
* @module org.schema
* @extends Intangible
*/
var Flight = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Flight";
};
Flight = stjs.extend(Flight, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/departureTerminal
* Identifier of the flight's departure terminal.
*
* @property departureTerminal
* @type Text
*/
prototype.departureTerminal = null;
/**
* Schema.org/aircraft
* The kind of aircraft (e.g., "Boeing 747").
*
* @property aircraft
* @type schema, Text | schema,Vehicle
*/
prototype.aircraft = null;
/**
* Schema.org/departureTime
* The expected departure time.
*
* @property departureTime
* @type DateTime
*/
prototype.departureTime = null;
/**
* Schema.org/arrivalTerminal
* Identifier of the flight's arrival terminal.
*
* @property arrivalTerminal
* @type Text
*/
prototype.arrivalTerminal = null;
/**
* Schema.org/flightNumber
* The unique identifier for a flight including the airline IATA code. For example, if describing United flight 110, where the IATA code for United is 'UA', the flightNumber is 'UA110'.
*
* @property flightNumber
* @type Text
*/
prototype.flightNumber = null;
/**
* Schema.org/mealService
* Description of the meals that will be provided or available for purchase.
*
* @property mealService
* @type Text
*/
prototype.mealService = null;
/**
* Schema.org/seller
* An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider.
*
* @property seller
* @type schema, Organization | schema,Person
*/
prototype.seller = null;
/**
* Schema.org/arrivalTime
* The expected arrival time.
*
* @property arrivalTime
* @type DateTime
*/
prototype.arrivalTime = null;
/**
* Schema.org/departureGate
* Identifier of the flight's departure gate.
*
* @property departureGate
* @type Text
*/
prototype.departureGate = null;
/**
* Schema.org/estimatedFlightDuration
* The estimated time the flight will take.
*
* @property estimatedFlightDuration
* @type schema, Text | schema,Duration
*/
prototype.estimatedFlightDuration = null;
/**
* Schema.org/departureAirport
* The airport where the flight originates.
*
* @property departureAirport
* @type Airport
*/
prototype.departureAirport = null;
/**
* Schema.org/flightDistance
* The distance of the flight.
*
* @property flightDistance
* @type schema, Text | schema,Distance
*/
prototype.flightDistance = null;
/**
* Schema.org/arrivalAirport
* The airport where the flight terminates.
*
* @property arrivalAirport
* @type Airport
*/
prototype.arrivalAirport = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/webCheckinTime
* The time when a passenger can check into the flight online.
*
* @property webCheckinTime
* @type DateTime
*/
prototype.webCheckinTime = null;
/**
* Schema.org/boardingPolicy
* The type of boarding policy used by the airline (e.g. zone-based or group-based).
*
* @property boardingPolicy
* @type BoardingPolicyType
*/
prototype.boardingPolicy = null;
/**
* Schema.org/arrivalGate
* Identifier of the flight's arrival gate.
*
* @property arrivalGate
* @type Text
*/
prototype.arrivalGate = null;
/**
* Schema.org/carrier
* 'carrier' is an out-dated term indicating the 'provider' for parcel delivery and flights.
*
* @property carrier
* @type Organization
*/
prototype.carrier = null;
}, {aircraft: "Object", seller: "Object", estimatedFlightDuration: "Object", departureAirport: "Airport", flightDistance: "Object", arrivalAirport: "Airport", provider: "Object", boardingPolicy: "BoardingPolicyType", carrier: "Organization", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Language
* Natural languages such as Spanish, Tamil, Hindi, English, etc. Formal language code tags expressed in [BCP 47](https://en.wikipedia.org/wiki/IETF_language_tag) can be used via the [[alternateName]] property. The Language type previously also covered programming languages such as Scheme and Lisp, which are now best represented using [[ComputerLanguage]].
*
* @author schema.org
* @class Language
* @module org.schema
* @extends Intangible
*/
var Language = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Language";
};
Language = stjs.extend(Language, Intangible, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GameServer
* Server that provides game interaction in a multiplayer game.
*
* @author schema.org
* @class GameServer
* @module org.schema
* @extends Intangible
*/
var GameServer = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "GameServer";
};
GameServer = stjs.extend(GameServer, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/game
* Video game which is played on this server.
*
* @property game
* @type VideoGame
*/
prototype.game = null;
/**
* Schema.org/serverStatus
* Status of a game server.
*
* @property serverStatus
* @type GameServerStatus
*/
prototype.serverStatus = null;
/**
* Schema.org/playersOnline
* Number of players on the server.
*
* @property playersOnline
* @type Integer
*/
prototype.playersOnline = null;
}, {game: "VideoGame", serverStatus: "GameServerStatus", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DigitalDocumentPermission
* A permission for a particular person or group to access a particular file.
*
* @author schema.org
* @class DigitalDocumentPermission
* @module org.schema
* @extends Intangible
*/
var DigitalDocumentPermission = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "DigitalDocumentPermission";
};
DigitalDocumentPermission = stjs.extend(DigitalDocumentPermission, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/permissionType
* The type of permission granted the person, organization, or audience.
*
* @property permissionType
* @type DigitalDocumentPermissionType
*/
prototype.permissionType = null;
/**
* Schema.org/grantee
* The person, organization, contact point, or audience that has been granted this permission.
*
* @property grantee
* @type schema, ContactPoint | schema,Organization | schema,Person | schema,Audience
*/
prototype.grantee = null;
}, {permissionType: "DigitalDocumentPermissionType", grantee: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Role
* Represents additional information about a relationship or property. For example a Role can be used to say that a 'member' role linking some SportsTeam to a player occurred during a particular time period. Or that a Person's 'actor' role in a Movie was for some particular characterName. Such properties can be attached to a Role entity, which is then associated with the main entities using ordinary properties like 'member' or 'actor'.\n\nSee also [blog post](http://blog.schema.org/2014/06/introducing-role.html).
*
* @author schema.org
* @class Role
* @module org.schema
* @extends Intangible
*/
var Role = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Role";
};
Role = stjs.extend(Role, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/roleName
* A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'.
*
* @property roleName
* @type schema, URL | schema,Text
*/
prototype.roleName = null;
/**
* Schema.org/namedPosition
* A position played, performed or filled by a person or organization, as part of an organization. For example, an athlete in a SportsTeam might play in the position named 'Quarterback'.
*
* @property namedPosition
* @type schema, URL | schema,Text
*/
prototype.namedPosition = null;
/**
* Schema.org/startDate
* The start date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property startDate
* @type schema, DateTime | schema,Date
*/
prototype.startDate = null;
/**
* Schema.org/endDate
* The end date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property endDate
* @type schema, DateTime | schema,Date
*/
prototype.endDate = null;
}, {roleName: "Object", namedPosition: "Object", startDate: "Object", endDate: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AlignmentObject
* An intangible item that describes an alignment between a learning resource and a node in an educational framework.
*
* @author schema.org
* @class AlignmentObject
* @module org.schema
* @extends Intangible
*/
var AlignmentObject = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "AlignmentObject";
};
AlignmentObject = stjs.extend(AlignmentObject, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/educationalFramework
* The framework to which the resource being described is aligned.
*
* @property educationalFramework
* @type Text
*/
prototype.educationalFramework = null;
/**
* Schema.org/targetName
* The name of a node in an established educational framework.
*
* @property targetName
* @type Text
*/
prototype.targetName = null;
/**
* Schema.org/alignmentType
* A category of alignment between the learning resource and the framework node. Recommended values include: 'assesses', 'teaches', 'requires', 'textComplexity', 'readingLevel', 'educationalSubject', and 'educationalLevel'.
*
* @property alignmentType
* @type Text
*/
prototype.alignmentType = null;
/**
* Schema.org/targetDescription
* The description of a node in an established educational framework.
*
* @property targetDescription
* @type Text
*/
prototype.targetDescription = null;
/**
* Schema.org/targetUrl
* The URL of a node in an established educational framework.
*
* @property targetUrl
* @type URL
*/
prototype.targetUrl = null;
}, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/JobPosting
* A listing that describes a job opening in a certain organization.
*
* @author schema.org
* @class JobPosting
* @module org.schema
* @extends Intangible
*/
var JobPosting = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "JobPosting";
};
JobPosting = stjs.extend(JobPosting, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/baseSalary
* The base salary of the job or of an employee in an EmployeeRole.
*
* @property baseSalary
* @type schema, Number | schema,PriceSpecification | schema,MonetaryAmount
*/
prototype.baseSalary = null;
/**
* Schema.org/benefits
* Description of benefits associated with the job.
*
* @property benefits
* @type Text
*/
prototype.benefits = null;
/**
* Schema.org/jobBenefits
* Description of benefits associated with the job.
*
* @property jobBenefits
* @type Text
*/
prototype.jobBenefits = null;
/**
* Schema.org/experienceRequirements
* Description of skills and experience needed for the position.
*
* @property experienceRequirements
* @type Text
*/
prototype.experienceRequirements = null;
/**
* Schema.org/hiringOrganization
* Organization offering the job position.
*
* @property hiringOrganization
* @type Organization
*/
prototype.hiringOrganization = null;
/**
* Schema.org/employmentType
* Type of employment (e.g. full-time, part-time, contract, temporary, seasonal, internship).
*
* @property employmentType
* @type Text
*/
prototype.employmentType = null;
/**
* Schema.org/workHours
* The typical working hours for this job (e.g. 1st shift, night shift, 8am-5pm).
*
* @property workHours
* @type Text
*/
prototype.workHours = null;
/**
* Schema.org/responsibilities
* Responsibilities associated with this role.
*
* @property responsibilities
* @type Text
*/
prototype.responsibilities = null;
/**
* Schema.org/skills
* Skills required to fulfill this role.
*
* @property skills
* @type Text
*/
prototype.skills = null;
/**
* Schema.org/qualifications
* Specific qualifications required for this role.
*
* @property qualifications
* @type Text
*/
prototype.qualifications = null;
/**
* Schema.org/occupationalCategory
* Category or categories describing the job. Use BLS O*NET-SOC taxonomy: http://www.onetcenter.org/taxonomy.html. Ideally includes textual label and formal code, with the property repeated for each applicable value.
*
* @property occupationalCategory
* @type Text
*/
prototype.occupationalCategory = null;
/**
* Schema.org/incentives
* Description of bonus and commission compensation aspects of the job.
*
* @property incentives
* @type Text
*/
prototype.incentives = null;
/**
* Schema.org/validThrough
* The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
*
* @property validThrough
* @type DateTime
*/
prototype.validThrough = null;
/**
* Schema.org/title
* The title of the job.
*
* @property title
* @type Text
*/
prototype.title = null;
/**
* Schema.org/educationRequirements
* Educational background needed for the position.
*
* @property educationRequirements
* @type Text
*/
prototype.educationRequirements = null;
/**
* Schema.org/specialCommitments
* Any special commitments associated with this job posting. Valid entries include VeteranCommit, MilitarySpouseCommit, etc.
*
* @property specialCommitments
* @type Text
*/
prototype.specialCommitments = null;
/**
* Schema.org/incentiveCompensation
* Description of bonus and commission compensation aspects of the job.
*
* @property incentiveCompensation
* @type Text
*/
prototype.incentiveCompensation = null;
/**
* Schema.org/salaryCurrency
* The currency (coded using [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) ) used for the main salary information in this job posting or for this employee.
*
* @property salaryCurrency
* @type Text
*/
prototype.salaryCurrency = null;
/**
* Schema.org/jobLocation
* A (typically single) geographic location associated with the job position.
*
* @property jobLocation
* @type Place
*/
prototype.jobLocation = null;
/**
* Schema.org/industry
* The industry associated with the job position.
*
* @property industry
* @type Text
*/
prototype.industry = null;
/**
* Schema.org/datePosted
* Publication date for the job posting.
*
* @property datePosted
* @type Date
*/
prototype.datePosted = null;
}, {baseSalary: "Object", hiringOrganization: "Organization", jobLocation: "Place", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Ticket
* Used to describe a ticket to an event, a flight, a bus ride, etc.
*
* @author schema.org
* @class Ticket
* @module org.schema
* @extends Intangible
*/
var Ticket = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Ticket";
};
Ticket = stjs.extend(Ticket, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/priceCurrency
* The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to [[PriceSpecification]] and its subtypes.
*
* @property priceCurrency
* @type Text
*/
prototype.priceCurrency = null;
/**
* Schema.org/totalPrice
* The total price for the reservation or ticket, including applicable taxes, shipping, etc.
*
* @property totalPrice
* @type schema, Number | schema,PriceSpecification | schema,Text
*/
prototype.totalPrice = null;
/**
* Schema.org/dateIssued
* The date the ticket was issued.
*
* @property dateIssued
* @type DateTime
*/
prototype.dateIssued = null;
/**
* Schema.org/ticketToken
* Reference to an asset (e.g., Barcode, QR code image or PDF) usable for entrance.
*
* @property ticketToken
* @type schema, URL | schema,Text
*/
prototype.ticketToken = null;
/**
* Schema.org/ticketNumber
* The unique identifier for the ticket.
*
* @property ticketNumber
* @type Text
*/
prototype.ticketNumber = null;
/**
* Schema.org/issuedBy
* The organization issuing the ticket or permit.
*
* @property issuedBy
* @type Organization
*/
prototype.issuedBy = null;
/**
* Schema.org/ticketedSeat
* The seat associated with the ticket.
*
* @property ticketedSeat
* @type Seat
*/
prototype.ticketedSeat = null;
/**
* Schema.org/underName
* The person or organization the reservation or ticket is for.
*
* @property underName
* @type schema, Organization | schema,Person
*/
prototype.underName = null;
}, {totalPrice: "Object", ticketToken: "Object", issuedBy: "Organization", ticketedSeat: "Seat", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Order
* An order is a confirmation of a transaction (a receipt), which can contain multiple line items, each represented by an Offer that has been accepted by the customer.
*
* @author schema.org
* @class Order
* @module org.schema
* @extends Intangible
*/
var Order = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Order";
};
Order = stjs.extend(Order, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/orderDelivery
* The delivery of the parcel related to this order or order item.
*
* @property orderDelivery
* @type ParcelDelivery
*/
prototype.orderDelivery = null;
/**
* Schema.org/discountCurrency
* The currency (in 3-letter ISO 4217 format) of the discount.
*
* @property discountCurrency
* @type Text
*/
prototype.discountCurrency = null;
/**
* Schema.org/isGift
* Was the offer accepted as a gift for someone other than the buyer.
*
* @property isGift
* @type Boolean
*/
prototype.isGift = null;
/**
* Schema.org/broker
* An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred.
*
* @property broker
* @type schema, Organization | schema,Person
*/
prototype.broker = null;
/**
* Schema.org/discountCode
* Code used to redeem a discount.
*
* @property discountCode
* @type Text
*/
prototype.discountCode = null;
/**
* Schema.org/paymentMethod
* The name of the credit card or other method of payment for the order.
*
* @property paymentMethod
* @type PaymentMethod
*/
prototype.paymentMethod = null;
/**
* Schema.org/orderNumber
* The identifier of the transaction.
*
* @property orderNumber
* @type Text
*/
prototype.orderNumber = null;
/**
* Schema.org/billingAddress
* The billing address for the order.
*
* @property billingAddress
* @type PostalAddress
*/
prototype.billingAddress = null;
/**
* Schema.org/paymentDueDate
* The date that payment is due.
*
* @property paymentDueDate
* @type DateTime
*/
prototype.paymentDueDate = null;
/**
* Schema.org/paymentMethodId
* An identifier for the method of payment used (e.g. the last 4 digits of the credit card).
*
* @property paymentMethodId
* @type Text
*/
prototype.paymentMethodId = null;
/**
* Schema.org/orderStatus
* The current status of the order.
*
* @property orderStatus
* @type OrderStatus
*/
prototype.orderStatus = null;
/**
* Schema.org/paymentUrl
* The URL for sending a payment.
*
* @property paymentUrl
* @type URL
*/
prototype.paymentUrl = null;
/**
* Schema.org/orderedItem
* The item ordered.
*
* @property orderedItem
* @type schema, OrderItem | schema,Product
*/
prototype.orderedItem = null;
/**
* Schema.org/seller
* An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider.
*
* @property seller
* @type schema, Organization | schema,Person
*/
prototype.seller = null;
/**
* Schema.org/customer
* Party placing the order or paying the invoice.
*
* @property customer
* @type schema, Organization | schema,Person
*/
prototype.customer = null;
/**
* Schema.org/paymentDue
* The date that payment is due.
*
* @property paymentDue
* @type DateTime
*/
prototype.paymentDue = null;
/**
* Schema.org/acceptedOffer
* The offer(s) -- e.g., product, quantity and price combinations -- included in the order.
*
* @property acceptedOffer
* @type Offer
*/
prototype.acceptedOffer = null;
/**
* Schema.org/confirmationNumber
* A number that confirms the given order or payment has been received.
*
* @property confirmationNumber
* @type Text
*/
prototype.confirmationNumber = null;
/**
* Schema.org/orderDate
* Date order was placed.
*
* @property orderDate
* @type DateTime
*/
prototype.orderDate = null;
/**
* Schema.org/merchant
* 'merchant' is an out-dated term for 'seller'.
*
* @property merchant
* @type schema, Organization | schema,Person
*/
prototype.merchant = null;
/**
* Schema.org/partOfInvoice
* The order is being paid as part of the referenced Invoice.
*
* @property partOfInvoice
* @type Invoice
*/
prototype.partOfInvoice = null;
/**
* Schema.org/discount
* Any discount applied (to an Order).
*
* @property discount
* @type schema, Number | schema,Text
*/
prototype.discount = null;
}, {orderDelivery: "ParcelDelivery", broker: "Object", paymentMethod: "PaymentMethod", billingAddress: "PostalAddress", orderStatus: "OrderStatus", orderedItem: "Object", seller: "Object", customer: "Object", acceptedOffer: "Offer", merchant: "Object", partOfInvoice: "Invoice", discount: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusTrip
* A trip on a commercial bus line.
*
* @author schema.org
* @class BusTrip
* @module org.schema
* @extends Intangible
*/
var BusTrip = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "BusTrip";
};
BusTrip = stjs.extend(BusTrip, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/departureTime
* The expected departure time.
*
* @property departureTime
* @type DateTime
*/
prototype.departureTime = null;
/**
* Schema.org/busNumber
* The unique identifier for the bus.
*
* @property busNumber
* @type Text
*/
prototype.busNumber = null;
/**
* Schema.org/departureBusStop
* The stop or station from which the bus departs.
*
* @property departureBusStop
* @type schema, BusStation | schema,BusStop
*/
prototype.departureBusStop = null;
/**
* Schema.org/arrivalTime
* The expected arrival time.
*
* @property arrivalTime
* @type DateTime
*/
prototype.arrivalTime = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/arrivalBusStop
* The stop or station from which the bus arrives.
*
* @property arrivalBusStop
* @type schema, BusStation | schema,BusStop
*/
prototype.arrivalBusStop = null;
/**
* Schema.org/busName
* The name of the bus (e.g. Bolt Express).
*
* @property busName
* @type Text
*/
prototype.busName = null;
}, {departureBusStop: "Object", provider: "Object", arrivalBusStop: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Audience
* Intended audience for an item, i.e. the group for whom the item was created.
*
* @author schema.org
* @class Audience
* @module org.schema
* @extends Intangible
*/
var Audience = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Audience";
};
Audience = stjs.extend(Audience, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/audienceType
* The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.).
*
* @property audienceType
* @type Text
*/
prototype.audienceType = null;
/**
* Schema.org/geographicArea
* The geographic area associated with the audience.
*
* @property geographicArea
* @type AdministrativeArea
*/
prototype.geographicArea = null;
}, {geographicArea: "AdministrativeArea", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Service
* A service provided by an organization, e.g. delivery service, print services, etc.
*
* @author schema.org
* @class Service
* @module org.schema
* @extends Intangible
*/
var Service = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Service";
};
Service = stjs.extend(Service, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/audience
* An intended audience, i.e. a group for whom something was created.
*
* @property audience
* @type Audience
*/
prototype.audience = null;
/**
* Schema.org/award
* An award won by or for this item.
*
* @property award
* @type Text
*/
prototype.award = null;
/**
* Schema.org/broker
* An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred.
*
* @property broker
* @type schema, Organization | schema,Person
*/
prototype.broker = null;
/**
* Schema.org/isRelatedTo
* A pointer to another, somehow related product (or multiple products).
*
* @property isRelatedTo
* @type schema, Service | schema,Product
*/
prototype.isRelatedTo = null;
/**
* Schema.org/providerMobility
* Indicates the mobility of a provided service (e.g. 'static', 'dynamic').
*
* @property providerMobility
* @type Text
*/
prototype.providerMobility = null;
/**
* Schema.org/offers
* An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event.
*
* @property offers
* @type Offer
*/
prototype.offers = null;
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/brand
* The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
*
* @property brand
* @type schema, Organization | schema,Brand
*/
prototype.brand = null;
/**
* Schema.org/areaServed
* The geographic area where a service or offered item is provided.
*
* @property areaServed
* @type schema, GeoShape | schema,Text | schema,Place | schema,AdministrativeArea
*/
prototype.areaServed = null;
/**
* Schema.org/hoursAvailable
* The hours during which this service or contact is available.
*
* @property hoursAvailable
* @type OpeningHoursSpecification
*/
prototype.hoursAvailable = null;
/**
* Schema.org/produces
* The tangible thing generated by the service, e.g. a passport, permit, etc.
*
* @property produces
* @type Thing
*/
prototype.produces = null;
/**
* Schema.org/availableChannel
* A means of accessing the service (e.g. a phone bank, a web site, a location, etc.).
*
* @property availableChannel
* @type ServiceChannel
*/
prototype.availableChannel = null;
/**
* Schema.org/isSimilarTo
* A pointer to another, functionally similar product (or multiple products).
*
* @property isSimilarTo
* @type schema, Service | schema,Product
*/
prototype.isSimilarTo = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/serviceArea
* The geographic area where the service is provided.
*
* @property serviceArea
* @type schema, GeoShape | schema,Place | schema,AdministrativeArea
*/
prototype.serviceArea = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/serviceOutput
* The tangible thing generated by the service, e.g. a passport, permit, etc.
*
* @property serviceOutput
* @type Thing
*/
prototype.serviceOutput = null;
/**
* Schema.org/logo
* An associated logo.
*
* @property logo
* @type schema, URL | schema,ImageObject
*/
prototype.logo = null;
/**
* Schema.org/hasOfferCatalog
* Indicates an OfferCatalog listing for this Organization, Person, or Service.
*
* @property hasOfferCatalog
* @type OfferCatalog
*/
prototype.hasOfferCatalog = null;
/**
* Schema.org/serviceAudience
* The audience eligible for this service.
*
* @property serviceAudience
* @type Audience
*/
prototype.serviceAudience = null;
/**
* Schema.org/serviceType
* The type of service being offered, e.g. veterans' benefits, emergency relief, etc.
*
* @property serviceType
* @type Text
*/
prototype.serviceType = null;
/**
* Schema.org/category
* A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.
*
* @property category
* @type schema, Text | schema,Thing
*/
prototype.category = null;
}, {audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/StructuredValue
* Structured values are used when the value of a property has a more complex structure than simply being a textual value or a reference to another thing.
*
* @author schema.org
* @class StructuredValue
* @module org.schema
* @extends Intangible
*/
var StructuredValue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "StructuredValue";
};
StructuredValue = stjs.extend(StructuredValue, Intangible, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Invoice
* A statement of the money due for goods or services; a bill.
*
* @author schema.org
* @class Invoice
* @module org.schema
* @extends Intangible
*/
var Invoice = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Invoice";
};
Invoice = stjs.extend(Invoice, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/referencesOrder
* The Order(s) related to this Invoice. One or more Orders may be combined into a single Invoice.
*
* @property referencesOrder
* @type Order
*/
prototype.referencesOrder = null;
/**
* Schema.org/broker
* An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred.
*
* @property broker
* @type schema, Organization | schema,Person
*/
prototype.broker = null;
/**
* Schema.org/minimumPaymentDue
* The minimum payment required at this time.
*
* @property minimumPaymentDue
* @type schema, PriceSpecification | schema,MonetaryAmount
*/
prototype.minimumPaymentDue = null;
/**
* Schema.org/scheduledPaymentDate
* The date the invoice is scheduled to be paid.
*
* @property scheduledPaymentDate
* @type Date
*/
prototype.scheduledPaymentDate = null;
/**
* Schema.org/paymentMethod
* The name of the credit card or other method of payment for the order.
*
* @property paymentMethod
* @type PaymentMethod
*/
prototype.paymentMethod = null;
/**
* Schema.org/paymentDueDate
* The date that payment is due.
*
* @property paymentDueDate
* @type DateTime
*/
prototype.paymentDueDate = null;
/**
* Schema.org/paymentMethodId
* An identifier for the method of payment used (e.g. the last 4 digits of the credit card).
*
* @property paymentMethodId
* @type Text
*/
prototype.paymentMethodId = null;
/**
* Schema.org/totalPaymentDue
* The total amount due.
*
* @property totalPaymentDue
* @type schema, PriceSpecification | schema,MonetaryAmount
*/
prototype.totalPaymentDue = null;
/**
* Schema.org/customer
* Party placing the order or paying the invoice.
*
* @property customer
* @type schema, Organization | schema,Person
*/
prototype.customer = null;
/**
* Schema.org/paymentDue
* The date that payment is due.
*
* @property paymentDue
* @type DateTime
*/
prototype.paymentDue = null;
/**
* Schema.org/paymentStatus
* The status of payment; whether the invoice has been paid or not.
*
* @property paymentStatus
* @type schema, Text | schema,PaymentStatusType
*/
prototype.paymentStatus = null;
/**
* Schema.org/accountId
* The identifier for the account the payment will be applied to.
*
* @property accountId
* @type Text
*/
prototype.accountId = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/confirmationNumber
* A number that confirms the given order or payment has been received.
*
* @property confirmationNumber
* @type Text
*/
prototype.confirmationNumber = null;
/**
* Schema.org/billingPeriod
* The time interval used to compute the invoice.
*
* @property billingPeriod
* @type Duration
*/
prototype.billingPeriod = null;
/**
* Schema.org/category
* A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.
*
* @property category
* @type schema, Text | schema,Thing
*/
prototype.category = null;
}, {referencesOrder: "Order", broker: "Object", minimumPaymentDue: "Object", paymentMethod: "PaymentMethod", totalPaymentDue: "Object", customer: "Object", paymentStatus: "Object", provider: "Object", billingPeriod: "Duration", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PropertyValueSpecification
* A Property value specification.
*
* @author schema.org
* @class PropertyValueSpecification
* @module org.schema
* @extends Intangible
*/
var PropertyValueSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "PropertyValueSpecification";
};
PropertyValueSpecification = stjs.extend(PropertyValueSpecification, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/valueMinLength
* Specifies the minimum allowed range for number of characters in a literal value.
*
* @property valueMinLength
* @type Number
*/
prototype.valueMinLength = null;
/**
* Schema.org/valuePattern
* Specifies a regular expression for testing literal values according to the HTML spec.
*
* @property valuePattern
* @type Text
*/
prototype.valuePattern = null;
/**
* Schema.org/readonlyValue
* Whether or not a property is mutable. Default is false. Specifying this for a property that also has a value makes it act similar to a "hidden" input in an HTML form.
*
* @property readonlyValue
* @type Boolean
*/
prototype.readonlyValue = null;
/**
* Schema.org/minValue
* The lower value of some characteristic or property.
*
* @property minValue
* @type Number
*/
prototype.minValue = null;
/**
* Schema.org/stepValue
* The stepValue attribute indicates the granularity that is expected (and required) of the value in a PropertyValueSpecification.
*
* @property stepValue
* @type Number
*/
prototype.stepValue = null;
/**
* Schema.org/valueName
* Indicates the name of the PropertyValueSpecification to be used in URL templates and form encoding in a manner analogous to HTML's input@name.
*
* @property valueName
* @type Text
*/
prototype.valueName = null;
/**
* Schema.org/maxValue
* The upper value of some characteristic or property.
*
* @property maxValue
* @type Number
*/
prototype.maxValue = null;
/**
* Schema.org/valueRequired
* Whether the property must be filled in to complete the action. Default is false.
*
* @property valueRequired
* @type Boolean
*/
prototype.valueRequired = null;
/**
* Schema.org/multipleValues
* Whether multiple values are allowed for the property. Default is false.
*
* @property multipleValues
* @type Boolean
*/
prototype.multipleValues = null;
/**
* Schema.org/defaultValue
* The default value of the input. For properties that expect a literal, the default is a literal value, for properties that expect an object, it's an ID reference to one of the current values.
*
* @property defaultValue
* @type schema, Text | schema,Thing
*/
prototype.defaultValue = null;
/**
* Schema.org/valueMaxLength
* Specifies the allowed range for number of characters in a literal value.
*
* @property valueMaxLength
* @type Number
*/
prototype.valueMaxLength = null;
}, {defaultValue: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DataFeedItem
* A single item within a larger data feed.
*
* @author schema.org
* @class DataFeedItem
* @module org.schema
* @extends Intangible
*/
var DataFeedItem = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "DataFeedItem";
};
DataFeedItem = stjs.extend(DataFeedItem, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/dateDeleted
* The datetime the item was removed from the DataFeed.
*
* @property dateDeleted
* @type DateTime
*/
prototype.dateDeleted = null;
/**
* Schema.org/dateCreated
* The date on which the CreativeWork was created or the item was added to a DataFeed.
*
* @property dateCreated
* @type schema, DateTime | schema,Date
*/
prototype.dateCreated = null;
/**
* Schema.org/item
* An entity represented by an entry in a list or data feed (e.g. an 'artist' in a list of 'artists')’.
*
* @property item
* @type Thing
*/
prototype.item = null;
/**
* Schema.org/dateModified
* The date on which the CreativeWork was most recently modified or when the item's entry was modified within a DataFeed.
*
* @property dateModified
* @type schema, DateTime | schema,Date
*/
prototype.dateModified = null;
}, {dateCreated: "Object", item: "Thing", dateModified: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EntryPoint
* An entry point, within some Web-based protocol.
*
* @author schema.org
* @class EntryPoint
* @module org.schema
* @extends Intangible
*/
var EntryPoint = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "EntryPoint";
};
EntryPoint = stjs.extend(EntryPoint, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/contentType
* The supported content type(s) for an EntryPoint response.
*
* @property contentType
* @type Text
*/
prototype.contentType = null;
/**
* Schema.org/actionApplication
* An application that can complete the request.
*
* @property actionApplication
* @type SoftwareApplication
*/
prototype.actionApplication = null;
/**
* Schema.org/urlTemplate
* An url template (RFC6570) that will be used to construct the target of the execution of the action.
*
* @property urlTemplate
* @type Text
*/
prototype.urlTemplate = null;
/**
* Schema.org/actionPlatform
* The high level platform(s) where the Action can be performed for the given URL. To specify a specific application or operating system instance, use actionApplication.
*
* @property actionPlatform
* @type schema, URL | schema,Text
*/
prototype.actionPlatform = null;
/**
* Schema.org/httpMethod
* An HTTP method that specifies the appropriate HTTP method for a request to an HTTP EntryPoint. Values are capitalized strings as used in HTTP.
*
* @property httpMethod
* @type Text
*/
prototype.httpMethod = null;
/**
* Schema.org/encodingType
* The supported encoding type(s) for an EntryPoint request.
*
* @property encodingType
* @type Text
*/
prototype.encodingType = null;
/**
* Schema.org/application
* An application that can complete the request.
*
* @property application
* @type SoftwareApplication
*/
prototype.application = null;
}, {actionApplication: "SoftwareApplication", actionPlatform: "Object", application: "SoftwareApplication", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Enumeration
* Lists or enumerations—for example, a list of cuisines or music genres, etc.
*
* @author schema.org
* @class Enumeration
* @module org.schema
* @extends Intangible
*/
var Enumeration = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Enumeration";
};
Enumeration = stjs.extend(Enumeration, Intangible, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ListItem
* An list item, e.g. a step in a checklist or how-to description.
*
* @author schema.org
* @class ListItem
* @module org.schema
* @extends Intangible
*/
var ListItem = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "ListItem";
};
ListItem = stjs.extend(ListItem, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/position
* The position of an item in a series or sequence of items.
*
* @property position
* @type schema, Integer | schema,Text
*/
prototype.position = null;
/**
* Schema.org/previousItem
* A link to the ListItem that preceeds the current one.
*
* @property previousItem
* @type ListItem
*/
prototype.previousItem = null;
/**
* Schema.org/nextItem
* A link to the ListItem that follows the current one.
*
* @property nextItem
* @type ListItem
*/
prototype.nextItem = null;
/**
* Schema.org/item
* An entity represented by an entry in a list or data feed (e.g. an 'artist' in a list of 'artists')’.
*
* @property item
* @type Thing
*/
prototype.item = null;
}, {position: "Object", previousItem: "ListItem", nextItem: "ListItem", item: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MenuItem
* A food or drink item listed in a menu or menu section.
*
* @author schema.org
* @class MenuItem
* @module org.schema
* @extends Intangible
*/
var MenuItem = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "MenuItem";
};
MenuItem = stjs.extend(MenuItem, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/suitableForDiet
* Indicates a dietary restriction or guideline for which this recipe or menu item is suitable, e.g. diabetic, halal etc.
*
* @property suitableForDiet
* @type RestrictedDiet
*/
prototype.suitableForDiet = null;
/**
* Schema.org/offers
* An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event.
*
* @property offers
* @type Offer
*/
prototype.offers = null;
/**
* Schema.org/nutrition
* Nutrition information about the recipe or menu item.
*
* @property nutrition
* @type NutritionInformation
*/
prototype.nutrition = null;
}, {suitableForDiet: "RestrictedDiet", offers: "Offer", nutrition: "NutritionInformation", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ParcelDelivery
* The delivery of a parcel either via the postal service or a commercial service.
*
* @author schema.org
* @class ParcelDelivery
* @module org.schema
* @extends Intangible
*/
var ParcelDelivery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "ParcelDelivery";
};
ParcelDelivery = stjs.extend(ParcelDelivery, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/partOfOrder
* The overall order the items in this delivery were included in.
*
* @property partOfOrder
* @type Order
*/
prototype.partOfOrder = null;
/**
* Schema.org/expectedArrivalFrom
* The earliest date the package may arrive.
*
* @property expectedArrivalFrom
* @type DateTime
*/
prototype.expectedArrivalFrom = null;
/**
* Schema.org/trackingUrl
* Tracking url for the parcel delivery.
*
* @property trackingUrl
* @type URL
*/
prototype.trackingUrl = null;
/**
* Schema.org/originAddress
* Shipper's address.
*
* @property originAddress
* @type PostalAddress
*/
prototype.originAddress = null;
/**
* Schema.org/itemShipped
* Item(s) being shipped.
*
* @property itemShipped
* @type Product
*/
prototype.itemShipped = null;
/**
* Schema.org/deliveryAddress
* Destination address.
*
* @property deliveryAddress
* @type PostalAddress
*/
prototype.deliveryAddress = null;
/**
* Schema.org/deliveryStatus
* New entry added as the package passes through each leg of its journey (from shipment to final delivery).
*
* @property deliveryStatus
* @type DeliveryEvent
*/
prototype.deliveryStatus = null;
/**
* Schema.org/expectedArrivalUntil
* The latest date the package may arrive.
*
* @property expectedArrivalUntil
* @type DateTime
*/
prototype.expectedArrivalUntil = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/trackingNumber
* Shipper tracking number.
*
* @property trackingNumber
* @type Text
*/
prototype.trackingNumber = null;
/**
* Schema.org/hasDeliveryMethod
* Method used for delivery or shipping.
*
* @property hasDeliveryMethod
* @type DeliveryMethod
*/
prototype.hasDeliveryMethod = null;
/**
* Schema.org/carrier
* 'carrier' is an out-dated term indicating the 'provider' for parcel delivery and flights.
*
* @property carrier
* @type Organization
*/
prototype.carrier = null;
}, {partOfOrder: "Order", originAddress: "PostalAddress", itemShipped: "Product", deliveryAddress: "PostalAddress", deliveryStatus: "DeliveryEvent", provider: "Object", hasDeliveryMethod: "DeliveryMethod", carrier: "Organization", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ItemList
* A list of items of any sort—for example, Top 10 Movies About Weathermen, or Top 100 Party Songs. Not to be confused with HTML lists, which are often used only for formatting.
*
* @author schema.org
* @class ItemList
* @module org.schema
* @extends Intangible
*/
var ItemList = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "ItemList";
};
ItemList = stjs.extend(ItemList, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/numberOfItems
* The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list.
*
* @property numberOfItems
* @type Integer
*/
prototype.numberOfItems = null;
/**
* Schema.org/itemListOrder
* Type of ordering (e.g. Ascending, Descending, Unordered).
*
* @property itemListOrder
* @type schema, ItemListOrderType | schema,Text
*/
prototype.itemListOrder = null;
/**
* Schema.org/itemListElement
* For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem.\n\nText values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.\n\nNote: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases.
*
* @property itemListElement
* @type schema, Text | schema,Thing | schema,ListItem
*/
prototype.itemListElement = null;
}, {itemListOrder: "Object", itemListElement: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Offer
* An offer to transfer some rights to an item or to provide a service — for example, an offer to sell tickets to an event, to rent the DVD of a movie, to stream a TV show over the internet, to repair a motorcycle, or to loan a book.\n\nFor [GTIN](http://www.gs1.org/barcodes/technical/idkeys/gtin)-related fields, see [Check Digit calculator](http://www.gs1.org/barcodes/support/check_digit_calculator) and [validation guide](http://www.gs1us.org/resources/standards/gtin-validation-guide) from [GS1](http://www.gs1.org/).
*
* @author schema.org
* @class Offer
* @module org.schema
* @extends Intangible
*/
var Offer = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Offer";
};
Offer = stjs.extend(Offer, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/advanceBookingRequirement
* The amount of time that is required between accepting the offer and the actual usage of the resource or service.
*
* @property advanceBookingRequirement
* @type QuantitativeValue
*/
prototype.advanceBookingRequirement = null;
/**
* Schema.org/reviews
* Review of the item.
*
* @property reviews
* @type Review
*/
prototype.reviews = null;
/**
* Schema.org/priceCurrency
* The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to [[PriceSpecification]] and its subtypes.
*
* @property priceCurrency
* @type Text
*/
prototype.priceCurrency = null;
/**
* Schema.org/availableDeliveryMethod
* The delivery method(s) available for this offer.
*
* @property availableDeliveryMethod
* @type DeliveryMethod
*/
prototype.availableDeliveryMethod = null;
/**
* Schema.org/priceSpecification
* One or more detailed price specifications, indicating the unit price and delivery or payment charges.
*
* @property priceSpecification
* @type PriceSpecification
*/
prototype.priceSpecification = null;
/**
* Schema.org/validFrom
* The date when the item becomes valid.
*
* @property validFrom
* @type DateTime
*/
prototype.validFrom = null;
/**
* Schema.org/price
* The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.\n\nUsage guidelines:\n\n* Use the [[priceCurrency]] property (with [ISO 4217 codes](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) e.g. "USD") instead of
* including [ambiguous symbols](http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign) such as '$' in the value.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.\n* Note that both [RDFa](http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute) and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
*
* @property price
* @type schema, Number | schema,Text
*/
prototype.price = null;
/**
* Schema.org/businessFunction
* The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell.
*
* @property businessFunction
* @type BusinessFunction
*/
prototype.businessFunction = null;
/**
* Schema.org/itemOffered
* The item being offered.
*
* @property itemOffered
* @type schema, Service | schema,Product
*/
prototype.itemOffered = null;
/**
* Schema.org/includesObject
* This links to a node or nodes indicating the exact quantity of the products included in the offer.
*
* @property includesObject
* @type TypeAndQuantityNode
*/
prototype.includesObject = null;
/**
* Schema.org/gtin14
* The [GTIN-14](http://apps.gs1.org/GDD/glossary/Pages/GTIN-14.aspx) code of the product, or the product to which the offer refers. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin14
* @type Text
*/
prototype.gtin14 = null;
/**
* Schema.org/gtin13
* The [GTIN-13](http://apps.gs1.org/GDD/glossary/Pages/GTIN-13.aspx) code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin13
* @type Text
*/
prototype.gtin13 = null;
/**
* Schema.org/gtin12
* The [GTIN-12](http://apps.gs1.org/GDD/glossary/Pages/GTIN-12.aspx) code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin12
* @type Text
*/
prototype.gtin12 = null;
/**
* Schema.org/availableAtOrFrom
* The place(s) from which the offer can be obtained (e.g. store locations).
*
* @property availableAtOrFrom
* @type Place
*/
prototype.availableAtOrFrom = null;
/**
* Schema.org/warranty
* The warranty promise(s) included in the offer.
*
* @property warranty
* @type WarrantyPromise
*/
prototype.warranty = null;
/**
* Schema.org/serialNumber
* The serial number or any alphanumeric identifier of a particular product. When attached to an offer, it is a shortcut for the serial number of the product included in the offer.
*
* @property serialNumber
* @type Text
*/
prototype.serialNumber = null;
/**
* Schema.org/inventoryLevel
* The current approximate inventory level for the item or items.
*
* @property inventoryLevel
* @type QuantitativeValue
*/
prototype.inventoryLevel = null;
/**
* Schema.org/offeredBy
* A pointer to the organization or person making the offer.
*
* @property offeredBy
* @type schema, Organization | schema,Person
*/
prototype.offeredBy = null;
/**
* Schema.org/availabilityStarts
* The beginning of the availability of the product or service included in the offer.
*
* @property availabilityStarts
* @type DateTime
*/
prototype.availabilityStarts = null;
/**
* Schema.org/eligibleDuration
* The duration for which the given offer is valid.
*
* @property eligibleDuration
* @type QuantitativeValue
*/
prototype.eligibleDuration = null;
/**
* Schema.org/review
* A review of the item.
*
* @property review
* @type Review
*/
prototype.review = null;
/**
* Schema.org/eligibleTransactionVolume
* The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount.
*
* @property eligibleTransactionVolume
* @type PriceSpecification
*/
prototype.eligibleTransactionVolume = null;
/**
* Schema.org/mpn
* The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.
*
* @property mpn
* @type Text
*/
prototype.mpn = null;
/**
* Schema.org/areaServed
* The geographic area where a service or offered item is provided.
*
* @property areaServed
* @type schema, GeoShape | schema,Text | schema,Place | schema,AdministrativeArea
*/
prototype.areaServed = null;
/**
* Schema.org/seller
* An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider.
*
* @property seller
* @type schema, Organization | schema,Person
*/
prototype.seller = null;
/**
* Schema.org/acceptedPaymentMethod
* The payment method(s) accepted by seller for this offer.
*
* @property acceptedPaymentMethod
* @type schema, LoanOrCredit | schema,PaymentMethod
*/
prototype.acceptedPaymentMethod = null;
/**
* Schema.org/validThrough
* The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
*
* @property validThrough
* @type DateTime
*/
prototype.validThrough = null;
/**
* Schema.org/availability
* The availability of this item—for example In stock, Out of stock, Pre-order, etc.
*
* @property availability
* @type ItemAvailability
*/
prototype.availability = null;
/**
* Schema.org/sku
* The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
*
* @property sku
* @type Text
*/
prototype.sku = null;
/**
* Schema.org/ineligibleRegion
* The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.\n\nSee also [[eligibleRegion]].
*
* @property ineligibleRegion
* @type schema, GeoShape | schema,Text | schema,Place
*/
prototype.ineligibleRegion = null;
/**
* Schema.org/gtin8
* The [GTIN-8](http://apps.gs1.org/GDD/glossary/Pages/GTIN-8.aspx) code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin8
* @type Text
*/
prototype.gtin8 = null;
/**
* Schema.org/priceValidUntil
* The date after which the price is no longer available.
*
* @property priceValidUntil
* @type Date
*/
prototype.priceValidUntil = null;
/**
* Schema.org/deliveryLeadTime
* The typical delay between the receipt of the order and the goods either leaving the warehouse or being prepared for pickup, in case the delivery method is on site pickup.
*
* @property deliveryLeadTime
* @type QuantitativeValue
*/
prototype.deliveryLeadTime = null;
/**
* Schema.org/eligibleQuantity
* The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity.
*
* @property eligibleQuantity
* @type QuantitativeValue
*/
prototype.eligibleQuantity = null;
/**
* Schema.org/addOn
* An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge).
*
* @property addOn
* @type Offer
*/
prototype.addOn = null;
/**
* Schema.org/itemCondition
* A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer.
*
* @property itemCondition
* @type OfferItemCondition
*/
prototype.itemCondition = null;
/**
* Schema.org/eligibleRegion
* The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid.\n\nSee also [[ineligibleRegion]].
*
* @property eligibleRegion
* @type schema, GeoShape | schema,Text | schema,Place
*/
prototype.eligibleRegion = null;
/**
* Schema.org/aggregateRating
* The overall rating, based on a collection of reviews or ratings, of the item.
*
* @property aggregateRating
* @type AggregateRating
*/
prototype.aggregateRating = null;
/**
* Schema.org/eligibleCustomerType
* The type(s) of customers for which the given offer is valid.
*
* @property eligibleCustomerType
* @type BusinessEntityType
*/
prototype.eligibleCustomerType = null;
/**
* Schema.org/availabilityEnds
* The end of the availability of the product or service included in the offer.
*
* @property availabilityEnds
* @type DateTime
*/
prototype.availabilityEnds = null;
/**
* Schema.org/category
* A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy.
*
* @property category
* @type schema, Text | schema,Thing
*/
prototype.category = null;
}, {advanceBookingRequirement: "QuantitativeValue", reviews: "Review", availableDeliveryMethod: "DeliveryMethod", priceSpecification: "PriceSpecification", price: "Object", businessFunction: "BusinessFunction", itemOffered: "Object", includesObject: "TypeAndQuantityNode", availableAtOrFrom: "Place", warranty: "WarrantyPromise", inventoryLevel: "QuantitativeValue", offeredBy: "Object", eligibleDuration: "QuantitativeValue", review: "Review", eligibleTransactionVolume: "PriceSpecification", areaServed: "Object", seller: "Object", acceptedPaymentMethod: "Object", availability: "ItemAvailability", ineligibleRegion: "Object", deliveryLeadTime: "QuantitativeValue", eligibleQuantity: "QuantitativeValue", addOn: "Offer", itemCondition: "OfferItemCondition", eligibleRegion: "Object", aggregateRating: "AggregateRating", eligibleCustomerType: "BusinessEntityType", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BroadcastChannel
* A unique instance of a BroadcastService on a CableOrSatelliteService lineup.
*
* @author schema.org
* @class BroadcastChannel
* @module org.schema
* @extends Intangible
*/
var BroadcastChannel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "BroadcastChannel";
};
BroadcastChannel = stjs.extend(BroadcastChannel, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/providesBroadcastService
* The BroadcastService offered on this channel.
*
* @property providesBroadcastService
* @type BroadcastService
*/
prototype.providesBroadcastService = null;
/**
* Schema.org/genre
* Genre of the creative work, broadcast channel or group.
*
* @property genre
* @type schema, URL | schema,Text
*/
prototype.genre = null;
/**
* Schema.org/broadcastChannelId
* The unique address by which the BroadcastService can be identified in a provider lineup. In US, this is typically a number.
*
* @property broadcastChannelId
* @type Text
*/
prototype.broadcastChannelId = null;
/**
* Schema.org/inBroadcastLineup
* The CableOrSatelliteService offering the channel.
*
* @property inBroadcastLineup
* @type CableOrSatelliteService
*/
prototype.inBroadcastLineup = null;
/**
* Schema.org/broadcastServiceTier
* The type of service required to have access to the channel (e.g. Standard or Premium).
*
* @property broadcastServiceTier
* @type Text
*/
prototype.broadcastServiceTier = null;
}, {providesBroadcastService: "BroadcastService", genre: "Object", inBroadcastLineup: "CableOrSatelliteService", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TrainTrip
* A trip on a commercial train line.
*
* @author schema.org
* @class TrainTrip
* @module org.schema
* @extends Intangible
*/
var TrainTrip = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "TrainTrip";
};
TrainTrip = stjs.extend(TrainTrip, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/departureTime
* The expected departure time.
*
* @property departureTime
* @type DateTime
*/
prototype.departureTime = null;
/**
* Schema.org/departureStation
* The station from which the train departs.
*
* @property departureStation
* @type TrainStation
*/
prototype.departureStation = null;
/**
* Schema.org/arrivalStation
* The station where the train trip ends.
*
* @property arrivalStation
* @type TrainStation
*/
prototype.arrivalStation = null;
/**
* Schema.org/arrivalTime
* The expected arrival time.
*
* @property arrivalTime
* @type DateTime
*/
prototype.arrivalTime = null;
/**
* Schema.org/trainName
* The name of the train (e.g. The Orient Express).
*
* @property trainName
* @type Text
*/
prototype.trainName = null;
/**
* Schema.org/departurePlatform
* The platform from which the train departs.
*
* @property departurePlatform
* @type Text
*/
prototype.departurePlatform = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/arrivalPlatform
* The platform where the train arrives.
*
* @property arrivalPlatform
* @type Text
*/
prototype.arrivalPlatform = null;
/**
* Schema.org/trainNumber
* The unique identifier for the train.
*
* @property trainNumber
* @type Text
*/
prototype.trainNumber = null;
}, {departureStation: "TrainStation", arrivalStation: "TrainStation", provider: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BedDetails
* An entity holding detailed information about the available bed types, e.g. the quantity of twin beds for a hotel room. For the single case of just one bed of a certain type, you can use bed directly with a text. See also [[BedType]] (under development).
*
* @author schema.org
* @class BedDetails
* @module org.schema
* @extends Intangible
*/
var BedDetails = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "BedDetails";
};
BedDetails = stjs.extend(BedDetails, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/numberOfBeds
* The quantity of the given bed type available in the HotelRoom, Suite, House, or Apartment.
*
* @property numberOfBeds
* @type Number
*/
prototype.numberOfBeds = null;
/**
* Schema.org/typeOfBed
* The type of bed to which the BedDetail refers, i.e. the type of bed available in the quantity indicated by quantity.
*
* @property typeOfBed
* @type Text
*/
prototype.typeOfBed = null;
}, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Reservation
* Describes a reservation for travel, dining or an event. Some reservations require tickets. \n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, restaurant reservations, flights, or rental cars, use [[Offer]].
*
* @author schema.org
* @class Reservation
* @module org.schema
* @extends Intangible
*/
var Reservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Reservation";
};
Reservation = stjs.extend(Reservation, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/bookingAgent
* 'bookingAgent' is an out-dated term indicating a 'broker' that serves as a booking agent.
*
* @property bookingAgent
* @type schema, Organization | schema,Person
*/
prototype.bookingAgent = null;
/**
* Schema.org/priceCurrency
* The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to [[PriceSpecification]] and its subtypes.
*
* @property priceCurrency
* @type Text
*/
prototype.priceCurrency = null;
/**
* Schema.org/bookingTime
* The date and time the reservation was booked.
*
* @property bookingTime
* @type DateTime
*/
prototype.bookingTime = null;
/**
* Schema.org/totalPrice
* The total price for the reservation or ticket, including applicable taxes, shipping, etc.
*
* @property totalPrice
* @type schema, Number | schema,PriceSpecification | schema,Text
*/
prototype.totalPrice = null;
/**
* Schema.org/broker
* An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred.
*
* @property broker
* @type schema, Organization | schema,Person
*/
prototype.broker = null;
/**
* Schema.org/modifiedTime
* The date and time the reservation was modified.
*
* @property modifiedTime
* @type DateTime
*/
prototype.modifiedTime = null;
/**
* Schema.org/reservationId
* A unique identifier for the reservation.
*
* @property reservationId
* @type Text
*/
prototype.reservationId = null;
/**
* Schema.org/reservationStatus
* The current status of the reservation.
*
* @property reservationStatus
* @type ReservationStatusType
*/
prototype.reservationStatus = null;
/**
* Schema.org/programMembershipUsed
* Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation.
*
* @property programMembershipUsed
* @type ProgramMembership
*/
prototype.programMembershipUsed = null;
/**
* Schema.org/provider
* The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
*
* @property provider
* @type schema, Organization | schema,Person
*/
prototype.provider = null;
/**
* Schema.org/reservationFor
* The thing -- flight, event, restaurant,etc. being reserved.
*
* @property reservationFor
* @type Thing
*/
prototype.reservationFor = null;
/**
* Schema.org/reservedTicket
* A ticket associated with the reservation.
*
* @property reservedTicket
* @type Ticket
*/
prototype.reservedTicket = null;
/**
* Schema.org/underName
* The person or organization the reservation or ticket is for.
*
* @property underName
* @type schema, Organization | schema,Person
*/
prototype.underName = null;
}, {bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ComputerLanguage
* This type covers computer programming languages such as Scheme and Lisp, as well as other language-like computer representations. Natural languages are best represented with the [[Language]] type.
*
* @author schema.org
* @class ComputerLanguage
* @module org.schema
* @extends Intangible
*/
var ComputerLanguage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "ComputerLanguage";
};
ComputerLanguage = stjs.extend(ComputerLanguage, Intangible, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Demand
* A demand entity represents the public, not necessarily binding, not necessarily exclusive, announcement by an organization or person to seek a certain type of goods or services. For describing demand using this type, the very same properties used for Offer apply.
*
* @author schema.org
* @class Demand
* @module org.schema
* @extends Intangible
*/
var Demand = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Demand";
};
Demand = stjs.extend(Demand, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/advanceBookingRequirement
* The amount of time that is required between accepting the offer and the actual usage of the resource or service.
*
* @property advanceBookingRequirement
* @type QuantitativeValue
*/
prototype.advanceBookingRequirement = null;
/**
* Schema.org/availableDeliveryMethod
* The delivery method(s) available for this offer.
*
* @property availableDeliveryMethod
* @type DeliveryMethod
*/
prototype.availableDeliveryMethod = null;
/**
* Schema.org/priceSpecification
* One or more detailed price specifications, indicating the unit price and delivery or payment charges.
*
* @property priceSpecification
* @type PriceSpecification
*/
prototype.priceSpecification = null;
/**
* Schema.org/validFrom
* The date when the item becomes valid.
*
* @property validFrom
* @type DateTime
*/
prototype.validFrom = null;
/**
* Schema.org/businessFunction
* The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell.
*
* @property businessFunction
* @type BusinessFunction
*/
prototype.businessFunction = null;
/**
* Schema.org/itemOffered
* The item being offered.
*
* @property itemOffered
* @type schema, Service | schema,Product
*/
prototype.itemOffered = null;
/**
* Schema.org/includesObject
* This links to a node or nodes indicating the exact quantity of the products included in the offer.
*
* @property includesObject
* @type TypeAndQuantityNode
*/
prototype.includesObject = null;
/**
* Schema.org/gtin14
* The [GTIN-14](http://apps.gs1.org/GDD/glossary/Pages/GTIN-14.aspx) code of the product, or the product to which the offer refers. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin14
* @type Text
*/
prototype.gtin14 = null;
/**
* Schema.org/gtin13
* The [GTIN-13](http://apps.gs1.org/GDD/glossary/Pages/GTIN-13.aspx) code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin13
* @type Text
*/
prototype.gtin13 = null;
/**
* Schema.org/gtin12
* The [GTIN-12](http://apps.gs1.org/GDD/glossary/Pages/GTIN-12.aspx) code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin12
* @type Text
*/
prototype.gtin12 = null;
/**
* Schema.org/availableAtOrFrom
* The place(s) from which the offer can be obtained (e.g. store locations).
*
* @property availableAtOrFrom
* @type Place
*/
prototype.availableAtOrFrom = null;
/**
* Schema.org/warranty
* The warranty promise(s) included in the offer.
*
* @property warranty
* @type WarrantyPromise
*/
prototype.warranty = null;
/**
* Schema.org/serialNumber
* The serial number or any alphanumeric identifier of a particular product. When attached to an offer, it is a shortcut for the serial number of the product included in the offer.
*
* @property serialNumber
* @type Text
*/
prototype.serialNumber = null;
/**
* Schema.org/inventoryLevel
* The current approximate inventory level for the item or items.
*
* @property inventoryLevel
* @type QuantitativeValue
*/
prototype.inventoryLevel = null;
/**
* Schema.org/availabilityStarts
* The beginning of the availability of the product or service included in the offer.
*
* @property availabilityStarts
* @type DateTime
*/
prototype.availabilityStarts = null;
/**
* Schema.org/eligibleDuration
* The duration for which the given offer is valid.
*
* @property eligibleDuration
* @type QuantitativeValue
*/
prototype.eligibleDuration = null;
/**
* Schema.org/eligibleTransactionVolume
* The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount.
*
* @property eligibleTransactionVolume
* @type PriceSpecification
*/
prototype.eligibleTransactionVolume = null;
/**
* Schema.org/mpn
* The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers.
*
* @property mpn
* @type Text
*/
prototype.mpn = null;
/**
* Schema.org/areaServed
* The geographic area where a service or offered item is provided.
*
* @property areaServed
* @type schema, GeoShape | schema,Text | schema,Place | schema,AdministrativeArea
*/
prototype.areaServed = null;
/**
* Schema.org/seller
* An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider.
*
* @property seller
* @type schema, Organization | schema,Person
*/
prototype.seller = null;
/**
* Schema.org/acceptedPaymentMethod
* The payment method(s) accepted by seller for this offer.
*
* @property acceptedPaymentMethod
* @type schema, LoanOrCredit | schema,PaymentMethod
*/
prototype.acceptedPaymentMethod = null;
/**
* Schema.org/validThrough
* The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
*
* @property validThrough
* @type DateTime
*/
prototype.validThrough = null;
/**
* Schema.org/availability
* The availability of this item—for example In stock, Out of stock, Pre-order, etc.
*
* @property availability
* @type ItemAvailability
*/
prototype.availability = null;
/**
* Schema.org/sku
* The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers.
*
* @property sku
* @type Text
*/
prototype.sku = null;
/**
* Schema.org/ineligibleRegion
* The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.\n\nSee also [[eligibleRegion]].
*
* @property ineligibleRegion
* @type schema, GeoShape | schema,Text | schema,Place
*/
prototype.ineligibleRegion = null;
/**
* Schema.org/gtin8
* The [GTIN-8](http://apps.gs1.org/GDD/glossary/Pages/GTIN-8.aspx) code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See [GS1 GTIN Summary](http://www.gs1.org/barcodes/technical/idkeys/gtin) for more details.
*
* @property gtin8
* @type Text
*/
prototype.gtin8 = null;
/**
* Schema.org/deliveryLeadTime
* The typical delay between the receipt of the order and the goods either leaving the warehouse or being prepared for pickup, in case the delivery method is on site pickup.
*
* @property deliveryLeadTime
* @type QuantitativeValue
*/
prototype.deliveryLeadTime = null;
/**
* Schema.org/eligibleQuantity
* The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity.
*
* @property eligibleQuantity
* @type QuantitativeValue
*/
prototype.eligibleQuantity = null;
/**
* Schema.org/itemCondition
* A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer.
*
* @property itemCondition
* @type OfferItemCondition
*/
prototype.itemCondition = null;
/**
* Schema.org/eligibleRegion
* The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid.\n\nSee also [[ineligibleRegion]].
*
* @property eligibleRegion
* @type schema, GeoShape | schema,Text | schema,Place
*/
prototype.eligibleRegion = null;
/**
* Schema.org/eligibleCustomerType
* The type(s) of customers for which the given offer is valid.
*
* @property eligibleCustomerType
* @type BusinessEntityType
*/
prototype.eligibleCustomerType = null;
/**
* Schema.org/availabilityEnds
* The end of the availability of the product or service included in the offer.
*
* @property availabilityEnds
* @type DateTime
*/
prototype.availabilityEnds = null;
}, {advanceBookingRequirement: "QuantitativeValue", availableDeliveryMethod: "DeliveryMethod", priceSpecification: "PriceSpecification", businessFunction: "BusinessFunction", itemOffered: "Object", includesObject: "TypeAndQuantityNode", availableAtOrFrom: "Place", warranty: "WarrantyPromise", inventoryLevel: "QuantitativeValue", eligibleDuration: "QuantitativeValue", eligibleTransactionVolume: "PriceSpecification", areaServed: "Object", seller: "Object", acceptedPaymentMethod: "Object", availability: "ItemAvailability", ineligibleRegion: "Object", deliveryLeadTime: "QuantitativeValue", eligibleQuantity: "QuantitativeValue", itemCondition: "OfferItemCondition", eligibleRegion: "Object", eligibleCustomerType: "BusinessEntityType", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Seat
* Used to describe a seat, such as a reserved seat in an event reservation.
*
* @author schema.org
* @class Seat
* @module org.schema
* @extends Intangible
*/
var Seat = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "Seat";
};
Seat = stjs.extend(Seat, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/seatingType
* The type/class of the seat.
*
* @property seatingType
* @type schema, Text | schema,QualitativeValue
*/
prototype.seatingType = null;
/**
* Schema.org/seatSection
* The section location of the reserved seat (e.g. Orchestra).
*
* @property seatSection
* @type Text
*/
prototype.seatSection = null;
/**
* Schema.org/seatNumber
* The location of the reserved seat (e.g., 27).
*
* @property seatNumber
* @type Text
*/
prototype.seatNumber = null;
/**
* Schema.org/seatRow
* The row location of the reserved seat (e.g., B).
*
* @property seatRow
* @type Text
*/
prototype.seatRow = null;
}, {seatingType: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ServiceChannel
* A means for accessing a service, e.g. a government office location, web site, or phone number.
*
* @author schema.org
* @class ServiceChannel
* @module org.schema
* @extends Intangible
*/
var ServiceChannel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.org/";
this.type = "ServiceChannel";
};
ServiceChannel = stjs.extend(ServiceChannel, Intangible, [], function(constructor, prototype) {
/**
* Schema.org/providesService
* The service provided by this channel.
*
* @property providesService
* @type Service
*/
prototype.providesService = null;
/**
* Schema.org/availableLanguage
* A language someone may use with the item. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[inLanguage]]
*
* @property availableLanguage
* @type schema, Text | schema,Language
*/
prototype.availableLanguage = null;
/**
* Schema.org/serviceUrl
* The website to access the service.
*
* @property serviceUrl
* @type URL
*/
prototype.serviceUrl = null;
/**
* Schema.org/servicePhone
* The phone number to use to access the service.
*
* @property servicePhone
* @type ContactPoint
*/
prototype.servicePhone = null;
/**
* Schema.org/processingTime
* Estimated processing time for the service using this channel.
*
* @property processingTime
* @type Duration
*/
prototype.processingTime = null;
/**
* Schema.org/servicePostalAddress
* The address for accessing the service by mail.
*
* @property servicePostalAddress
* @type PostalAddress
*/
prototype.servicePostalAddress = null;
/**
* Schema.org/serviceSmsNumber
* The number to access the service by text message.
*
* @property serviceSmsNumber
* @type ContactPoint
*/
prototype.serviceSmsNumber = null;
/**
* Schema.org/serviceLocation
* The location (e.g. civic structure, local business, etc.) where a person can go to access the service.
*
* @property serviceLocation
* @type Place
*/
prototype.serviceLocation = null;
}, {providesService: "Service", availableLanguage: "Object", servicePhone: "ContactPoint", processingTime: "Duration", servicePostalAddress: "PostalAddress", serviceSmsNumber: "ContactPoint", serviceLocation: "Place", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Sculpture
* A piece of sculpture.
*
* @author schema.org
* @class Sculpture
* @module org.schema
* @extends CreativeWork
*/
var Sculpture = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Sculpture";
};
Sculpture = stjs.extend(Sculpture, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MenuSection
* A sub-grouping of food or drink items in a menu. E.g. courses (such as 'Dinner', 'Breakfast', etc.), specific type of dishes (such as 'Meat', 'Vegan', 'Drinks', etc.), or some other classification made by the menu provider.
*
* @author schema.org
* @class MenuSection
* @module org.schema
* @extends CreativeWork
*/
var MenuSection = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "MenuSection";
};
MenuSection = stjs.extend(MenuSection, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/hasMenuSection
* A subgrouping of the menu (by dishes, course, serving time period, etc.).
*
* @property hasMenuSection
* @type MenuSection
*/
prototype.hasMenuSection = null;
/**
* Schema.org/hasMenuItem
* A food or drink item contained in a menu or menu section.
*
* @property hasMenuItem
* @type MenuItem
*/
prototype.hasMenuItem = null;
}, {hasMenuSection: "MenuSection", hasMenuItem: "MenuItem", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Question
* A specific question - e.g. from a user seeking answers online, or collected in a Frequently Asked Questions (FAQ) document.
*
* @author schema.org
* @class Question
* @module org.schema
* @extends CreativeWork
*/
var Question = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Question";
};
Question = stjs.extend(Question, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/acceptedAnswer
* The answer that has been accepted as best, typically on a Question/Answer site. Sites vary in their selection mechanisms, e.g. drawing on community opinion and/or the view of the Question author.
*
* @property acceptedAnswer
* @type Answer
*/
prototype.acceptedAnswer = null;
/**
* Schema.org/upvoteCount
* The number of upvotes this question, answer or comment has received from the community.
*
* @property upvoteCount
* @type Integer
*/
prototype.upvoteCount = null;
/**
* Schema.org/answerCount
* The number of answers this question has received.
*
* @property answerCount
* @type Integer
*/
prototype.answerCount = null;
/**
* Schema.org/suggestedAnswer
* An answer (possibly one of several, possibly incorrect) to a Question, e.g. on a Question/Answer site.
*
* @property suggestedAnswer
* @type Answer
*/
prototype.suggestedAnswer = null;
/**
* Schema.org/downvoteCount
* The number of downvotes this question, answer or comment has received from the community.
*
* @property downvoteCount
* @type Integer
*/
prototype.downvoteCount = null;
}, {acceptedAnswer: "Answer", suggestedAnswer: "Answer", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Blog
* A blog.
*
* @author schema.org
* @class Blog
* @module org.schema
* @extends CreativeWork
*/
var Blog = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Blog";
};
Blog = stjs.extend(Blog, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/blogPost
* A posting that is part of this blog.
*
* @property blogPost
* @type BlogPosting
*/
prototype.blogPost = null;
/**
* Schema.org/blogPosts
* The postings that are part of this blog.
*
* @property blogPosts
* @type BlogPosting
*/
prototype.blogPosts = null;
}, {blogPost: "BlogPosting", blogPosts: "BlogPosting", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Episode
* A media episode (e.g. TV, radio, video game) which can be part of a series or season.
*
* @author schema.org
* @class Episode
* @module org.schema
* @extends CreativeWork
*/
var Episode = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Episode";
};
Episode = stjs.extend(Episode, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/partOfSeason
* The season to which this episode belongs.
*
* @property partOfSeason
* @type CreativeWorkSeason
*/
prototype.partOfSeason = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/episodeNumber
* Position of the episode within an ordered group of episodes.
*
* @property episodeNumber
* @type schema, Integer | schema,Text
*/
prototype.episodeNumber = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
/**
* Schema.org/partOfSeries
* The series to which this episode or season belongs.
*
* @property partOfSeries
* @type CreativeWorkSeries
*/
prototype.partOfSeries = null;
}, {director: "Person", partOfSeason: "CreativeWorkSeason", actor: "Person", episodeNumber: "Object", musicBy: "Object", actors: "Person", trailer: "VideoObject", productionCompany: "Organization", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CreativeWorkSeries
* A CreativeWorkSeries in schema.org is a group of related items, typically but not necessarily of the same kind. CreativeWorkSeries are usually organized into some order, often chronological. Unlike [[ItemList]] which is a general purpose data structure for lists of things, the emphasis with CreativeWorkSeries is on published materials (written e.g. books and periodicals, or media such as tv, radio and games).\n\nSpecific subtypes are available for describing [[TVSeries]], [[RadioSeries]], [[MovieSeries]], [[BookSeries]], [[Periodical]] and [[VideoGameSeries]]. In each case, the [[hasPart]] / [[isPartOf]] properties can be used to relate the CreativeWorkSeries to its parts. The general CreativeWorkSeries type serves largely just to organize these more specific and practical subtypes.\n\nIt is common for properties applicable to an item from the series to be usefully applied to the containing group. Schema.org attempts to anticipate some of these cases, but publishers should be free to apply properties of the series parts to the series as a whole wherever they seem appropriate.
*
* @author schema.org
* @class CreativeWorkSeries
* @module org.schema
* @extends CreativeWork
*/
var CreativeWorkSeries = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "CreativeWorkSeries";
};
CreativeWorkSeries = stjs.extend(CreativeWorkSeries, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/startDate
* The start date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property startDate
* @type schema, DateTime | schema,Date
*/
prototype.startDate = null;
/**
* Schema.org/endDate
* The end date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property endDate
* @type schema, DateTime | schema,Date
*/
prototype.endDate = null;
}, {startDate: "Object", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Review
* A review of an item - for example, of a restaurant, movie, or store.
*
* @author schema.org
* @class Review
* @module org.schema
* @extends CreativeWork
*/
var Review = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Review";
};
Review = stjs.extend(Review, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/reviewBody
* The actual body of the review.
*
* @property reviewBody
* @type Text
*/
prototype.reviewBody = null;
/**
* Schema.org/reviewRating
* The rating given in this review. Note that reviews can themselves be rated. The ```reviewRating``` applies to rating given by the review. The [[aggregateRating]] property applies to the review itself, as a creative work.
*
* @property reviewRating
* @type Rating
*/
prototype.reviewRating = null;
/**
* Schema.org/itemReviewed
* The item that is being reviewed/rated.
*
* @property itemReviewed
* @type Thing
*/
prototype.itemReviewed = null;
}, {reviewRating: "Rating", itemReviewed: "Thing", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SoftwareSourceCode
* Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates.
*
* @author schema.org
* @class SoftwareSourceCode
* @module org.schema
* @extends CreativeWork
*/
var SoftwareSourceCode = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "SoftwareSourceCode";
};
SoftwareSourceCode = stjs.extend(SoftwareSourceCode, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/runtimePlatform
* Runtime platform or script interpreter dependencies (Example - Java v1, Python2.3, .Net Framework 3.0).
*
* @property runtimePlatform
* @type Text
*/
prototype.runtimePlatform = null;
/**
* Schema.org/sampleType
* What type of code sample: full (compile ready) solution, code snippet, inline code, scripts, template.
*
* @property sampleType
* @type Text
*/
prototype.sampleType = null;
/**
* Schema.org/codeRepository
* Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex).
*
* @property codeRepository
* @type URL
*/
prototype.codeRepository = null;
/**
* Schema.org/targetProduct
* Target Operating System / Product to which the code applies. If applies to several versions, just the product name can be used.
*
* @property targetProduct
* @type SoftwareApplication
*/
prototype.targetProduct = null;
/**
* Schema.org/codeSampleType
* What type of code sample: full (compile ready) solution, code snippet, inline code, scripts, template.
*
* @property codeSampleType
* @type Text
*/
prototype.codeSampleType = null;
/**
* Schema.org/runtime
* Runtime platform or script interpreter dependencies (Example - Java v1, Python2.3, .Net Framework 3.0).
*
* @property runtime
* @type Text
*/
prototype.runtime = null;
/**
* Schema.org/programmingLanguage
* The computer programming language.
*
* @property programmingLanguage
* @type schema, Text | schema,ComputerLanguage
*/
prototype.programmingLanguage = null;
}, {targetProduct: "SoftwareApplication", programmingLanguage: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Painting
* A painting.
*
* @author schema.org
* @class Painting
* @module org.schema
* @extends CreativeWork
*/
var Painting = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Painting";
};
Painting = stjs.extend(Painting, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Conversation
* One or more messages between organizations or people on a particular topic. Individual messages can be linked to the conversation with isPartOf or hasPart properties.
*
* @author schema.org
* @class Conversation
* @module org.schema
* @extends CreativeWork
*/
var Conversation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Conversation";
};
Conversation = stjs.extend(Conversation, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Code
* Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates.
*
* @author schema.org
* @class Code
* @module org.schema
* @extends CreativeWork
*/
var Code = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Code";
};
Code = stjs.extend(Code, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WebPageElement
* A web page element, like a table or an image.
*
* @author schema.org
* @class WebPageElement
* @module org.schema
* @extends CreativeWork
*/
var WebPageElement = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "WebPageElement";
};
WebPageElement = stjs.extend(WebPageElement, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Clip
* A short TV or radio program or a segment/part of a program.
*
* @author schema.org
* @class Clip
* @module org.schema
* @extends CreativeWork
*/
var Clip = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Clip";
};
Clip = stjs.extend(Clip, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/clipNumber
* Position of the clip within an ordered group of clips.
*
* @property clipNumber
* @type schema, Integer | schema,Text
*/
prototype.clipNumber = null;
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/partOfEpisode
* The episode to which this clip belongs.
*
* @property partOfEpisode
* @type Episode
*/
prototype.partOfEpisode = null;
/**
* Schema.org/partOfSeason
* The season to which this episode belongs.
*
* @property partOfSeason
* @type CreativeWorkSeason
*/
prototype.partOfSeason = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
/**
* Schema.org/partOfSeries
* The series to which this episode or season belongs.
*
* @property partOfSeries
* @type CreativeWorkSeries
*/
prototype.partOfSeries = null;
}, {clipNumber: "Object", director: "Person", partOfEpisode: "Episode", partOfSeason: "CreativeWorkSeason", actor: "Person", musicBy: "Object", actors: "Person", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Movie
* A movie.
*
* @author schema.org
* @class Movie
* @module org.schema
* @extends CreativeWork
*/
var Movie = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Movie";
};
Movie = stjs.extend(Movie, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/subtitleLanguage
* Languages in which subtitles/captions are available, in [IETF BCP 47 standard format](http://tools.ietf.org/html/bcp47).
*
* @property subtitleLanguage
* @type schema, Text | schema,Language
*/
prototype.subtitleLanguage = null;
/**
* Schema.org/countryOfOrigin
* The country of the principal offices of the production company or individual responsible for the movie or program.
*
* @property countryOfOrigin
* @type Country
*/
prototype.countryOfOrigin = null;
/**
* Schema.org/duration
* The duration of the item (movie, audio recording, event, etc.) in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property duration
* @type Duration
*/
prototype.duration = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
}, {director: "Person", subtitleLanguage: "Object", countryOfOrigin: "Country", duration: "Duration", actor: "Person", musicBy: "Object", actors: "Person", trailer: "VideoObject", productionCompany: "Organization", directors: "Person", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Comment
* A comment on an item - for example, a comment on a blog post. The comment's content is expressed via the [[text]] property, and its topic via [[about]], properties shared with all CreativeWorks.
*
* @author schema.org
* @class Comment
* @module org.schema
* @extends CreativeWork
*/
var Comment = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Comment";
};
Comment = stjs.extend(Comment, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/upvoteCount
* The number of upvotes this question, answer or comment has received from the community.
*
* @property upvoteCount
* @type Integer
*/
prototype.upvoteCount = null;
/**
* Schema.org/downvoteCount
* The number of downvotes this question, answer or comment has received from the community.
*
* @property downvoteCount
* @type Integer
*/
prototype.downvoteCount = null;
/**
* Schema.org/parentItem
* The parent of a question, answer or item in general.
*
* @property parentItem
* @type Question
*/
prototype.parentItem = null;
}, {parentItem: "Question", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicRecording
* A music recording (track), usually a single song.
*
* @author schema.org
* @class MusicRecording
* @module org.schema
* @extends CreativeWork
*/
var MusicRecording = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "MusicRecording";
};
MusicRecording = stjs.extend(MusicRecording, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/isrcCode
* The International Standard Recording Code for the recording.
*
* @property isrcCode
* @type Text
*/
prototype.isrcCode = null;
/**
* Schema.org/inAlbum
* The album to which this recording belongs.
*
* @property inAlbum
* @type MusicAlbum
*/
prototype.inAlbum = null;
/**
* Schema.org/recordingOf
* The composition this track is a recording of.
*
* @property recordingOf
* @type MusicComposition
*/
prototype.recordingOf = null;
/**
* Schema.org/inPlaylist
* The playlist to which this recording belongs.
*
* @property inPlaylist
* @type MusicPlaylist
*/
prototype.inPlaylist = null;
/**
* Schema.org/duration
* The duration of the item (movie, audio recording, event, etc.) in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property duration
* @type Duration
*/
prototype.duration = null;
/**
* Schema.org/byArtist
* The artist that performed this album or recording.
*
* @property byArtist
* @type MusicGroup
*/
prototype.byArtist = null;
}, {inAlbum: "MusicAlbum", recordingOf: "MusicComposition", inPlaylist: "MusicPlaylist", duration: "Duration", byArtist: "MusicGroup", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Menu
* A structured representation of food or drink items available from a FoodEstablishment.
*
* @author schema.org
* @class Menu
* @module org.schema
* @extends CreativeWork
*/
var Menu = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Menu";
};
Menu = stjs.extend(Menu, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/hasMenuSection
* A subgrouping of the menu (by dishes, course, serving time period, etc.).
*
* @property hasMenuSection
* @type MenuSection
*/
prototype.hasMenuSection = null;
/**
* Schema.org/hasMenuItem
* A food or drink item contained in a menu or menu section.
*
* @property hasMenuItem
* @type MenuItem
*/
prototype.hasMenuItem = null;
}, {hasMenuSection: "MenuSection", hasMenuItem: "MenuItem", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PublicationIssue
* A part of a successively published publication such as a periodical or publication volume, often numbered, usually containing a grouping of works such as articles.\n\n[blog post](http://blog.schema.org/2014/09/schemaorg-support-for-bibliographic_2.html).
*
* @author schema.org
* @class PublicationIssue
* @module org.schema
* @extends CreativeWork
*/
var PublicationIssue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "PublicationIssue";
};
PublicationIssue = stjs.extend(PublicationIssue, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/pageStart
* The page on which the work starts; for example "135" or "xiii".
*
* @property pageStart
* @type schema, Integer | schema,Text
*/
prototype.pageStart = null;
/**
* Schema.org/pageEnd
* The page on which the work ends; for example "138" or "xvi".
*
* @property pageEnd
* @type schema, Integer | schema,Text
*/
prototype.pageEnd = null;
/**
* Schema.org/pagination
* Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".
*
* @property pagination
* @type Text
*/
prototype.pagination = null;
/**
* Schema.org/issueNumber
* Identifies the issue of publication; for example, "iii" or "2".
*
* @property issueNumber
* @type schema, Integer | schema,Text
*/
prototype.issueNumber = null;
}, {pageStart: "Object", pageEnd: "Object", issueNumber: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CreativeWorkSeason
* A media season e.g. tv, radio, video game etc.
*
* @author schema.org
* @class CreativeWorkSeason
* @module org.schema
* @extends CreativeWork
*/
var CreativeWorkSeason = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "CreativeWorkSeason";
};
CreativeWorkSeason = stjs.extend(CreativeWorkSeason, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/episodes
* An episode of a TV/radio series or season.
*
* @property episodes
* @type Episode
*/
prototype.episodes = null;
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/seasonNumber
* Position of the season within an ordered group of seasons.
*
* @property seasonNumber
* @type schema, Integer | schema,Text
*/
prototype.seasonNumber = null;
/**
* Schema.org/episode
* An episode of a tv, radio or game media within a series or season.
*
* @property episode
* @type Episode
*/
prototype.episode = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/startDate
* The start date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property startDate
* @type schema, DateTime | schema,Date
*/
prototype.startDate = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/numberOfEpisodes
* The number of episodes in this season or series.
*
* @property numberOfEpisodes
* @type Integer
*/
prototype.numberOfEpisodes = null;
/**
* Schema.org/partOfSeries
* The series to which this episode or season belongs.
*
* @property partOfSeries
* @type CreativeWorkSeries
*/
prototype.partOfSeries = null;
/**
* Schema.org/endDate
* The end date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property endDate
* @type schema, DateTime | schema,Date
*/
prototype.endDate = null;
}, {episodes: "Episode", director: "Person", seasonNumber: "Object", episode: "Episode", actor: "Person", trailer: "VideoObject", startDate: "Object", productionCompany: "Organization", partOfSeries: "CreativeWorkSeries", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PublicationVolume
* A part of a successively published publication such as a periodical or multi-volume work, often numbered. It may represent a time span, such as a year.
* <p>
* <br/><br/>See also <a href="http://blog.schema.org/2014/09/schemaorg-support-for-bibliographic_2.html">blog post</a>.
*
* @author schema.org
* @class PublicationVolume
* @module org.schema
* @extends CreativeWork
*/
var PublicationVolume = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "PublicationVolume";
};
PublicationVolume = stjs.extend(PublicationVolume, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/pageStart
* The page on which the work starts; for example "135" or "xiii".
*
* @property pageStart
* @type schema, Integer | schema,Text
*/
prototype.pageStart = null;
/**
* Schema.org/pageEnd
* The page on which the work ends; for example "138" or "xvi".
*
* @property pageEnd
* @type schema, Integer | schema,Text
*/
prototype.pageEnd = null;
/**
* Schema.org/volumeNumber
* Identifies the volume of publication or multi-part work; for example, "iii" or "2".
*
* @property volumeNumber
* @type schema, Integer | schema,Text
*/
prototype.volumeNumber = null;
/**
* Schema.org/pagination
* Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".
*
* @property pagination
* @type Text
*/
prototype.pagination = null;
}, {pageStart: "Object", pageEnd: "Object", volumeNumber: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Photograph
* A photograph.
*
* @author schema.org
* @class Photograph
* @module org.schema
* @extends CreativeWork
*/
var Photograph = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Photograph";
};
Photograph = stjs.extend(Photograph, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicComposition
* A musical composition.
*
* @author schema.org
* @class MusicComposition
* @module org.schema
* @extends CreativeWork
*/
var MusicComposition = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "MusicComposition";
};
MusicComposition = stjs.extend(MusicComposition, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/musicArrangement
* An arrangement derived from the composition.
*
* @property musicArrangement
* @type MusicComposition
*/
prototype.musicArrangement = null;
/**
* Schema.org/composer
* The person or organization who wrote a composition, or who is the composer of a work performed at some event.
*
* @property composer
* @type schema, Organization | schema,Person
*/
prototype.composer = null;
/**
* Schema.org/recordedAs
* An audio recording of the work.
*
* @property recordedAs
* @type MusicRecording
*/
prototype.recordedAs = null;
/**
* Schema.org/lyricist
* The person who wrote the words.
*
* @property lyricist
* @type Person
*/
prototype.lyricist = null;
/**
* Schema.org/musicCompositionForm
* The type of composition (e.g. overture, sonata, symphony, etc.).
*
* @property musicCompositionForm
* @type Text
*/
prototype.musicCompositionForm = null;
/**
* Schema.org/musicalKey
* The key, mode, or scale this composition uses.
*
* @property musicalKey
* @type Text
*/
prototype.musicalKey = null;
/**
* Schema.org/iswcCode
* The International Standard Musical Work Code for the composition.
*
* @property iswcCode
* @type Text
*/
prototype.iswcCode = null;
/**
* Schema.org/includedComposition
* Smaller compositions included in this work (e.g. a movement in a symphony).
*
* @property includedComposition
* @type MusicComposition
*/
prototype.includedComposition = null;
/**
* Schema.org/lyrics
* The words in the song.
*
* @property lyrics
* @type CreativeWork
*/
prototype.lyrics = null;
/**
* Schema.org/firstPerformance
* The date and place the work was first performed.
*
* @property firstPerformance
* @type Event
*/
prototype.firstPerformance = null;
}, {musicArrangement: "MusicComposition", composer: "Object", recordedAs: "MusicRecording", lyricist: "Person", includedComposition: "MusicComposition", lyrics: "CreativeWork", firstPerformance: "Event", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Message
* A single message from a sender to one or more organizations or people.
*
* @author schema.org
* @class Message
* @module org.schema
* @extends CreativeWork
*/
var Message = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Message";
};
Message = stjs.extend(Message, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/sender
* A sub property of participant. The participant who is at the sending end of the action.
*
* @property sender
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.sender = null;
/**
* Schema.org/dateReceived
* The date/time the message was received if a single recipient exists.
*
* @property dateReceived
* @type DateTime
*/
prototype.dateReceived = null;
/**
* Schema.org/dateRead
* The date/time at which the message has been read by the recipient if a single recipient exists.
*
* @property dateRead
* @type DateTime
*/
prototype.dateRead = null;
/**
* Schema.org/dateSent
* The date/time at which the message was sent.
*
* @property dateSent
* @type DateTime
*/
prototype.dateSent = null;
/**
* Schema.org/messageAttachment
* A CreativeWork attached to the message.
*
* @property messageAttachment
* @type CreativeWork
*/
prototype.messageAttachment = null;
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {sender: "Object", messageAttachment: "CreativeWork", recipient: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Recipe
* A recipe. For dietary restrictions covered by the recipe, a few common restrictions are enumerated via [[suitableForDiet]]. The [[keywords]] property can also be used to add more detail.
*
* @author schema.org
* @class Recipe
* @module org.schema
* @extends CreativeWork
*/
var Recipe = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Recipe";
};
Recipe = stjs.extend(Recipe, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/cookingMethod
* The method of cooking, such as Frying, Steaming, ...
*
* @property cookingMethod
* @type Text
*/
prototype.cookingMethod = null;
/**
* Schema.org/recipeCuisine
* The cuisine of the recipe (for example, French or Ethiopian).
*
* @property recipeCuisine
* @type Text
*/
prototype.recipeCuisine = null;
/**
* Schema.org/suitableForDiet
* Indicates a dietary restriction or guideline for which this recipe or menu item is suitable, e.g. diabetic, halal etc.
*
* @property suitableForDiet
* @type RestrictedDiet
*/
prototype.suitableForDiet = null;
/**
* Schema.org/recipeInstructions
* A step or instruction involved in making the recipe.
*
* @property recipeInstructions
* @type schema, Text | schema,ItemList
*/
prototype.recipeInstructions = null;
/**
* Schema.org/cookTime
* The time it takes to actually cook the dish, in [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property cookTime
* @type Duration
*/
prototype.cookTime = null;
/**
* Schema.org/recipeYield
* The quantity produced by the recipe (for example, number of people served, number of servings, etc).
*
* @property recipeYield
* @type Text
*/
prototype.recipeYield = null;
/**
* Schema.org/prepTime
* The length of time it takes to prepare the recipe, in [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property prepTime
* @type Duration
*/
prototype.prepTime = null;
/**
* Schema.org/totalTime
* The total time it takes to prepare and cook the recipe, in [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property totalTime
* @type Duration
*/
prototype.totalTime = null;
/**
* Schema.org/nutrition
* Nutrition information about the recipe or menu item.
*
* @property nutrition
* @type NutritionInformation
*/
prototype.nutrition = null;
/**
* Schema.org/recipeCategory
* The category of the recipe—for example, appetizer, entree, etc.
*
* @property recipeCategory
* @type Text
*/
prototype.recipeCategory = null;
/**
* Schema.org/recipeIngredient
* A single ingredient used in the recipe, e.g. sugar, flour or garlic.
*
* @property recipeIngredient
* @type Text
*/
prototype.recipeIngredient = null;
/**
* Schema.org/ingredients
* A single ingredient used in the recipe, e.g. sugar, flour or garlic.
*
* @property ingredients
* @type Text
*/
prototype.ingredients = null;
}, {suitableForDiet: "RestrictedDiet", recipeInstructions: "Object", cookTime: "Duration", prepTime: "Duration", totalTime: "Duration", nutrition: "NutritionInformation", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Book
* A book.
*
* @author schema.org
* @class Book
* @module org.schema
* @extends CreativeWork
*/
var Book = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Book";
};
Book = stjs.extend(Book, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/illustrator
* The illustrator of the book.
*
* @property illustrator
* @type Person
*/
prototype.illustrator = null;
/**
* Schema.org/bookEdition
* The edition of the book.
*
* @property bookEdition
* @type Text
*/
prototype.bookEdition = null;
/**
* Schema.org/bookFormat
* The format of the book.
*
* @property bookFormat
* @type BookFormatType
*/
prototype.bookFormat = null;
/**
* Schema.org/isbn
* The ISBN of the book.
*
* @property isbn
* @type Text
*/
prototype.isbn = null;
/**
* Schema.org/numberOfPages
* The number of pages in the book.
*
* @property numberOfPages
* @type Integer
*/
prototype.numberOfPages = null;
}, {illustrator: "Person", bookFormat: "BookFormatType", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DigitalDocument
* An electronic file or document.
*
* @author schema.org
* @class DigitalDocument
* @module org.schema
* @extends CreativeWork
*/
var DigitalDocument = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "DigitalDocument";
};
DigitalDocument = stjs.extend(DigitalDocument, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/hasDigitalDocumentPermission
* A permission related to the access to this document (e.g. permission to read or write an electronic document). For a public document, specify a grantee with an Audience with audienceType equal to "public".
*
* @property hasDigitalDocumentPermission
* @type DigitalDocumentPermission
*/
prototype.hasDigitalDocumentPermission = null;
}, {hasDigitalDocumentPermission: "DigitalDocumentPermission", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VisualArtwork
* A work of art that is primarily visual in character.
*
* @author schema.org
* @class VisualArtwork
* @module org.schema
* @extends CreativeWork
*/
var VisualArtwork = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "VisualArtwork";
};
VisualArtwork = stjs.extend(VisualArtwork, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/artMedium
* The material used. (e.g. Oil, Watercolour, Acrylic, Linoprint, Marble, Cyanotype, Digital, Lithograph, DryPoint, Intaglio, Pastel, Woodcut, Pencil, Mixed Media, etc.)
*
* @property artMedium
* @type schema, URL | schema,Text
*/
prototype.artMedium = null;
/**
* Schema.org/height
* The height of the item.
*
* @property height
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.height = null;
/**
* Schema.org/artform
* e.g. Painting, Drawing, Sculpture, Print, Photograph, Assemblage, Collage, etc.
*
* @property artform
* @type schema, URL | schema,Text
*/
prototype.artform = null;
/**
* Schema.org/depth
* The depth of the item.
*
* @property depth
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.depth = null;
/**
* Schema.org/surface
* A material used as a surface in some artwork, e.g. Canvas, Paper, Wood, Board, etc.
*
* @property surface
* @type schema, URL | schema,Text
*/
prototype.surface = null;
/**
* Schema.org/width
* The width of the item.
*
* @property width
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.width = null;
/**
* Schema.org/artEdition
* The number of copies when multiple copies of a piece of artwork are produced - e.g. for a limited edition of 20 prints, 'artEdition' refers to the total number of copies (in this example "20").
*
* @property artEdition
* @type schema, Integer | schema,Text
*/
prototype.artEdition = null;
/**
* Schema.org/artworkSurface
* The supporting materials for the artwork, e.g. Canvas, Paper, Wood, Board, etc.
*
* @property artworkSurface
* @type schema, URL | schema,Text
*/
prototype.artworkSurface = null;
}, {artMedium: "Object", height: "Object", artform: "Object", depth: "Object", surface: "Object", width: "Object", artEdition: "Object", artworkSurface: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DataCatalog
* A collection of datasets.
*
* @author schema.org
* @class DataCatalog
* @module org.schema
* @extends CreativeWork
*/
var DataCatalog = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "DataCatalog";
};
DataCatalog = stjs.extend(DataCatalog, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/dataset
* A dataset contained in this catalog.
*
* @property dataset
* @type Dataset
*/
prototype.dataset = null;
}, {dataset: "Dataset", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Article
* An article, such as a news article or piece of investigative report. Newspapers and magazines have articles of many different types and this is intended to cover them all.\n\nSee also [blog post](http://blog.schema.org/2014/09/schemaorg-support-for-bibliographic_2.html).
*
* @author schema.org
* @class Article
* @module org.schema
* @extends CreativeWork
*/
var Article = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Article";
};
Article = stjs.extend(Article, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/pageStart
* The page on which the work starts; for example "135" or "xiii".
*
* @property pageStart
* @type schema, Integer | schema,Text
*/
prototype.pageStart = null;
/**
* Schema.org/pageEnd
* The page on which the work ends; for example "138" or "xvi".
*
* @property pageEnd
* @type schema, Integer | schema,Text
*/
prototype.pageEnd = null;
/**
* Schema.org/articleSection
* Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc.
*
* @property articleSection
* @type Text
*/
prototype.articleSection = null;
/**
* Schema.org/articleBody
* The actual body of the article.
*
* @property articleBody
* @type Text
*/
prototype.articleBody = null;
/**
* Schema.org/wordCount
* The number of words in the text of the Article.
*
* @property wordCount
* @type Integer
*/
prototype.wordCount = null;
/**
* Schema.org/pagination
* Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".
*
* @property pagination
* @type Text
*/
prototype.pagination = null;
}, {pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WebSite
* A WebSite is a set of related web pages and other items typically served from a single web domain and accessible via URLs.
*
* @author schema.org
* @class WebSite
* @module org.schema
* @extends CreativeWork
*/
var WebSite = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "WebSite";
};
WebSite = stjs.extend(WebSite, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicPlaylist
* A collection of music tracks in playlist form.
*
* @author schema.org
* @class MusicPlaylist
* @module org.schema
* @extends CreativeWork
*/
var MusicPlaylist = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "MusicPlaylist";
};
MusicPlaylist = stjs.extend(MusicPlaylist, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/numTracks
* The number of tracks in this album or playlist.
*
* @property numTracks
* @type Integer
*/
prototype.numTracks = null;
/**
* Schema.org/tracks
* A music recording (track)—usually a single song.
*
* @property tracks
* @type MusicRecording
*/
prototype.tracks = null;
/**
* Schema.org/track
* A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording.
*
* @property track
* @type schema, MusicRecording | schema,ItemList
*/
prototype.track = null;
}, {tracks: "MusicRecording", track: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SoftwareApplication
* A software application.
*
* @author schema.org
* @class SoftwareApplication
* @module org.schema
* @extends CreativeWork
*/
var SoftwareApplication = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "SoftwareApplication";
};
SoftwareApplication = stjs.extend(SoftwareApplication, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/storageRequirements
* Storage requirements (free space required).
*
* @property storageRequirements
* @type schema, URL | schema,Text
*/
prototype.storageRequirements = null;
/**
* Schema.org/device
* Device required to run the application. Used in cases where a specific make/model is required to run the application.
*
* @property device
* @type Text
*/
prototype.device = null;
/**
* Schema.org/installUrl
* URL at which the app may be installed, if different from the URL of the item.
*
* @property installUrl
* @type URL
*/
prototype.installUrl = null;
/**
* Schema.org/countriesSupported
* Countries for which the application is supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code.
*
* @property countriesSupported
* @type Text
*/
prototype.countriesSupported = null;
/**
* Schema.org/softwareVersion
* Version of the software instance.
*
* @property softwareVersion
* @type Text
*/
prototype.softwareVersion = null;
/**
* Schema.org/softwareAddOn
* Additional content for a software application.
*
* @property softwareAddOn
* @type SoftwareApplication
*/
prototype.softwareAddOn = null;
/**
* Schema.org/supportingData
* Supporting data for a SoftwareApplication.
*
* @property supportingData
* @type DataFeed
*/
prototype.supportingData = null;
/**
* Schema.org/memoryRequirements
* Minimum memory requirements.
*
* @property memoryRequirements
* @type schema, URL | schema,Text
*/
prototype.memoryRequirements = null;
/**
* Schema.org/applicationSubCategory
* Subcategory of the application, e.g. 'Arcade Game'.
*
* @property applicationSubCategory
* @type schema, URL | schema,Text
*/
prototype.applicationSubCategory = null;
/**
* Schema.org/featureList
* Features or modules provided by this application (and possibly required by other applications).
*
* @property featureList
* @type schema, URL | schema,Text
*/
prototype.featureList = null;
/**
* Schema.org/softwareHelp
* Software application help.
*
* @property softwareHelp
* @type CreativeWork
*/
prototype.softwareHelp = null;
/**
* Schema.org/screenshot
* A link to a screenshot image of the app.
*
* @property screenshot
* @type schema, URL | schema,ImageObject
*/
prototype.screenshot = null;
/**
* Schema.org/permissions
* Permission(s) required to run the app (for example, a mobile app may require full internet access or may run only on wifi).
*
* @property permissions
* @type Text
*/
prototype.permissions = null;
/**
* Schema.org/requirements
* Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime).
*
* @property requirements
* @type schema, URL | schema,Text
*/
prototype.requirements = null;
/**
* Schema.org/applicationCategory
* Type of software application, e.g. 'Game, Multimedia'.
*
* @property applicationCategory
* @type schema, URL | schema,Text
*/
prototype.applicationCategory = null;
/**
* Schema.org/releaseNotes
* Description of what changed in this version.
*
* @property releaseNotes
* @type schema, URL | schema,Text
*/
prototype.releaseNotes = null;
/**
* Schema.org/operatingSystem
* Operating systems supported (Windows 7, OSX 10.6, Android 1.6).
*
* @property operatingSystem
* @type Text
*/
prototype.operatingSystem = null;
/**
* Schema.org/processorRequirements
* Processor architecture required to run the application (e.g. IA64).
*
* @property processorRequirements
* @type Text
*/
prototype.processorRequirements = null;
/**
* Schema.org/countriesNotSupported
* Countries for which the application is not supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code.
*
* @property countriesNotSupported
* @type Text
*/
prototype.countriesNotSupported = null;
/**
* Schema.org/availableOnDevice
* Device required to run the application. Used in cases where a specific make/model is required to run the application.
*
* @property availableOnDevice
* @type Text
*/
prototype.availableOnDevice = null;
/**
* Schema.org/softwareRequirements
* Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime).
*
* @property softwareRequirements
* @type schema, URL | schema,Text
*/
prototype.softwareRequirements = null;
/**
* Schema.org/fileSize
* Size of the application / package (e.g. 18MB). In the absence of a unit (MB, KB etc.), KB will be assumed.
*
* @property fileSize
* @type Text
*/
prototype.fileSize = null;
/**
* Schema.org/applicationSuite
* The name of the application suite to which the application belongs (e.g. Excel belongs to Office).
*
* @property applicationSuite
* @type Text
*/
prototype.applicationSuite = null;
/**
* Schema.org/downloadUrl
* If the file can be downloaded, URL to download the binary.
*
* @property downloadUrl
* @type URL
*/
prototype.downloadUrl = null;
}, {storageRequirements: "Object", softwareAddOn: "SoftwareApplication", supportingData: "DataFeed", memoryRequirements: "Object", applicationSubCategory: "Object", featureList: "Object", softwareHelp: "CreativeWork", screenshot: "Object", requirements: "Object", applicationCategory: "Object", releaseNotes: "Object", softwareRequirements: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WebPage
* A web page. Every web page is implicitly assumed to be declared to be of type WebPage, so the various properties about that webpage, such as <code>breadcrumb</code> may be used. We recommend explicit declaration if these properties are specified, but if they are found outside of an itemscope, they will be assumed to be about the page.
*
* @author schema.org
* @class WebPage
* @module org.schema
* @extends CreativeWork
*/
var WebPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "WebPage";
};
WebPage = stjs.extend(WebPage, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/specialty
* One of the domain specialities to which this web page's content applies.
*
* @property specialty
* @type Specialty
*/
prototype.specialty = null;
/**
* Schema.org/breadcrumb
* A set of links that can help a user understand and navigate a website hierarchy.
*
* @property breadcrumb
* @type schema, Text | schema,BreadcrumbList
*/
prototype.breadcrumb = null;
/**
* Schema.org/relatedLink
* A link related to this web page, for example to other related web pages.
*
* @property relatedLink
* @type URL
*/
prototype.relatedLink = null;
/**
* Schema.org/primaryImageOfPage
* Indicates the main image on the page.
*
* @property primaryImageOfPage
* @type ImageObject
*/
prototype.primaryImageOfPage = null;
/**
* Schema.org/significantLink
* One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most.
*
* @property significantLink
* @type URL
*/
prototype.significantLink = null;
/**
* Schema.org/mainContentOfPage
* Indicates if this web page element is the main subject of the page.
*
* @property mainContentOfPage
* @type WebPageElement
*/
prototype.mainContentOfPage = null;
/**
* Schema.org/significantLinks
* The most significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most.
*
* @property significantLinks
* @type URL
*/
prototype.significantLinks = null;
/**
* Schema.org/lastReviewed
* Date on which the content on this web page was last reviewed for accuracy and/or completeness.
*
* @property lastReviewed
* @type Date
*/
prototype.lastReviewed = null;
/**
* Schema.org/reviewedBy
* People or organizations that have reviewed the content on this web page for accuracy and/or completeness.
*
* @property reviewedBy
* @type schema, Organization | schema,Person
*/
prototype.reviewedBy = null;
}, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Season
* A media season e.g. tv, radio, video game etc.
*
* @author schema.org
* @class Season
* @module org.schema
* @extends CreativeWork
*/
var Season = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Season";
};
Season = stjs.extend(Season, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Map
* A map.
*
* @author schema.org
* @class Map
* @module org.schema
* @extends CreativeWork
*/
var Map = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Map";
};
Map = stjs.extend(Map, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/mapType
* Indicates the kind of Map, from the MapCategoryType Enumeration.
*
* @property mapType
* @type MapCategoryType
*/
prototype.mapType = null;
}, {mapType: "MapCategoryType", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Dataset
* A body of structured information describing some topic(s) of interest.
*
* @author schema.org
* @class Dataset
* @module org.schema
* @extends CreativeWork
*/
var Dataset = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Dataset";
};
Dataset = stjs.extend(Dataset, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/spatial
* The range of spatial applicability of a dataset, e.g. for a dataset of New York weather, the state of New York.
*
* @property spatial
* @type Place
*/
prototype.spatial = null;
/**
* Schema.org/includedDataCatalog
* A data catalog which contains this dataset (this property was previously 'catalog', preferred name is now 'includedInDataCatalog').
*
* @property includedDataCatalog
* @type DataCatalog
*/
prototype.includedDataCatalog = null;
/**
* Schema.org/includedInDataCatalog
* A data catalog which contains this dataset.
*
* @property includedInDataCatalog
* @type DataCatalog
*/
prototype.includedInDataCatalog = null;
/**
* Schema.org/temporal
* The range of temporal applicability of a dataset, e.g. for a 2011 census dataset, the year 2011 (in ISO 8601 time interval format).
*
* @property temporal
* @type DateTime
*/
prototype.temporal = null;
/**
* Schema.org/datasetTimeInterval
* The range of temporal applicability of a dataset, e.g. for a 2011 census dataset, the year 2011 (in ISO 8601 time interval format).
*
* @property datasetTimeInterval
* @type DateTime
*/
prototype.datasetTimeInterval = null;
/**
* Schema.org/distribution
* A downloadable form of this dataset, at a specific location, in a specific format.
*
* @property distribution
* @type DataDownload
*/
prototype.distribution = null;
/**
* Schema.org/catalog
* A data catalog which contains this dataset.
*
* @property catalog
* @type DataCatalog
*/
prototype.catalog = null;
}, {spatial: "Place", includedDataCatalog: "DataCatalog", includedInDataCatalog: "DataCatalog", distribution: "DataDownload", catalog: "DataCatalog", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Game
* The Game type represents things which are games. These are typically rule-governed recreational activities, e.g. role-playing games in which players assume the role of characters in a fictional setting.
*
* @author schema.org
* @class Game
* @module org.schema
* @extends CreativeWork
*/
var Game = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Game";
};
Game = stjs.extend(Game, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/gameLocation
* Real or fictional location of the game (or part of game).
*
* @property gameLocation
* @type schema, PostalAddress | schema,Place | schema,URL
*/
prototype.gameLocation = null;
/**
* Schema.org/quest
* The task that a player-controlled character, or group of characters may complete in order to gain a reward.
*
* @property quest
* @type Thing
*/
prototype.quest = null;
/**
* Schema.org/gameItem
* An item is an object within the game world that can be collected by a player or, occasionally, a non-player character.
*
* @property gameItem
* @type Thing
*/
prototype.gameItem = null;
/**
* Schema.org/numberOfPlayers
* Indicate how many people can play this game (minimum, maximum, or range).
*
* @property numberOfPlayers
* @type QuantitativeValue
*/
prototype.numberOfPlayers = null;
/**
* Schema.org/characterAttribute
* A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage).
*
* @property characterAttribute
* @type Thing
*/
prototype.characterAttribute = null;
}, {gameLocation: "Object", quest: "Thing", gameItem: "Thing", numberOfPlayers: "QuantitativeValue", characterAttribute: "Thing", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MediaObject
* A media object, such as an image, video, or audio object embedded in a web page or a downloadable dataset i.e. DataDownload. Note that a creative work may have many media objects associated with it on the same web page. For example, a page about a single song (MusicRecording) may have a music video (VideoObject), and a high and low bandwidth audio stream (2 AudioObject's).
*
* @author schema.org
* @class MediaObject
* @module org.schema
* @extends CreativeWork
*/
var MediaObject = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "MediaObject";
};
MediaObject = stjs.extend(MediaObject, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/expires
* Date the content expires and is no longer useful or available. Useful for videos.
*
* @property expires
* @type Date
*/
prototype.expires = null;
/**
* Schema.org/regionsAllowed
* The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in [ISO 3166 format](http://en.wikipedia.org/wiki/ISO_3166).
*
* @property regionsAllowed
* @type Place
*/
prototype.regionsAllowed = null;
/**
* Schema.org/encodingFormat
* mp3, mpeg4, etc.
*
* @property encodingFormat
* @type Text
*/
prototype.encodingFormat = null;
/**
* Schema.org/embedUrl
* A URL pointing to a player for a specific video. In general, this is the information in the ```src``` element of an ```embed``` tag and should not be the same as the content of the ```loc``` tag.
*
* @property embedUrl
* @type URL
*/
prototype.embedUrl = null;
/**
* Schema.org/height
* The height of the item.
*
* @property height
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.height = null;
/**
* Schema.org/requiresSubscription
* Indicates if use of the media require a subscription (either paid or free). Allowed values are ```true``` or ```false``` (note that an earlier version had 'yes', 'no').
*
* @property requiresSubscription
* @type Boolean
*/
prototype.requiresSubscription = null;
/**
* Schema.org/playerType
* Player type required—for example, Flash or Silverlight.
*
* @property playerType
* @type Text
*/
prototype.playerType = null;
/**
* Schema.org/duration
* The duration of the item (movie, audio recording, event, etc.) in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property duration
* @type Duration
*/
prototype.duration = null;
/**
* Schema.org/contentUrl
* Actual bytes of the media object, for example the image file or video file.
*
* @property contentUrl
* @type URL
*/
prototype.contentUrl = null;
/**
* Schema.org/width
* The width of the item.
*
* @property width
* @type schema, Distance | schema,QuantitativeValue
*/
prototype.width = null;
/**
* Schema.org/associatedArticle
* A NewsArticle associated with the Media Object.
*
* @property associatedArticle
* @type NewsArticle
*/
prototype.associatedArticle = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/uploadDate
* Date when this media object was uploaded to this site.
*
* @property uploadDate
* @type Date
*/
prototype.uploadDate = null;
/**
* Schema.org/bitrate
* The bitrate of the media object.
*
* @property bitrate
* @type Text
*/
prototype.bitrate = null;
/**
* Schema.org/encodesCreativeWork
* The CreativeWork encoded by this media object.
*
* @property encodesCreativeWork
* @type CreativeWork
*/
prototype.encodesCreativeWork = null;
/**
* Schema.org/contentSize
* File size in (mega/kilo) bytes.
*
* @property contentSize
* @type Text
*/
prototype.contentSize = null;
}, {regionsAllowed: "Place", height: "Object", duration: "Duration", width: "Object", associatedArticle: "NewsArticle", productionCompany: "Organization", encodesCreativeWork: "CreativeWork", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Series
* <p>
* A Series in schema.org is a group of related items, typically but not necessarily of the same kind.
*
* @author schema.org
* @class Series
* @module org.schema
* @extends CreativeWork
*/
var Series = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Series";
};
Series = stjs.extend(Series, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Course
* A description of an educational course which may be offered as distinct instances at which take place at different times or take place at different locations, or be offered through different media or modes of study. An educational course is a sequence of one or more educational events and/or creative works which aims to build knowledge, competence or ability of learners.
*
* @author schema.org
* @class Course
* @module org.schema
* @extends CreativeWork
*/
var Course = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.org/";
this.type = "Course";
};
Course = stjs.extend(Course, CreativeWork, [], function(constructor, prototype) {
/**
* Schema.org/hasCourseInstance
* An offering of the course at a specific time and place or through specific media or mode of study or to a specific section of students.
*
* @property hasCourseInstance
* @type CourseInstance
*/
prototype.hasCourseInstance = null;
/**
* Schema.org/coursePrerequisites
* Requirements for taking the Course. May be completion of another [[Course]] or a textual description like "permission of instructor". Requirements may be a pre-requisite competency, referenced using [[AlignmentObject]].
*
* @property coursePrerequisites
* @type schema, AlignmentObject | schema,Text | schema,Course
*/
prototype.coursePrerequisites = null;
/**
* Schema.org/courseCode
* The identifier for the [[Course]] used by the course [[provider]] (e.g. CS101 or 6.001).
*
* @property courseCode
* @type Text
*/
prototype.courseCode = null;
}, {hasCourseInstance: "CourseInstance", coursePrerequisites: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PerformingGroup
* A performance group, such as a band, an orchestra, or a circus.
*
* @author schema.org
* @class PerformingGroup
* @module org.schema
* @extends Organization
*/
var PerformingGroup = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "PerformingGroup";
};
PerformingGroup = stjs.extend(PerformingGroup, Organization, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EducationalOrganization
* An educational organization.
*
* @author schema.org
* @class EducationalOrganization
* @module org.schema
* @extends Organization
*/
var EducationalOrganization = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "EducationalOrganization";
};
EducationalOrganization = stjs.extend(EducationalOrganization, Organization, [], function(constructor, prototype) {
/**
* Schema.org/alumni
* Alumni of an organization.
*
* @property alumni
* @type Person
*/
prototype.alumni = null;
}, {alumni: "Person", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Airline
* An organization that provides flights for passengers.
*
* @author schema.org
* @class Airline
* @module org.schema
* @extends Organization
*/
var Airline = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "Airline";
};
Airline = stjs.extend(Airline, Organization, [], function(constructor, prototype) {
/**
* Schema.org/iataCode
* IATA identifier for an airline or airport.
*
* @property iataCode
* @type Text
*/
prototype.iataCode = null;
/**
* Schema.org/boardingPolicy
* The type of boarding policy used by the airline (e.g. zone-based or group-based).
*
* @property boardingPolicy
* @type BoardingPolicyType
*/
prototype.boardingPolicy = null;
}, {boardingPolicy: "BoardingPolicyType", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GovernmentOrganization
* A governmental organization or agency.
*
* @author schema.org
* @class GovernmentOrganization
* @module org.schema
* @extends Organization
*/
var GovernmentOrganization = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "GovernmentOrganization";
};
GovernmentOrganization = stjs.extend(GovernmentOrganization, Organization, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MedicalOrganization
* A medical organization (physical or not), such as hospital, institution or clinic.
*
* @author schema.org
* @class MedicalOrganization
* @module org.schema
* @extends Organization
*/
var MedicalOrganization = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "MedicalOrganization";
};
MedicalOrganization = stjs.extend(MedicalOrganization, Organization, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Corporation
* Organization: A business corporation.
*
* @author schema.org
* @class Corporation
* @module org.schema
* @extends Organization
*/
var Corporation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "Corporation";
};
Corporation = stjs.extend(Corporation, Organization, [], function(constructor, prototype) {
/**
* Schema.org/tickerSymbol
* The exchange traded instrument associated with a Corporation object. The tickerSymbol is expressed as an exchange and an instrument name separated by a space character. For the exchange component of the tickerSymbol attribute, we reccommend using the controlled vocaulary of Market Identifier Codes (MIC) specified in ISO15022.
*
* @property tickerSymbol
* @type Text
*/
prototype.tickerSymbol = null;
}, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LocalBusiness
* A particular physical business or branch of an organization. Examples of LocalBusiness include a restaurant, a particular branch of a restaurant chain, a branch of a bank, a medical practice, a club, a bowling alley, etc.
*
* @author schema.org
* @class LocalBusiness
* @module org.schema
* @extends Organization
*/
var LocalBusiness = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "LocalBusiness";
};
LocalBusiness = stjs.extend(LocalBusiness, Organization, [], function(constructor, prototype) {
/**
* Schema.org/openingHours
* The general opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.\n\n* Days are specified using the following two-letter combinations: ```Mo```, ```Tu```, ```We```, ```Th```, ```Fr```, ```Sa```, ```Su```.\n* Times are specified using 24:00 time. For example, 3pm is specified as ```15:00```. \n* Here is an example: <code><time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time></code>.\n* If a business is open 7 days a week, then it can be specified as <code><time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time></code>.
*
* @property openingHours
* @type Text
*/
prototype.openingHours = null;
/**
* Schema.org/paymentAccepted
* Cash, credit card, etc.
*
* @property paymentAccepted
* @type Text
*/
prototype.paymentAccepted = null;
/**
* Schema.org/priceRange
* The price range of the business, for example ```$$$```.
*
* @property priceRange
* @type Text
*/
prototype.priceRange = null;
/**
* Schema.org/currenciesAccepted
* The currency accepted (in [ISO 4217 currency format](http://en.wikipedia.org/wiki/ISO_4217)).
*
* @property currenciesAccepted
* @type Text
*/
prototype.currenciesAccepted = null;
/**
* Schema.org/branchOf
* The larger organization that this local business is a branch of, if any. Not to be confused with (anatomical)[[branch]].
*
* @property branchOf
* @type Organization
*/
prototype.branchOf = null;
}, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SportsOrganization
* Represents the collection of all sports organizations, including sports teams, governing bodies, and sports associations.
*
* @author schema.org
* @class SportsOrganization
* @module org.schema
* @extends Organization
*/
var SportsOrganization = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "SportsOrganization";
};
SportsOrganization = stjs.extend(SportsOrganization, Organization, [], function(constructor, prototype) {
/**
* Schema.org/sport
* A type of sport (e.g. Baseball).
*
* @property sport
* @type schema, URL | schema,Text
*/
prototype.sport = null;
}, {sport: "Object", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/NGO
* Organization: Non-governmental Organization.
*
* @author schema.org
* @class NGO
* @module org.schema
* @extends Organization
*/
var NGO = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Organization.call(this);
this.context = "http://schema.org/";
this.type = "NGO";
};
NGO = stjs.extend(NGO, Organization, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ProductModel
* A datasheet or vendor specification of a product (in the sense of a prototypical description).
*
* @author schema.org
* @class ProductModel
* @module org.schema
* @extends Product
*/
var ProductModel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Product.call(this);
this.context = "http://schema.org/";
this.type = "ProductModel";
};
ProductModel = stjs.extend(ProductModel, Product, [], function(constructor, prototype) {
/**
* Schema.org/successorOf
* A pointer from a newer variant of a product to its previous, often discontinued predecessor.
*
* @property successorOf
* @type ProductModel
*/
prototype.successorOf = null;
/**
* Schema.org/isVariantOf
* A pointer to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive.
*
* @property isVariantOf
* @type ProductModel
*/
prototype.isVariantOf = null;
/**
* Schema.org/predecessorOf
* A pointer from a previous, often discontinued variant of the product to its newer variant.
*
* @property predecessorOf
* @type ProductModel
*/
prototype.predecessorOf = null;
}, {successorOf: "ProductModel", isVariantOf: "ProductModel", predecessorOf: "ProductModel", reviews: "Review", audience: "Audience", isAccessoryOrSparePartFor: "Product", height: "Object", additionalProperty: "PropertyValue", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", depth: "Object", model: "Object", material: "Object", isConsumableFor: "Product", weight: "QuantitativeValue", isSimilarTo: "Object", width: "Object", itemCondition: "OfferItemCondition", aggregateRating: "AggregateRating", manufacturer: "Organization", logo: "Object", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SomeProducts
* A placeholder for multiple similar products of the same kind.
*
* @author schema.org
* @class SomeProducts
* @module org.schema
* @extends Product
*/
var SomeProducts = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Product.call(this);
this.context = "http://schema.org/";
this.type = "SomeProducts";
};
SomeProducts = stjs.extend(SomeProducts, Product, [], function(constructor, prototype) {
/**
* Schema.org/inventoryLevel
* The current approximate inventory level for the item or items.
*
* @property inventoryLevel
* @type QuantitativeValue
*/
prototype.inventoryLevel = null;
}, {inventoryLevel: "QuantitativeValue", reviews: "Review", audience: "Audience", isAccessoryOrSparePartFor: "Product", height: "Object", additionalProperty: "PropertyValue", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", depth: "Object", model: "Object", material: "Object", isConsumableFor: "Product", weight: "QuantitativeValue", isSimilarTo: "Object", width: "Object", itemCondition: "OfferItemCondition", aggregateRating: "AggregateRating", manufacturer: "Organization", logo: "Object", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Vehicle
* A vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space.
*
* @author schema.org
* @class Vehicle
* @module org.schema
* @extends Product
*/
var Vehicle = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Product.call(this);
this.context = "http://schema.org/";
this.type = "Vehicle";
};
Vehicle = stjs.extend(Vehicle, Product, [], function(constructor, prototype) {
/**
* Schema.org/driveWheelConfiguration
* The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain.
*
* @property driveWheelConfiguration
* @type schema, Text | schema,DriveWheelConfigurationValue
*/
prototype.driveWheelConfiguration = null;
/**
* Schema.org/vehicleInteriorColor
* The color or color combination of the interior of the vehicle.
*
* @property vehicleInteriorColor
* @type Text
*/
prototype.vehicleInteriorColor = null;
/**
* Schema.org/numberOfDoors
* The number of doors.\n\nTypical unit code(s): C62
*
* @property numberOfDoors
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfDoors = null;
/**
* Schema.org/vehicleInteriorType
* The type or material of the interior of the vehicle (e.g. synthetic fabric, leather, wood, etc.). While most interior types are characterized by the material used, an interior type can also be based on vehicle usage or target audience.
*
* @property vehicleInteriorType
* @type Text
*/
prototype.vehicleInteriorType = null;
/**
* Schema.org/vehicleTransmission
* The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars).
*
* @property vehicleTransmission
* @type schema, URL | schema,Text | schema,QualitativeValue
*/
prototype.vehicleTransmission = null;
/**
* Schema.org/vehicleSeatingCapacity
* The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.\n\nTypical unit code(s): C62 for persons.
*
* @property vehicleSeatingCapacity
* @type schema, Number | schema,QuantitativeValue
*/
prototype.vehicleSeatingCapacity = null;
/**
* Schema.org/cargoVolume
* The available volume for cargo or luggage. For automobiles, this is usually the trunk volume.\n\nTypical unit code(s): LTR for liters, FTQ for cubic foot/feet\n\nNote: You can use [[minValue]] and [[maxValue]] to indicate ranges.
*
* @property cargoVolume
* @type QuantitativeValue
*/
prototype.cargoVolume = null;
/**
* Schema.org/knownVehicleDamages
* A textual description of known damages, both repaired and unrepaired.
*
* @property knownVehicleDamages
* @type Text
*/
prototype.knownVehicleDamages = null;
/**
* Schema.org/vehicleEngine
* Information about the engine or engines of the vehicle.
*
* @property vehicleEngine
* @type EngineSpecification
*/
prototype.vehicleEngine = null;
/**
* Schema.org/purchaseDate
* The date the item e.g. vehicle was purchased by the current owner.
*
* @property purchaseDate
* @type Date
*/
prototype.purchaseDate = null;
/**
* Schema.org/vehicleConfiguration
* A short text indicating the configuration of the vehicle, e.g. '5dr hatchback ST 2.5 MT 225 hp' or 'limited edition'.
*
* @property vehicleConfiguration
* @type Text
*/
prototype.vehicleConfiguration = null;
/**
* Schema.org/vehicleIdentificationNumber
* The Vehicle Identification Number (VIN) is a unique serial number used by the automotive industry to identify individual motor vehicles.
*
* @property vehicleIdentificationNumber
* @type Text
*/
prototype.vehicleIdentificationNumber = null;
/**
* Schema.org/productionDate
* The date of production of the item, e.g. vehicle.
*
* @property productionDate
* @type Date
*/
prototype.productionDate = null;
/**
* Schema.org/vehicleModelDate
* The release date of a vehicle model (often used to differentiate versions of the same make and model).
*
* @property vehicleModelDate
* @type Date
*/
prototype.vehicleModelDate = null;
/**
* Schema.org/fuelConsumption
* The amount of fuel consumed for traveling a particular distance or temporal duration with the given vehicle (e.g. liters per 100 km).\n\n* Note 1: There are unfortunately no standard unit codes for liters per 100 km. Use [[unitText]] to indicate the unit of measurement, e.g. L/100 km.\n* Note 2: There are two ways of indicating the fuel consumption, [[fuelConsumption]] (e.g. 8 liters per 100 km) and [[fuelEfficiency]] (e.g. 30 miles per gallon). They are reciprocal.\n* Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use [[valueReference]] to link the value for the fuel consumption to another value.
*
* @property fuelConsumption
* @type QuantitativeValue
*/
prototype.fuelConsumption = null;
/**
* Schema.org/numberOfAirbags
* The number or type of airbags in the vehicle.
*
* @property numberOfAirbags
* @type schema, Number | schema,Text
*/
prototype.numberOfAirbags = null;
/**
* Schema.org/numberOfPreviousOwners
* The number of owners of the vehicle, including the current one.\n\nTypical unit code(s): C62
*
* @property numberOfPreviousOwners
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfPreviousOwners = null;
/**
* Schema.org/numberOfForwardGears
* The total number of forward gears available for the transmission system of the vehicle.\n\nTypical unit code(s): C62
*
* @property numberOfForwardGears
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfForwardGears = null;
/**
* Schema.org/dateVehicleFirstRegistered
* The date of the first registration of the vehicle with the respective public authorities.
*
* @property dateVehicleFirstRegistered
* @type Date
*/
prototype.dateVehicleFirstRegistered = null;
/**
* Schema.org/mileageFromOdometer
* The total distance travelled by the particular vehicle since its initial production, as read from its odometer.\n\nTypical unit code(s): KMT for kilometers, SMI for statute miles
*
* @property mileageFromOdometer
* @type QuantitativeValue
*/
prototype.mileageFromOdometer = null;
/**
* Schema.org/fuelEfficiency
* The distance traveled per unit of fuel used; most commonly miles per gallon (mpg) or kilometers per liter (km/L).\n\n* Note 1: There are unfortunately no standard unit codes for miles per gallon or kilometers per liter. Use [[unitText]] to indicate the unit of measurement, e.g. mpg or km/L.\n* Note 2: There are two ways of indicating the fuel consumption, [[fuelConsumption]] (e.g. 8 liters per 100 km) and [[fuelEfficiency]] (e.g. 30 miles per gallon). They are reciprocal.\n* Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use [[valueReference]] to link the value for the fuel economy to another value.
*
* @property fuelEfficiency
* @type QuantitativeValue
*/
prototype.fuelEfficiency = null;
/**
* Schema.org/fuelType
* The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle.
*
* @property fuelType
* @type schema, URL | schema,Text | schema,QualitativeValue
*/
prototype.fuelType = null;
/**
* Schema.org/steeringPosition
* The position of the steering wheel or similar device (mostly for cars).
*
* @property steeringPosition
* @type SteeringPositionValue
*/
prototype.steeringPosition = null;
/**
* Schema.org/numberOfAxles
* The number of axles.\n\nTypical unit code(s): C62
*
* @property numberOfAxles
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfAxles = null;
/**
* Schema.org/vehicleSpecialUsage
* Indicates whether the vehicle has been used for special purposes, like commercial rental, driving school, or as a taxi. The legislation in many countries requires this information to be revealed when offering a car for sale.
*
* @property vehicleSpecialUsage
* @type Text
*/
prototype.vehicleSpecialUsage = null;
}, {driveWheelConfiguration: "Object", numberOfDoors: "Object", vehicleTransmission: "Object", vehicleSeatingCapacity: "Object", cargoVolume: "QuantitativeValue", vehicleEngine: "EngineSpecification", fuelConsumption: "QuantitativeValue", numberOfAirbags: "Object", numberOfPreviousOwners: "Object", numberOfForwardGears: "Object", mileageFromOdometer: "QuantitativeValue", fuelEfficiency: "QuantitativeValue", fuelType: "Object", steeringPosition: "SteeringPositionValue", numberOfAxles: "Object", reviews: "Review", audience: "Audience", isAccessoryOrSparePartFor: "Product", height: "Object", additionalProperty: "PropertyValue", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", depth: "Object", model: "Object", material: "Object", isConsumableFor: "Product", weight: "QuantitativeValue", isSimilarTo: "Object", width: "Object", itemCondition: "OfferItemCondition", aggregateRating: "AggregateRating", manufacturer: "Organization", logo: "Object", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/IndividualProduct
* A single, identifiable product instance (e.g. a laptop with a particular serial number).
*
* @author schema.org
* @class IndividualProduct
* @module org.schema
* @extends Product
*/
var IndividualProduct = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Product.call(this);
this.context = "http://schema.org/";
this.type = "IndividualProduct";
};
IndividualProduct = stjs.extend(IndividualProduct, Product, [], function(constructor, prototype) {
/**
* Schema.org/serialNumber
* The serial number or any alphanumeric identifier of a particular product. When attached to an offer, it is a shortcut for the serial number of the product included in the offer.
*
* @property serialNumber
* @type Text
*/
prototype.serialNumber = null;
}, {reviews: "Review", audience: "Audience", isAccessoryOrSparePartFor: "Product", height: "Object", additionalProperty: "PropertyValue", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", depth: "Object", model: "Object", material: "Object", isConsumableFor: "Product", weight: "QuantitativeValue", isSimilarTo: "Object", width: "Object", itemCondition: "OfferItemCondition", aggregateRating: "AggregateRating", manufacturer: "Organization", logo: "Object", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MoveAction
* The act of an agent relocating to a place.\n\nRelated actions:\n\n* [[TransferAction]]: Unlike TransferAction, the subject of the move is a living Person or Organization rather than an inanimate object.
*
* @author schema.org
* @class MoveAction
* @module org.schema
* @extends Action
*/
var MoveAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "MoveAction";
};
MoveAction = stjs.extend(MoveAction, Action, [], function(constructor, prototype) {
/**
* Schema.org/fromLocation
* A sub property of location. The original location of the object or the agent before the action.
*
* @property fromLocation
* @type Place
*/
prototype.fromLocation = null;
/**
* Schema.org/toLocation
* A sub property of location. The final location of the object or the agent after the action.
*
* @property toLocation
* @type Place
*/
prototype.toLocation = null;
}, {fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ConsumeAction
* The act of ingesting information/resources/food.
*
* @author schema.org
* @class ConsumeAction
* @module org.schema
* @extends Action
*/
var ConsumeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "ConsumeAction";
};
ConsumeAction = stjs.extend(ConsumeAction, Action, [], function(constructor, prototype) {
/**
* Schema.org/expectsAcceptanceOf
* An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it.
*
* @property expectsAcceptanceOf
* @type Offer
*/
prototype.expectsAcceptanceOf = null;
}, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UpdateAction
* The act of managing by changing/editing the state of the object.
*
* @author schema.org
* @class UpdateAction
* @module org.schema
* @extends Action
*/
var UpdateAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "UpdateAction";
};
UpdateAction = stjs.extend(UpdateAction, Action, [], function(constructor, prototype) {
/**
* Schema.org/targetCollection
* A sub property of object. The collection target of the action.
*
* @property targetCollection
* @type Thing
*/
prototype.targetCollection = null;
/**
* Schema.org/collection
* A sub property of object. The collection target of the action.
*
* @property collection
* @type Thing
*/
prototype.collection = null;
}, {targetCollection: "Thing", collection: "Thing", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TransferAction
* The act of transferring/moving (abstract or concrete) animate or inanimate objects from one place to another.
*
* @author schema.org
* @class TransferAction
* @module org.schema
* @extends Action
*/
var TransferAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "TransferAction";
};
TransferAction = stjs.extend(TransferAction, Action, [], function(constructor, prototype) {
/**
* Schema.org/fromLocation
* A sub property of location. The original location of the object or the agent before the action.
*
* @property fromLocation
* @type Place
*/
prototype.fromLocation = null;
/**
* Schema.org/toLocation
* A sub property of location. The final location of the object or the agent after the action.
*
* @property toLocation
* @type Place
*/
prototype.toLocation = null;
}, {fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FindAction
* The act of finding an object.\n\nRelated actions:\n\n* [[SearchAction]]: FindAction is generally lead by a SearchAction, but not necessarily.
*
* @author schema.org
* @class FindAction
* @module org.schema
* @extends Action
*/
var FindAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "FindAction";
};
FindAction = stjs.extend(FindAction, Action, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OrganizeAction
* The act of manipulating/administering/supervising/controlling one or more objects.
*
* @author schema.org
* @class OrganizeAction
* @module org.schema
* @extends Action
*/
var OrganizeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "OrganizeAction";
};
OrganizeAction = stjs.extend(OrganizeAction, Action, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AchieveAction
* The act of accomplishing something via previous efforts. It is an instantaneous action rather than an ongoing process.
*
* @author schema.org
* @class AchieveAction
* @module org.schema
* @extends Action
*/
var AchieveAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "AchieveAction";
};
AchieveAction = stjs.extend(AchieveAction, Action, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AssessAction
* The act of forming one's opinion, reaction or sentiment.
*
* @author schema.org
* @class AssessAction
* @module org.schema
* @extends Action
*/
var AssessAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "AssessAction";
};
AssessAction = stjs.extend(AssessAction, Action, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InteractAction
* The act of interacting with another person or organization.
*
* @author schema.org
* @class InteractAction
* @module org.schema
* @extends Action
*/
var InteractAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "InteractAction";
};
InteractAction = stjs.extend(InteractAction, Action, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PlayAction
* The act of playing/exercising/training/performing for enjoyment, leisure, recreation, Competition or exercise.\n\nRelated actions:\n\n* [[ListenAction]]: Unlike ListenAction (which is under ConsumeAction), PlayAction refers to performing for an audience or at an event, rather than consuming music.\n* [[WatchAction]]: Unlike WatchAction (which is under ConsumeAction), PlayAction refers to showing/displaying for an audience or at an event, rather than consuming visual content.
*
* @author schema.org
* @class PlayAction
* @module org.schema
* @extends Action
*/
var PlayAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "PlayAction";
};
PlayAction = stjs.extend(PlayAction, Action, [], function(constructor, prototype) {
/**
* Schema.org/audience
* An intended audience, i.e. a group for whom something was created.
*
* @property audience
* @type Audience
*/
prototype.audience = null;
/**
* Schema.org/event
* Upcoming or past event associated with this place, organization, or action.
*
* @property event
* @type Event
*/
prototype.event = null;
}, {audience: "Audience", event: "Event", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TradeAction
* The act of participating in an exchange of goods and services for monetary compensation. An agent trades an object, product or service with a participant in exchange for a one time or periodic payment.
*
* @author schema.org
* @class TradeAction
* @module org.schema
* @extends Action
*/
var TradeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "TradeAction";
};
TradeAction = stjs.extend(TradeAction, Action, [], function(constructor, prototype) {
/**
* Schema.org/priceSpecification
* One or more detailed price specifications, indicating the unit price and delivery or payment charges.
*
* @property priceSpecification
* @type PriceSpecification
*/
prototype.priceSpecification = null;
/**
* Schema.org/price
* The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.\n\nUsage guidelines:\n\n* Use the [[priceCurrency]] property (with [ISO 4217 codes](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) e.g. "USD") instead of
* including [ambiguous symbols](http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign) such as '$' in the value.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.\n* Note that both [RDFa](http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute) and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
*
* @property price
* @type schema, Number | schema,Text
*/
prototype.price = null;
}, {priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SearchAction
* The act of searching for an object.\n\nRelated actions:\n\n* [[FindAction]]: SearchAction generally leads to a FindAction, but not necessarily.
*
* @author schema.org
* @class SearchAction
* @module org.schema
* @extends Action
*/
var SearchAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "SearchAction";
};
SearchAction = stjs.extend(SearchAction, Action, [], function(constructor, prototype) {
/**
* Schema.org/query
* A sub property of instrument. The query used on this action.
*
* @property query
* @type Text
*/
prototype.query = null;
}, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ControlAction
* An agent controls a device or application.
*
* @author schema.org
* @class ControlAction
* @module org.schema
* @extends Action
*/
var ControlAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "ControlAction";
};
ControlAction = stjs.extend(ControlAction, Action, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CreateAction
* The act of deliberately creating/producing/generating/building a result out of the agent.
*
* @author schema.org
* @class CreateAction
* @module org.schema
* @extends Action
*/
var CreateAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.org/";
this.type = "CreateAction";
};
CreateAction = stjs.extend(CreateAction, Action, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SportsEvent
* Event type: Sports event.
*
* @author schema.org
* @class SportsEvent
* @module org.schema
* @extends Event
*/
var SportsEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "SportsEvent";
};
SportsEvent = stjs.extend(SportsEvent, Event, [], function(constructor, prototype) {
/**
* Schema.org/awayTeam
* The away team in a sports event.
*
* @property awayTeam
* @type schema, Person | schema,SportsTeam
*/
prototype.awayTeam = null;
/**
* Schema.org/competitor
* A competitor in a sports event.
*
* @property competitor
* @type schema, Person | schema,SportsTeam
*/
prototype.competitor = null;
/**
* Schema.org/homeTeam
* The home team in a sports event.
*
* @property homeTeam
* @type schema, Person | schema,SportsTeam
*/
prototype.homeTeam = null;
}, {awayTeam: "Object", competitor: "Object", homeTeam: "Object", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SaleEvent
* Event type: Sales event.
*
* @author schema.org
* @class SaleEvent
* @module org.schema
* @extends Event
*/
var SaleEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "SaleEvent";
};
SaleEvent = stjs.extend(SaleEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FoodEvent
* Event type: Food event.
*
* @author schema.org
* @class FoodEvent
* @module org.schema
* @extends Event
*/
var FoodEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "FoodEvent";
};
FoodEvent = stjs.extend(FoodEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ExhibitionEvent
* Event type: Exhibition event, e.g. at a museum, library, archive, tradeshow, ...
*
* @author schema.org
* @class ExhibitionEvent
* @module org.schema
* @extends Event
*/
var ExhibitionEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "ExhibitionEvent";
};
ExhibitionEvent = stjs.extend(ExhibitionEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DeliveryEvent
* An event involving the delivery of an item.
*
* @author schema.org
* @class DeliveryEvent
* @module org.schema
* @extends Event
*/
var DeliveryEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "DeliveryEvent";
};
DeliveryEvent = stjs.extend(DeliveryEvent, Event, [], function(constructor, prototype) {
/**
* Schema.org/accessCode
* Password, PIN, or access code needed for delivery (e.g. from a locker).
*
* @property accessCode
* @type Text
*/
prototype.accessCode = null;
/**
* Schema.org/availableFrom
* When the item is available for pickup from the store, locker, etc.
*
* @property availableFrom
* @type DateTime
*/
prototype.availableFrom = null;
/**
* Schema.org/availableThrough
* After this date, the item will no longer be available for pickup.
*
* @property availableThrough
* @type DateTime
*/
prototype.availableThrough = null;
/**
* Schema.org/hasDeliveryMethod
* Method used for delivery or shipping.
*
* @property hasDeliveryMethod
* @type DeliveryMethod
*/
prototype.hasDeliveryMethod = null;
}, {hasDeliveryMethod: "DeliveryMethod", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SocialEvent
* Event type: Social event.
*
* @author schema.org
* @class SocialEvent
* @module org.schema
* @extends Event
*/
var SocialEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "SocialEvent";
};
SocialEvent = stjs.extend(SocialEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Festival
* Event type: Festival.
*
* @author schema.org
* @class Festival
* @module org.schema
* @extends Event
*/
var Festival = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "Festival";
};
Festival = stjs.extend(Festival, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicEvent
* Event type: Music event.
*
* @author schema.org
* @class MusicEvent
* @module org.schema
* @extends Event
*/
var MusicEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "MusicEvent";
};
MusicEvent = stjs.extend(MusicEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TheaterEvent
* Event type: Theater performance.
*
* @author schema.org
* @class TheaterEvent
* @module org.schema
* @extends Event
*/
var TheaterEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "TheaterEvent";
};
TheaterEvent = stjs.extend(TheaterEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ChildrensEvent
* Event type: Children's event.
*
* @author schema.org
* @class ChildrensEvent
* @module org.schema
* @extends Event
*/
var ChildrensEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "ChildrensEvent";
};
ChildrensEvent = stjs.extend(ChildrensEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DanceEvent
* Event type: A social dance.
*
* @author schema.org
* @class DanceEvent
* @module org.schema
* @extends Event
*/
var DanceEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "DanceEvent";
};
DanceEvent = stjs.extend(DanceEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LiteraryEvent
* Event type: Literary event.
*
* @author schema.org
* @class LiteraryEvent
* @module org.schema
* @extends Event
*/
var LiteraryEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "LiteraryEvent";
};
LiteraryEvent = stjs.extend(LiteraryEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserInteraction
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserInteraction
* @module org.schema
* @extends Event
*/
var UserInteraction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "UserInteraction";
};
UserInteraction = stjs.extend(UserInteraction, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CourseInstance
* An instance of a [[Course]] which is distinct from other instances because it is offered at a different time or location or through different media or modes of study or to a specific section of students.
*
* @author schema.org
* @class CourseInstance
* @module org.schema
* @extends Event
*/
var CourseInstance = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "CourseInstance";
};
CourseInstance = stjs.extend(CourseInstance, Event, [], function(constructor, prototype) {
/**
* Schema.org/courseMode
* The medium or means of delivery of the course instance or the mode of study, either as a text label (e.g. "online", "onsite" or "blended"; "synchronous" or "asynchronous"; "full-time" or "part-time") or as a URL reference to a term from a controlled vocabulary (e.g. https://ceds.ed.gov/element/001311#Asynchronous ).
*
* @property courseMode
* @type schema, URL | schema,Text
*/
prototype.courseMode = null;
/**
* Schema.org/instructor
* A person assigned to instruct or provide instructional assistance for the [[CourseInstance]].
*
* @property instructor
* @type Person
*/
prototype.instructor = null;
}, {courseMode: "Object", instructor: "Person", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PublicationEvent
* A PublicationEvent corresponds indifferently to the event of publication for a CreativeWork of any type e.g. a broadcast event, an on-demand event, a book/journal publication via a variety of delivery media.
*
* @author schema.org
* @class PublicationEvent
* @module org.schema
* @extends Event
*/
var PublicationEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "PublicationEvent";
};
PublicationEvent = stjs.extend(PublicationEvent, Event, [], function(constructor, prototype) {
/**
* Schema.org/isAccessibleForFree
* A flag to signal that the publication is accessible for free.
*
* @property isAccessibleForFree
* @type Boolean
*/
prototype.isAccessibleForFree = null;
/**
* Schema.org/publishedOn
* A broadcast service associated with the publication event.
*
* @property publishedOn
* @type BroadcastService
*/
prototype.publishedOn = null;
/**
* Schema.org/free
* A flag to signal that the publication or event is accessible for free.
*
* @property free
* @type Boolean
*/
prototype.free = null;
}, {publishedOn: "BroadcastService", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusinessEvent
* Event type: Business event.
*
* @author schema.org
* @class BusinessEvent
* @module org.schema
* @extends Event
*/
var BusinessEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "BusinessEvent";
};
BusinessEvent = stjs.extend(BusinessEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EducationEvent
* Event type: Education event.
*
* @author schema.org
* @class EducationEvent
* @module org.schema
* @extends Event
*/
var EducationEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "EducationEvent";
};
EducationEvent = stjs.extend(EducationEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ScreeningEvent
* A screening of a movie or other video.
*
* @author schema.org
* @class ScreeningEvent
* @module org.schema
* @extends Event
*/
var ScreeningEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "ScreeningEvent";
};
ScreeningEvent = stjs.extend(ScreeningEvent, Event, [], function(constructor, prototype) {
/**
* Schema.org/subtitleLanguage
* Languages in which subtitles/captions are available, in [IETF BCP 47 standard format](http://tools.ietf.org/html/bcp47).
*
* @property subtitleLanguage
* @type schema, Text | schema,Language
*/
prototype.subtitleLanguage = null;
/**
* Schema.org/videoFormat
* The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD, etc.).
*
* @property videoFormat
* @type Text
*/
prototype.videoFormat = null;
/**
* Schema.org/workPresented
* The movie presented during this event.
*
* @property workPresented
* @type Movie
*/
prototype.workPresented = null;
}, {subtitleLanguage: "Object", workPresented: "Movie", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VisualArtsEvent
* Event type: Visual arts event.
*
* @author schema.org
* @class VisualArtsEvent
* @module org.schema
* @extends Event
*/
var VisualArtsEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "VisualArtsEvent";
};
VisualArtsEvent = stjs.extend(VisualArtsEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ComedyEvent
* Event type: Comedy event.
*
* @author schema.org
* @class ComedyEvent
* @module org.schema
* @extends Event
*/
var ComedyEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Event.call(this);
this.context = "http://schema.org/";
this.type = "ComedyEvent";
};
ComedyEvent = stjs.extend(ComedyEvent, Event, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GatedResidenceCommunity
* Residence type: Gated community.
*
* @author schema.org
* @class GatedResidenceCommunity
* @module org.schema
* @extends Residence
*/
var GatedResidenceCommunity = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Residence.call(this);
this.context = "http://schema.org/";
this.type = "GatedResidenceCommunity";
};
GatedResidenceCommunity = stjs.extend(GatedResidenceCommunity, Residence, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ApartmentComplex
* Residence type: Apartment complex.
*
* @author schema.org
* @class ApartmentComplex
* @module org.schema
* @extends Residence
*/
var ApartmentComplex = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Residence.call(this);
this.context = "http://schema.org/";
this.type = "ApartmentComplex";
};
ApartmentComplex = stjs.extend(ApartmentComplex, Residence, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CampingPitch
* A camping pitch is an individual place for overnight stay in the outdoors, typically being part of a larger camping site.
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class CampingPitch
* @module org.schema
* @extends Accommodation
*/
var CampingPitch = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Accommodation.call(this);
this.context = "http://schema.org/";
this.type = "CampingPitch";
};
CampingPitch = stjs.extend(CampingPitch, Accommodation, [], null, {amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Suite
* A suite in a hotel or other public accommodation, denotes a class of luxury accommodations, the key feature of which is multiple rooms (Source: Wikipedia, the free encyclopedia, see <a href="http://en.wikipedia.org/wiki/Suite_(hotel)">http://en.wikipedia.org/wiki/Suite_(hotel)</a>).
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Suite
* @module org.schema
* @extends Accommodation
*/
var Suite = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Accommodation.call(this);
this.context = "http://schema.org/";
this.type = "Suite";
};
Suite = stjs.extend(Suite, Accommodation, [], function(constructor, prototype) {
/**
* Schema.org/bed
* The type of bed or beds included in the accommodation. For the single case of just one bed of a certain type, you use bed directly with a text.
* If you want to indicate the quantity of a certain kind of bed, use an instance of BedDetails. For more detailed information, use the amenityFeature property.
*
* @property bed
* @type schema, Text | schema,BedDetails
*/
prototype.bed = null;
/**
* Schema.org/numberOfRooms
* The number of rooms (excluding bathrooms and closets) of the acccommodation or lodging business.
* Typical unit code(s): ROM for room or C62 for no unit. The type of room can be put in the unitText property of the QuantitativeValue.
*
* @property numberOfRooms
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfRooms = null;
/**
* Schema.org/occupancy
* The allowed total occupancy for the accommodation in persons (including infants etc). For individual accommodations, this is not necessarily the legal maximum but defines the permitted usage as per the contractual agreement (e.g. a double room used by a single person).
* Typical unit code(s): C62 for person
*
* @property occupancy
* @type QuantitativeValue
*/
prototype.occupancy = null;
}, {bed: "Object", numberOfRooms: "Object", occupancy: "QuantitativeValue", amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/House
* A house is a building or structure that has the ability to be occupied for habitation by humans or other creatures (Source: Wikipedia, the free encyclopedia, see <a href="http://en.wikipedia.org/wiki/House">http://en.wikipedia.org/wiki/House</a>).
*
* @author schema.org
* @class House
* @module org.schema
* @extends Accommodation
*/
var House = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Accommodation.call(this);
this.context = "http://schema.org/";
this.type = "House";
};
House = stjs.extend(House, Accommodation, [], function(constructor, prototype) {
/**
* Schema.org/numberOfRooms
* The number of rooms (excluding bathrooms and closets) of the acccommodation or lodging business.
* Typical unit code(s): ROM for room or C62 for no unit. The type of room can be put in the unitText property of the QuantitativeValue.
*
* @property numberOfRooms
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfRooms = null;
}, {numberOfRooms: "Object", amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Room
* A room is a distinguishable space within a structure, usually separated from other spaces by interior walls. (Source: Wikipedia, the free encyclopedia, see <a href="http://en.wikipedia.org/wiki/Room">http://en.wikipedia.org/wiki/Room</a>).
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Room
* @module org.schema
* @extends Accommodation
*/
var Room = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Accommodation.call(this);
this.context = "http://schema.org/";
this.type = "Room";
};
Room = stjs.extend(Room, Accommodation, [], null, {amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Apartment
* An apartment (in American English) or flat (in British English) is a self-contained housing unit (a type of residential real estate) that occupies only part of a building (Source: Wikipedia, the free encyclopedia, see <a href="http://en.wikipedia.org/wiki/Apartment">http://en.wikipedia.org/wiki/Apartment</a>).
*
* @author schema.org
* @class Apartment
* @module org.schema
* @extends Accommodation
*/
var Apartment = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Accommodation.call(this);
this.context = "http://schema.org/";
this.type = "Apartment";
};
Apartment = stjs.extend(Apartment, Accommodation, [], function(constructor, prototype) {
/**
* Schema.org/numberOfRooms
* The number of rooms (excluding bathrooms and closets) of the acccommodation or lodging business.
* Typical unit code(s): ROM for room or C62 for no unit. The type of room can be put in the unitText property of the QuantitativeValue.
*
* @property numberOfRooms
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfRooms = null;
/**
* Schema.org/occupancy
* The allowed total occupancy for the accommodation in persons (including infants etc). For individual accommodations, this is not necessarily the legal maximum but defines the permitted usage as per the contractual agreement (e.g. a double room used by a single person).
* Typical unit code(s): C62 for person
*
* @property occupancy
* @type QuantitativeValue
*/
prototype.occupancy = null;
}, {numberOfRooms: "Object", occupancy: "QuantitativeValue", amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PoliceStation
* A police station.
*
* @author schema.org
* @class PoliceStation
* @module org.schema
* @extends CivicStructure
*/
var PoliceStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "PoliceStation";
};
PoliceStation = stjs.extend(PoliceStation, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Bridge
* A bridge.
*
* @author schema.org
* @class Bridge
* @module org.schema
* @extends CivicStructure
*/
var Bridge = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Bridge";
};
Bridge = stjs.extend(Bridge, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SubwayStation
* A subway station.
*
* @author schema.org
* @class SubwayStation
* @module org.schema
* @extends CivicStructure
*/
var SubwayStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "SubwayStation";
};
SubwayStation = stjs.extend(SubwayStation, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusStation
* A bus station.
*
* @author schema.org
* @class BusStation
* @module org.schema
* @extends CivicStructure
*/
var BusStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "BusStation";
};
BusStation = stjs.extend(BusStation, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GovernmentBuilding
* A government building.
*
* @author schema.org
* @class GovernmentBuilding
* @module org.schema
* @extends CivicStructure
*/
var GovernmentBuilding = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "GovernmentBuilding";
};
GovernmentBuilding = stjs.extend(GovernmentBuilding, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusStop
* A bus stop.
*
* @author schema.org
* @class BusStop
* @module org.schema
* @extends CivicStructure
*/
var BusStop = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "BusStop";
};
BusStop = stjs.extend(BusStop, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Beach
* Beach.
*
* @author schema.org
* @class Beach
* @module org.schema
* @extends CivicStructure
*/
var Beach = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Beach";
};
Beach = stjs.extend(Beach, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TaxiStand
* A taxi stand.
*
* @author schema.org
* @class TaxiStand
* @module org.schema
* @extends CivicStructure
*/
var TaxiStand = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "TaxiStand";
};
TaxiStand = stjs.extend(TaxiStand, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Campground
* A camping site, campsite, or campground is a place used for overnight stay in the outdoors. In British English a campsite is an area, usually divided into a number of pitches, where people can camp overnight using tents or camper vans or caravans; this British English use of the word is synonymous with the American English expression campground. In American English the term campsite generally means an area where an individual, family, group, or military unit can pitch a tent or parks a camper; a campground may contain many campsites (Source: Wikipedia, the free encyclopedia, see <a href="http://en.wikipedia.org/wiki/Campsite">http://en.wikipedia.org/wiki/Campsite</a>).
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Campground
* @module org.schema
* @extends CivicStructure
*/
var Campground = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Campground";
};
Campground = stjs.extend(Campground, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Park
* A park.
*
* @author schema.org
* @class Park
* @module org.schema
* @extends CivicStructure
*/
var Park = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Park";
};
Park = stjs.extend(Park, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Cemetery
* A graveyard.
*
* @author schema.org
* @class Cemetery
* @module org.schema
* @extends CivicStructure
*/
var Cemetery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Cemetery";
};
Cemetery = stjs.extend(Cemetery, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TrainStation
* A train station.
*
* @author schema.org
* @class TrainStation
* @module org.schema
* @extends CivicStructure
*/
var TrainStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "TrainStation";
};
TrainStation = stjs.extend(TrainStation, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Hospital
* A hospital.
*
* @author schema.org
* @class Hospital
* @module org.schema
* @extends CivicStructure
*/
var Hospital = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Hospital";
};
Hospital = stjs.extend(Hospital, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PerformingArtsTheater
* A theater or other performing art center.
*
* @author schema.org
* @class PerformingArtsTheater
* @module org.schema
* @extends CivicStructure
*/
var PerformingArtsTheater = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "PerformingArtsTheater";
};
PerformingArtsTheater = stjs.extend(PerformingArtsTheater, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Airport
* An airport.
*
* @author schema.org
* @class Airport
* @module org.schema
* @extends CivicStructure
*/
var Airport = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Airport";
};
Airport = stjs.extend(Airport, CivicStructure, [], function(constructor, prototype) {
/**
* Schema.org/iataCode
* IATA identifier for an airline or airport.
*
* @property iataCode
* @type Text
*/
prototype.iataCode = null;
/**
* Schema.org/icaoCode
* ICAO identifier for an airport.
*
* @property icaoCode
* @type Text
*/
prototype.icaoCode = null;
}, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FireStation
* A fire station. With firemen.
*
* @author schema.org
* @class FireStation
* @module org.schema
* @extends CivicStructure
*/
var FireStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "FireStation";
};
FireStation = stjs.extend(FireStation, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EventVenue
* An event venue.
*
* @author schema.org
* @class EventVenue
* @module org.schema
* @extends CivicStructure
*/
var EventVenue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "EventVenue";
};
EventVenue = stjs.extend(EventVenue, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PlaceOfWorship
* Place of worship, such as a church, synagogue, or mosque.
*
* @author schema.org
* @class PlaceOfWorship
* @module org.schema
* @extends CivicStructure
*/
var PlaceOfWorship = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "PlaceOfWorship";
};
PlaceOfWorship = stjs.extend(PlaceOfWorship, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicVenue
* A music venue.
*
* @author schema.org
* @class MusicVenue
* @module org.schema
* @extends CivicStructure
*/
var MusicVenue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "MusicVenue";
};
MusicVenue = stjs.extend(MusicVenue, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Museum
* A museum.
*
* @author schema.org
* @class Museum
* @module org.schema
* @extends CivicStructure
*/
var Museum = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Museum";
};
Museum = stjs.extend(Museum, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Crematorium
* A crematorium.
*
* @author schema.org
* @class Crematorium
* @module org.schema
* @extends CivicStructure
*/
var Crematorium = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Crematorium";
};
Crematorium = stjs.extend(Crematorium, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Playground
* A playground.
*
* @author schema.org
* @class Playground
* @module org.schema
* @extends CivicStructure
*/
var Playground = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Playground";
};
Playground = stjs.extend(Playground, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Zoo
* A zoo.
*
* @author schema.org
* @class Zoo
* @module org.schema
* @extends CivicStructure
*/
var Zoo = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Zoo";
};
Zoo = stjs.extend(Zoo, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RVPark
* A place offering space for "Recreational Vehicles", Caravans, mobile homes and the like.
*
* @author schema.org
* @class RVPark
* @module org.schema
* @extends CivicStructure
*/
var RVPark = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "RVPark";
};
RVPark = stjs.extend(RVPark, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ParkingFacility
* A parking lot or other parking facility.
*
* @author schema.org
* @class ParkingFacility
* @module org.schema
* @extends CivicStructure
*/
var ParkingFacility = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "ParkingFacility";
};
ParkingFacility = stjs.extend(ParkingFacility, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Aquarium
* Aquarium.
*
* @author schema.org
* @class Aquarium
* @module org.schema
* @extends CivicStructure
*/
var Aquarium = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CivicStructure.call(this);
this.context = "http://schema.org/";
this.type = "Aquarium";
};
Aquarium = stjs.extend(Aquarium, CivicStructure, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Continent
* One of the continents (for example, Europe or Africa).
*
* @author schema.org
* @class Continent
* @module org.schema
* @extends Landform
*/
var Continent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Landform.call(this);
this.context = "http://schema.org/";
this.type = "Continent";
};
Continent = stjs.extend(Continent, Landform, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Volcano
* A volcano, like Fuji san.
*
* @author schema.org
* @class Volcano
* @module org.schema
* @extends Landform
*/
var Volcano = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Landform.call(this);
this.context = "http://schema.org/";
this.type = "Volcano";
};
Volcano = stjs.extend(Volcano, Landform, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BodyOfWater
* A body of water, such as a sea, ocean, or lake.
*
* @author schema.org
* @class BodyOfWater
* @module org.schema
* @extends Landform
*/
var BodyOfWater = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Landform.call(this);
this.context = "http://schema.org/";
this.type = "BodyOfWater";
};
BodyOfWater = stjs.extend(BodyOfWater, Landform, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Mountain
* A mountain, like Mount Whitney or Mount Everest.
*
* @author schema.org
* @class Mountain
* @module org.schema
* @extends Landform
*/
var Mountain = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Landform.call(this);
this.context = "http://schema.org/";
this.type = "Mountain";
};
Mountain = stjs.extend(Mountain, Landform, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/City
* A city or town.
*
* @author schema.org
* @class City
* @module org.schema
* @extends AdministrativeArea
*/
var City = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AdministrativeArea.call(this);
this.context = "http://schema.org/";
this.type = "City";
};
City = stjs.extend(City, AdministrativeArea, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Country
* A country.
*
* @author schema.org
* @class Country
* @module org.schema
* @extends AdministrativeArea
*/
var Country = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AdministrativeArea.call(this);
this.context = "http://schema.org/";
this.type = "Country";
};
Country = stjs.extend(Country, AdministrativeArea, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/State
* A state or province of a country.
*
* @author schema.org
* @class State
* @module org.schema
* @extends AdministrativeArea
*/
var State = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AdministrativeArea.call(this);
this.context = "http://schema.org/";
this.type = "State";
};
State = stjs.extend(State, AdministrativeArea, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Mass
* Properties that take Mass as values are of the form '<Number> <Mass unit of measure>'. E.g., '7 kg'.
*
* @author schema.org
* @class Mass
* @module org.schema
* @extends Quantity
*/
var Mass = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Quantity.call(this);
this.context = "http://schema.org/";
this.type = "Mass";
};
Mass = stjs.extend(Mass, Quantity, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Energy
* Properties that take Energy as values are of the form '<Number> <Energy unit of measure>'.
*
* @author schema.org
* @class Energy
* @module org.schema
* @extends Quantity
*/
var Energy = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Quantity.call(this);
this.context = "http://schema.org/";
this.type = "Energy";
};
Energy = stjs.extend(Energy, Quantity, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Duration
* Quantity: Duration (use [ISO 8601 duration format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @author schema.org
* @class Duration
* @module org.schema
* @extends Quantity
*/
var Duration = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Quantity.call(this);
this.context = "http://schema.org/";
this.type = "Duration";
};
Duration = stjs.extend(Duration, Quantity, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Distance
* Properties that take Distances as values are of the form '<Number> <Length unit of measure>'. E.g., '7 ft'.
*
* @author schema.org
* @class Distance
* @module org.schema
* @extends Quantity
*/
var Distance = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Quantity.call(this);
this.context = "http://schema.org/";
this.type = "Distance";
};
Distance = stjs.extend(Distance, Quantity, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AggregateRating
* The average rating based on multiple ratings or reviews.
*
* @author schema.org
* @class AggregateRating
* @module org.schema
* @extends Rating
*/
var AggregateRating = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Rating.call(this);
this.context = "http://schema.org/";
this.type = "AggregateRating";
};
AggregateRating = stjs.extend(AggregateRating, Rating, [], function(constructor, prototype) {
/**
* Schema.org/reviewCount
* The count of total number of reviews.
*
* @property reviewCount
* @type Integer
*/
prototype.reviewCount = null;
/**
* Schema.org/itemReviewed
* The item that is being reviewed/rated.
*
* @property itemReviewed
* @type Thing
*/
prototype.itemReviewed = null;
/**
* Schema.org/ratingCount
* The count of total number of ratings.
*
* @property ratingCount
* @type Integer
*/
prototype.ratingCount = null;
}, {itemReviewed: "Thing", bestRating: "Object", ratingValue: "Object", worstRating: "Object", author: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GovernmentPermit
* A permit issued by a government agency.
*
* @author schema.org
* @class GovernmentPermit
* @module org.schema
* @extends Permit
*/
var GovernmentPermit = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Permit.call(this);
this.context = "http://schema.org/";
this.type = "GovernmentPermit";
};
GovernmentPermit = stjs.extend(GovernmentPermit, Permit, [], null, {validIn: "AdministrativeArea", issuedBy: "Organization", issuedThrough: "Service", permitAudience: "Audience", validFor: "Duration", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PerformanceRole
* A PerformanceRole is a Role that some entity places with regard to a theatrical performance, e.g. in a Movie, TVSeries etc.
*
* @author schema.org
* @class PerformanceRole
* @module org.schema
* @extends Role
*/
var PerformanceRole = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Role.call(this);
this.context = "http://schema.org/";
this.type = "PerformanceRole";
};
PerformanceRole = stjs.extend(PerformanceRole, Role, [], function(constructor, prototype) {
/**
* Schema.org/characterName
* The name of a character played in some acting or performing role, i.e. in a PerformanceRole.
*
* @property characterName
* @type Text
*/
prototype.characterName = null;
}, {roleName: "Object", namedPosition: "Object", startDate: "Object", endDate: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OrganizationRole
* A subclass of Role used to describe roles within organizations.
*
* @author schema.org
* @class OrganizationRole
* @module org.schema
* @extends Role
*/
var OrganizationRole = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Role.call(this);
this.context = "http://schema.org/";
this.type = "OrganizationRole";
};
OrganizationRole = stjs.extend(OrganizationRole, Role, [], function(constructor, prototype) {
/**
* Schema.org/numberedPosition
* A number associated with a role in an organization, for example, the number on an athlete's jersey.
*
* @property numberedPosition
* @type Number
*/
prototype.numberedPosition = null;
}, {roleName: "Object", namedPosition: "Object", startDate: "Object", endDate: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EducationalAudience
* An EducationalAudience.
*
* @author schema.org
* @class EducationalAudience
* @module org.schema
* @extends Audience
*/
var EducationalAudience = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Audience.call(this);
this.context = "http://schema.org/";
this.type = "EducationalAudience";
};
EducationalAudience = stjs.extend(EducationalAudience, Audience, [], function(constructor, prototype) {
/**
* Schema.org/educationalRole
* An educationalRole of an EducationalAudience.
*
* @property educationalRole
* @type Text
*/
prototype.educationalRole = null;
}, {geographicArea: "AdministrativeArea", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusinessAudience
* A set of characteristics belonging to businesses, e.g. who compose an item's target audience.
*
* @author schema.org
* @class BusinessAudience
* @module org.schema
* @extends Audience
*/
var BusinessAudience = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Audience.call(this);
this.context = "http://schema.org/";
this.type = "BusinessAudience";
};
BusinessAudience = stjs.extend(BusinessAudience, Audience, [], function(constructor, prototype) {
/**
* Schema.org/yearlyRevenue
* The size of the business in annual revenue.
*
* @property yearlyRevenue
* @type QuantitativeValue
*/
prototype.yearlyRevenue = null;
/**
* Schema.org/numberOfEmployees
* The number of employees in an organization e.g. business.
*
* @property numberOfEmployees
* @type QuantitativeValue
*/
prototype.numberOfEmployees = null;
/**
* Schema.org/yearsInOperation
* The age of the business.
*
* @property yearsInOperation
* @type QuantitativeValue
*/
prototype.yearsInOperation = null;
}, {yearlyRevenue: "QuantitativeValue", numberOfEmployees: "QuantitativeValue", yearsInOperation: "QuantitativeValue", geographicArea: "AdministrativeArea", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PeopleAudience
* A set of characteristics belonging to people, e.g. who compose an item's target audience.
*
* @author schema.org
* @class PeopleAudience
* @module org.schema
* @extends Audience
*/
var PeopleAudience = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Audience.call(this);
this.context = "http://schema.org/";
this.type = "PeopleAudience";
};
PeopleAudience = stjs.extend(PeopleAudience, Audience, [], function(constructor, prototype) {
/**
* Schema.org/suggestedMaxAge
* Maximal age recommended for viewing content.
*
* @property suggestedMaxAge
* @type Number
*/
prototype.suggestedMaxAge = null;
/**
* Schema.org/requiredMinAge
* Audiences defined by a person's minimum age.
*
* @property requiredMinAge
* @type Integer
*/
prototype.requiredMinAge = null;
/**
* Schema.org/suggestedMinAge
* Minimal age recommended for viewing content.
*
* @property suggestedMinAge
* @type Number
*/
prototype.suggestedMinAge = null;
/**
* Schema.org/requiredMaxAge
* Audiences defined by a person's maximum age.
*
* @property requiredMaxAge
* @type Integer
*/
prototype.requiredMaxAge = null;
/**
* Schema.org/suggestedGender
* The gender of the person or audience.
*
* @property suggestedGender
* @type Text
*/
prototype.suggestedGender = null;
/**
* Schema.org/requiredGender
* Audiences defined by a person's gender.
*
* @property requiredGender
* @type Text
*/
prototype.requiredGender = null;
}, {geographicArea: "AdministrativeArea", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CableOrSatelliteService
* A service which provides access to media programming like TV or radio. Access may be via cable or satellite.
*
* @author schema.org
* @class CableOrSatelliteService
* @module org.schema
* @extends Service
*/
var CableOrSatelliteService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Service.call(this);
this.context = "http://schema.org/";
this.type = "CableOrSatelliteService";
};
CableOrSatelliteService = stjs.extend(CableOrSatelliteService, Service, [], null, {audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Taxi
* A taxi.
*
* @author schema.org
* @class Taxi
* @module org.schema
* @extends Service
*/
var Taxi = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Service.call(this);
this.context = "http://schema.org/";
this.type = "Taxi";
};
Taxi = stjs.extend(Taxi, Service, [], null, {audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TaxiService
* A service for a vehicle for hire with a driver for local travel. Fares are usually calculated based on distance traveled.
*
* @author schema.org
* @class TaxiService
* @module org.schema
* @extends Service
*/
var TaxiService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Service.call(this);
this.context = "http://schema.org/";
this.type = "TaxiService";
};
TaxiService = stjs.extend(TaxiService, Service, [], null, {audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FoodService
* A food service, like breakfast, lunch, or dinner.
*
* @author schema.org
* @class FoodService
* @module org.schema
* @extends Service
*/
var FoodService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Service.call(this);
this.context = "http://schema.org/";
this.type = "FoodService";
};
FoodService = stjs.extend(FoodService, Service, [], null, {audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FinancialProduct
* A product provided to consumers and businesses by financial institutions such as banks, insurance companies, brokerage firms, consumer finance companies, and investment companies which comprise the financial services industry.
*
* @author schema.org
* @class FinancialProduct
* @module org.schema
* @extends Service
*/
var FinancialProduct = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Service.call(this);
this.context = "http://schema.org/";
this.type = "FinancialProduct";
};
FinancialProduct = stjs.extend(FinancialProduct, Service, [], function(constructor, prototype) {
/**
* Schema.org/feesAndCommissionsSpecification
* Description of fees, commissions, and other terms applied either to a class of financial product, or by a financial service organization.
*
* @property feesAndCommissionsSpecification
* @type schema, URL | schema,Text
*/
prototype.feesAndCommissionsSpecification = null;
/**
* Schema.org/annualPercentageRate
* The annual rate that is charged for borrowing (or made by investing), expressed as a single percentage number that represents the actual yearly cost of funds over the term of a loan. This includes any fees or additional costs associated with the transaction.
*
* @property annualPercentageRate
* @type schema, Number | schema,QuantitativeValue
*/
prototype.annualPercentageRate = null;
/**
* Schema.org/interestRate
* The interest rate, charged or paid, applicable to the financial product. Note: This is different from the calculated annualPercentageRate.
*
* @property interestRate
* @type schema, Number | schema,QuantitativeValue
*/
prototype.interestRate = null;
}, {feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GovernmentService
* A service provided by a government organization, e.g. food stamps, veterans benefits, etc.
*
* @author schema.org
* @class GovernmentService
* @module org.schema
* @extends Service
*/
var GovernmentService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Service.call(this);
this.context = "http://schema.org/";
this.type = "GovernmentService";
};
GovernmentService = stjs.extend(GovernmentService, Service, [], function(constructor, prototype) {
/**
* Schema.org/serviceOperator
* The operating organization, if different from the provider. This enables the representation of services that are provided by an organization, but operated by another organization like a subcontractor.
*
* @property serviceOperator
* @type Organization
*/
prototype.serviceOperator = null;
}, {serviceOperator: "Organization", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BroadcastService
* A delivery service through which content is provided via broadcast over the air or online.
*
* @author schema.org
* @class BroadcastService
* @module org.schema
* @extends Service
*/
var BroadcastService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Service.call(this);
this.context = "http://schema.org/";
this.type = "BroadcastService";
};
BroadcastService = stjs.extend(BroadcastService, Service, [], function(constructor, prototype) {
/**
* Schema.org/broadcastTimezone
* The timezone in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601) for which the service bases its broadcasts
*
* @property broadcastTimezone
* @type Text
*/
prototype.broadcastTimezone = null;
/**
* Schema.org/area
* The area within which users can expect to reach the broadcast service.
*
* @property area
* @type Place
*/
prototype.area = null;
/**
* Schema.org/videoFormat
* The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD, etc.).
*
* @property videoFormat
* @type Text
*/
prototype.videoFormat = null;
/**
* Schema.org/broadcastDisplayName
* The name displayed in the channel guide. For many US affiliates, it is the network name.
*
* @property broadcastDisplayName
* @type Text
*/
prototype.broadcastDisplayName = null;
/**
* Schema.org/broadcastAffiliateOf
* The media network(s) whose content is broadcast on this station.
*
* @property broadcastAffiliateOf
* @type Organization
*/
prototype.broadcastAffiliateOf = null;
/**
* Schema.org/parentService
* A broadcast service to which the broadcast service may belong to such as regional variations of a national channel.
*
* @property parentService
* @type BroadcastService
*/
prototype.parentService = null;
/**
* Schema.org/broadcaster
* The organization owning or operating the broadcast service.
*
* @property broadcaster
* @type Organization
*/
prototype.broadcaster = null;
}, {area: "Place", broadcastAffiliateOf: "Organization", parentService: "BroadcastService", broadcaster: "Organization", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InteractionCounter
* A summary of how users have interacted with this CreativeWork. In most cases, authors will use a subtype to specify the specific type of interaction.
*
* @author schema.org
* @class InteractionCounter
* @module org.schema
* @extends StructuredValue
*/
var InteractionCounter = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "InteractionCounter";
};
InteractionCounter = stjs.extend(InteractionCounter, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/interactionService
* The WebSite or SoftwareApplication where the interactions took place.
*
* @property interactionService
* @type schema, SoftwareApplication | schema,WebSite
*/
prototype.interactionService = null;
/**
* Schema.org/userInteractionCount
* The number of interactions for the CreativeWork using the WebSite or SoftwareApplication.
*
* @property userInteractionCount
* @type Integer
*/
prototype.userInteractionCount = null;
/**
* Schema.org/interactionType
* The Action representing the type of interaction. For up votes, +1s, etc. use [[LikeAction]]. For down votes use [[DislikeAction]]. Otherwise, use the most specific Action.
*
* @property interactionType
* @type Action
*/
prototype.interactionType = null;
}, {interactionService: "Object", interactionType: "Action", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GeoCoordinates
* The geographic coordinates of a place or event.
*
* @author schema.org
* @class GeoCoordinates
* @module org.schema
* @extends StructuredValue
*/
var GeoCoordinates = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "GeoCoordinates";
};
GeoCoordinates = stjs.extend(GeoCoordinates, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/postalCode
* The postal code. For example, 94043.
*
* @property postalCode
* @type Text
*/
prototype.postalCode = null;
/**
* Schema.org/latitude
* The latitude of a location. For example ```37.42242``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).
*
* @property latitude
* @type schema, Number | schema,Text
*/
prototype.latitude = null;
/**
* Schema.org/elevation
* The elevation of a location ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).
*
* @property elevation
* @type schema, Number | schema,Text
*/
prototype.elevation = null;
/**
* Schema.org/longitude
* The longitude of a location. For example ```-122.08585``` ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).
*
* @property longitude
* @type schema, Number | schema,Text
*/
prototype.longitude = null;
/**
* Schema.org/addressCountry
* The country. For example, USA. You can also provide the two-letter [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1).
*
* @property addressCountry
* @type schema, Text | schema,Country
*/
prototype.addressCountry = null;
/**
* Schema.org/address
* Physical address of the item.
*
* @property address
* @type schema, PostalAddress | schema,Text
*/
prototype.address = null;
}, {latitude: "Object", elevation: "Object", longitude: "Object", addressCountry: "Object", address: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OpeningHoursSpecification
* A structured value providing information about the opening hours of a place or a certain service inside a place.\n\n
* The place is __open__ if the [[opens]] property is specified, and __closed__ otherwise.\n\nIf the value for the [[closes]] property is less than the value for the [[opens]] property then the hour range is assumed to span over the next day.
*
* @author schema.org
* @class OpeningHoursSpecification
* @module org.schema
* @extends StructuredValue
*/
var OpeningHoursSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "OpeningHoursSpecification";
};
OpeningHoursSpecification = stjs.extend(OpeningHoursSpecification, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/opens
* The opening hour of the place or service on the given day(s) of the week.
*
* @property opens
* @type Time
*/
prototype.opens = null;
/**
* Schema.org/dayOfWeek
* The day of the week for which these opening hours are valid.
*
* @property dayOfWeek
* @type DayOfWeek
*/
prototype.dayOfWeek = null;
/**
* Schema.org/validFrom
* The date when the item becomes valid.
*
* @property validFrom
* @type DateTime
*/
prototype.validFrom = null;
/**
* Schema.org/closes
* The closing hour of the place or service on the given day(s) of the week.
*
* @property closes
* @type Time
*/
prototype.closes = null;
/**
* Schema.org/validThrough
* The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
*
* @property validThrough
* @type DateTime
*/
prototype.validThrough = null;
}, {dayOfWeek: "DayOfWeek", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PriceSpecification
* A structured value representing a price or price range. Typically, only the subclasses of this type are used for markup. It is recommended to use [[MonetaryAmount]] to describe independent amounts of money such as a salary, credit card limits, etc.
*
* @author schema.org
* @class PriceSpecification
* @module org.schema
* @extends StructuredValue
*/
var PriceSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "PriceSpecification";
};
PriceSpecification = stjs.extend(PriceSpecification, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/priceCurrency
* The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to [[PriceSpecification]] and its subtypes.
*
* @property priceCurrency
* @type Text
*/
prototype.priceCurrency = null;
/**
* Schema.org/validFrom
* The date when the item becomes valid.
*
* @property validFrom
* @type DateTime
*/
prototype.validFrom = null;
/**
* Schema.org/price
* The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.\n\nUsage guidelines:\n\n* Use the [[priceCurrency]] property (with [ISO 4217 codes](http://en.wikipedia.org/wiki/ISO_4217#Active_codes) e.g. "USD") instead of
* including [ambiguous symbols](http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign) such as '$' in the value.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.\n* Note that both [RDFa](http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute) and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similiar Unicode symbols.
*
* @property price
* @type schema, Number | schema,Text
*/
prototype.price = null;
/**
* Schema.org/minPrice
* The lowest price if the price is a range.
*
* @property minPrice
* @type Number
*/
prototype.minPrice = null;
/**
* Schema.org/eligibleTransactionVolume
* The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount.
*
* @property eligibleTransactionVolume
* @type PriceSpecification
*/
prototype.eligibleTransactionVolume = null;
/**
* Schema.org/validThrough
* The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
*
* @property validThrough
* @type DateTime
*/
prototype.validThrough = null;
/**
* Schema.org/valueAddedTaxIncluded
* Specifies whether the applicable value-added tax (VAT) is included in the price specification or not.
*
* @property valueAddedTaxIncluded
* @type Boolean
*/
prototype.valueAddedTaxIncluded = null;
/**
* Schema.org/eligibleQuantity
* The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity.
*
* @property eligibleQuantity
* @type QuantitativeValue
*/
prototype.eligibleQuantity = null;
/**
* Schema.org/maxPrice
* The highest price if the price is a range.
*
* @property maxPrice
* @type Number
*/
prototype.maxPrice = null;
}, {price: "Object", eligibleTransactionVolume: "PriceSpecification", eligibleQuantity: "QuantitativeValue", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OwnershipInfo
* A structured value providing information about when a certain organization or person owned a certain product.
*
* @author schema.org
* @class OwnershipInfo
* @module org.schema
* @extends StructuredValue
*/
var OwnershipInfo = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "OwnershipInfo";
};
OwnershipInfo = stjs.extend(OwnershipInfo, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/ownedThrough
* The date and time of giving up ownership on the product.
*
* @property ownedThrough
* @type DateTime
*/
prototype.ownedThrough = null;
/**
* Schema.org/acquiredFrom
* The organization or person from which the product was acquired.
*
* @property acquiredFrom
* @type schema, Organization | schema,Person
*/
prototype.acquiredFrom = null;
/**
* Schema.org/typeOfGood
* The product that this structured value is referring to.
*
* @property typeOfGood
* @type schema, Service | schema,Product
*/
prototype.typeOfGood = null;
/**
* Schema.org/ownedFrom
* The date and time of obtaining the product.
*
* @property ownedFrom
* @type DateTime
*/
prototype.ownedFrom = null;
}, {acquiredFrom: "Object", typeOfGood: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/NutritionInformation
* Nutritional information about the recipe.
*
* @author schema.org
* @class NutritionInformation
* @module org.schema
* @extends StructuredValue
*/
var NutritionInformation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "NutritionInformation";
};
NutritionInformation = stjs.extend(NutritionInformation, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/calories
* The number of calories.
*
* @property calories
* @type Energy
*/
prototype.calories = null;
/**
* Schema.org/fiberContent
* The number of grams of fiber.
*
* @property fiberContent
* @type Mass
*/
prototype.fiberContent = null;
/**
* Schema.org/sugarContent
* The number of grams of sugar.
*
* @property sugarContent
* @type Mass
*/
prototype.sugarContent = null;
/**
* Schema.org/cholesterolContent
* The number of milligrams of cholesterol.
*
* @property cholesterolContent
* @type Mass
*/
prototype.cholesterolContent = null;
/**
* Schema.org/proteinContent
* The number of grams of protein.
*
* @property proteinContent
* @type Mass
*/
prototype.proteinContent = null;
/**
* Schema.org/fatContent
* The number of grams of fat.
*
* @property fatContent
* @type Mass
*/
prototype.fatContent = null;
/**
* Schema.org/transFatContent
* The number of grams of trans fat.
*
* @property transFatContent
* @type Mass
*/
prototype.transFatContent = null;
/**
* Schema.org/carbohydrateContent
* The number of grams of carbohydrates.
*
* @property carbohydrateContent
* @type Mass
*/
prototype.carbohydrateContent = null;
/**
* Schema.org/unsaturatedFatContent
* The number of grams of unsaturated fat.
*
* @property unsaturatedFatContent
* @type Mass
*/
prototype.unsaturatedFatContent = null;
/**
* Schema.org/saturatedFatContent
* The number of grams of saturated fat.
*
* @property saturatedFatContent
* @type Mass
*/
prototype.saturatedFatContent = null;
/**
* Schema.org/sodiumContent
* The number of milligrams of sodium.
*
* @property sodiumContent
* @type Mass
*/
prototype.sodiumContent = null;
/**
* Schema.org/servingSize
* The serving size, in terms of the number of volume or mass.
*
* @property servingSize
* @type Text
*/
prototype.servingSize = null;
}, {calories: "Energy", fiberContent: "Mass", sugarContent: "Mass", cholesterolContent: "Mass", proteinContent: "Mass", fatContent: "Mass", transFatContent: "Mass", carbohydrateContent: "Mass", unsaturatedFatContent: "Mass", saturatedFatContent: "Mass", sodiumContent: "Mass", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GeoShape
* The geographic shape of a place. A GeoShape can be described using several properties whose values are based on latitude/longitude pairs. Either whitespace or commas can be used to separate latitude and longitude; whitespace should be used when writing a list of several such points.
*
* @author schema.org
* @class GeoShape
* @module org.schema
* @extends StructuredValue
*/
var GeoShape = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "GeoShape";
};
GeoShape = stjs.extend(GeoShape, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/postalCode
* The postal code. For example, 94043.
*
* @property postalCode
* @type Text
*/
prototype.postalCode = null;
/**
* Schema.org/elevation
* The elevation of a location ([WGS 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).
*
* @property elevation
* @type schema, Number | schema,Text
*/
prototype.elevation = null;
/**
* Schema.org/line
* A line is a point-to-point path consisting of two or more points. A line is expressed as a series of two or more point objects separated by space.
*
* @property line
* @type Text
*/
prototype.line = null;
/**
* Schema.org/addressCountry
* The country. For example, USA. You can also provide the two-letter [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1).
*
* @property addressCountry
* @type schema, Text | schema,Country
*/
prototype.addressCountry = null;
/**
* Schema.org/address
* Physical address of the item.
*
* @property address
* @type schema, PostalAddress | schema,Text
*/
prototype.address = null;
/**
* Schema.org/polygon
* A polygon is the area enclosed by a point-to-point path for which the starting and ending points are the same. A polygon is expressed as a series of four or more space delimited points where the first and final points are identical.
*
* @property polygon
* @type Text
*/
prototype.polygon = null;
/**
* Schema.org/box
* A box is the area enclosed by the rectangle formed by two points. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character.
*
* @property box
* @type Text
*/
prototype.box = null;
/**
* Schema.org/circle
* A circle is the circular region of a specified radius centered at a specified latitude and longitude. A circle is expressed as a pair followed by a radius in meters.
*
* @property circle
* @type Text
*/
prototype.circle = null;
}, {elevation: "Object", addressCountry: "Object", address: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PropertyValue
* A property-value pair, e.g. representing a feature of a product or place. Use the 'name' property for the name of the property. If there is an additional human-readable version of the value, put that into the 'description' property.\n\n Always use specific schema.org properties when a) they exist and b) you can populate them. Using PropertyValue as a substitute will typically not trigger the same effect as using the original, specific property.
*
* @author schema.org
* @class PropertyValue
* @module org.schema
* @extends StructuredValue
*/
var PropertyValue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "PropertyValue";
};
PropertyValue = stjs.extend(PropertyValue, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/unitCode
* The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.
*
* @property unitCode
* @type schema, URL | schema,Text
*/
prototype.unitCode = null;
/**
* Schema.org/minValue
* The lower value of some characteristic or property.
*
* @property minValue
* @type Number
*/
prototype.minValue = null;
/**
* Schema.org/unitText
* A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for
* <a href='unitCode'>unitCode</a>.
*
* @property unitText
* @type Text
*/
prototype.unitText = null;
/**
* Schema.org/valueReference
* A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature.
*
* @property valueReference
* @type schema, StructuredValue | schema,QualitativeValue | schema,Enumeration | schema,QuantitativeValue | schema,PropertyValue
*/
prototype.valueReference = null;
/**
* Schema.org/propertyID
* A commonly used identifier for the characteristic represented by the property, e.g. a manufacturer or a standard code for a property. propertyID can be
* (1) a prefixed string, mainly meant to be used with standards for product properties; (2) a site-specific, non-prefixed string (e.g. the primary key of the property or the vendor-specific id of the property), or (3)
* a URL indicating the type of the property, either pointing to an external vocabulary, or a Web resource that describes the property (e.g. a glossary entry).
* Standards bodies should promote a standard prefix for the identifiers of properties from their standards.
*
* @property propertyID
* @type schema, URL | schema,Text
*/
prototype.propertyID = null;
/**
* Schema.org/value
* The value of the quantitative value or property value node.\n\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\n* For [[PropertyValue]], it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'.
*
* @property value
* @type schema, Number | schema,Boolean | schema,Text | schema,StructuredValue
*/
prototype.value = null;
/**
* Schema.org/maxValue
* The upper value of some characteristic or property.
*
* @property maxValue
* @type Number
*/
prototype.maxValue = null;
}, {unitCode: "Object", valueReference: "Object", propertyID: "Object", value: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WarrantyPromise
* A structured value representing the duration and scope of services that will be provided to a customer free of charge in case of a defect or malfunction of a product.
*
* @author schema.org
* @class WarrantyPromise
* @module org.schema
* @extends StructuredValue
*/
var WarrantyPromise = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "WarrantyPromise";
};
WarrantyPromise = stjs.extend(WarrantyPromise, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/durationOfWarranty
* The duration of the warranty promise. Common unitCode values are ANN for year, MON for months, or DAY for days.
*
* @property durationOfWarranty
* @type QuantitativeValue
*/
prototype.durationOfWarranty = null;
/**
* Schema.org/warrantyScope
* The scope of the warranty promise.
*
* @property warrantyScope
* @type WarrantyScope
*/
prototype.warrantyScope = null;
}, {durationOfWarranty: "QuantitativeValue", warrantyScope: "WarrantyScope", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ContactPoint
* A contact point—for example, a Customer Complaints department.
*
* @author schema.org
* @class ContactPoint
* @module org.schema
* @extends StructuredValue
*/
var ContactPoint = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "ContactPoint";
};
ContactPoint = stjs.extend(ContactPoint, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/contactType
* A person or organization can have different contact points, for different purposes. For example, a sales contact point, a PR contact point and so on. This property is used to specify the kind of contact point.
*
* @property contactType
* @type Text
*/
prototype.contactType = null;
/**
* Schema.org/faxNumber
* The fax number.
*
* @property faxNumber
* @type Text
*/
prototype.faxNumber = null;
/**
* Schema.org/productSupported
* The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones").
*
* @property productSupported
* @type schema, Text | schema,Product
*/
prototype.productSupported = null;
/**
* Schema.org/availableLanguage
* A language someone may use with the item. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[inLanguage]]
*
* @property availableLanguage
* @type schema, Text | schema,Language
*/
prototype.availableLanguage = null;
/**
* Schema.org/areaServed
* The geographic area where a service or offered item is provided.
*
* @property areaServed
* @type schema, GeoShape | schema,Text | schema,Place | schema,AdministrativeArea
*/
prototype.areaServed = null;
/**
* Schema.org/hoursAvailable
* The hours during which this service or contact is available.
*
* @property hoursAvailable
* @type OpeningHoursSpecification
*/
prototype.hoursAvailable = null;
/**
* Schema.org/email
* Email address.
*
* @property email
* @type Text
*/
prototype.email = null;
/**
* Schema.org/serviceArea
* The geographic area where the service is provided.
*
* @property serviceArea
* @type schema, GeoShape | schema,Place | schema,AdministrativeArea
*/
prototype.serviceArea = null;
/**
* Schema.org/telephone
* The telephone number.
*
* @property telephone
* @type Text
*/
prototype.telephone = null;
/**
* Schema.org/contactOption
* An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers).
*
* @property contactOption
* @type ContactPointOption
*/
prototype.contactOption = null;
}, {productSupported: "Object", availableLanguage: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", serviceArea: "Object", contactOption: "ContactPointOption", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/QuantitativeValue
* A point value or interval for product characteristics and other purposes.
*
* @author schema.org
* @class QuantitativeValue
* @module org.schema
* @extends StructuredValue
*/
var QuantitativeValue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "QuantitativeValue";
};
QuantitativeValue = stjs.extend(QuantitativeValue, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/additionalProperty
* A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.\n\nNote: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
*
* @property additionalProperty
* @type PropertyValue
*/
prototype.additionalProperty = null;
/**
* Schema.org/unitCode
* The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.
*
* @property unitCode
* @type schema, URL | schema,Text
*/
prototype.unitCode = null;
/**
* Schema.org/minValue
* The lower value of some characteristic or property.
*
* @property minValue
* @type Number
*/
prototype.minValue = null;
/**
* Schema.org/unitText
* A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for
* <a href='unitCode'>unitCode</a>.
*
* @property unitText
* @type Text
*/
prototype.unitText = null;
/**
* Schema.org/valueReference
* A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature.
*
* @property valueReference
* @type schema, StructuredValue | schema,QualitativeValue | schema,Enumeration | schema,QuantitativeValue | schema,PropertyValue
*/
prototype.valueReference = null;
/**
* Schema.org/value
* The value of the quantitative value or property value node.\n\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\n* For [[PropertyValue]], it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'.
*
* @property value
* @type schema, Number | schema,Boolean | schema,Text | schema,StructuredValue
*/
prototype.value = null;
/**
* Schema.org/maxValue
* The upper value of some characteristic or property.
*
* @property maxValue
* @type Number
*/
prototype.maxValue = null;
}, {additionalProperty: "PropertyValue", unitCode: "Object", valueReference: "Object", value: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DatedMoneySpecification
* A DatedMoneySpecification represents monetary values with optional start and end dates. For example, this could represent an employee's salary over a specific period of time. __Note:__ This type has been superseded by [[MonetaryAmount]] use of that type is recommended
*
* @author schema.org
* @class DatedMoneySpecification
* @module org.schema
* @extends StructuredValue
*/
var DatedMoneySpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "DatedMoneySpecification";
};
DatedMoneySpecification = stjs.extend(DatedMoneySpecification, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/amount
* The amount of money.
*
* @property amount
* @type schema, Number | schema,MonetaryAmount
*/
prototype.amount = null;
/**
* Schema.org/currency
* The currency in which the monetary amount is expressed (in 3-letter [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) format).
*
* @property currency
* @type Text
*/
prototype.currency = null;
/**
* Schema.org/startDate
* The start date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property startDate
* @type schema, DateTime | schema,Date
*/
prototype.startDate = null;
/**
* Schema.org/endDate
* The end date and time of the item (in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601)).
*
* @property endDate
* @type schema, DateTime | schema,Date
*/
prototype.endDate = null;
}, {amount: "Object", startDate: "Object", endDate: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EngineSpecification
* Information about the engine of the vehicle. A vehicle can have multiple engines represented by multiple engine specification entities.
*
* @author schema.org
* @class EngineSpecification
* @module org.schema
* @extends StructuredValue
*/
var EngineSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "EngineSpecification";
};
EngineSpecification = stjs.extend(EngineSpecification, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/fuelType
* The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle.
*
* @property fuelType
* @type schema, URL | schema,Text | schema,QualitativeValue
*/
prototype.fuelType = null;
}, {fuelType: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MonetaryAmount
* A monetary value or range. This type can be used to describe an amount of money such as $50 USD, or a range as in describing a bank account being suitable for a balance between £1,000 and £1,000,000 GBP, or the value of a salary, etc. It is recommended to use [[PriceSpecification]] Types to describe the price of an Offer, Invoice, etc.
*
* @author schema.org
* @class MonetaryAmount
* @module org.schema
* @extends StructuredValue
*/
var MonetaryAmount = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "MonetaryAmount";
};
MonetaryAmount = stjs.extend(MonetaryAmount, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/validFrom
* The date when the item becomes valid.
*
* @property validFrom
* @type DateTime
*/
prototype.validFrom = null;
/**
* Schema.org/minValue
* The lower value of some characteristic or property.
*
* @property minValue
* @type Number
*/
prototype.minValue = null;
/**
* Schema.org/validThrough
* The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
*
* @property validThrough
* @type DateTime
*/
prototype.validThrough = null;
/**
* Schema.org/currency
* The currency in which the monetary amount is expressed (in 3-letter [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) format).
*
* @property currency
* @type Text
*/
prototype.currency = null;
/**
* Schema.org/value
* The value of the quantitative value or property value node.\n\n* For [[QuantitativeValue]] and [[MonetaryAmount]], the recommended type for values is 'Number'.\n* For [[PropertyValue]], it can be 'Text;', 'Number', 'Boolean', or 'StructuredValue'.
*
* @property value
* @type schema, Number | schema,Boolean | schema,Text | schema,StructuredValue
*/
prototype.value = null;
/**
* Schema.org/maxValue
* The upper value of some characteristic or property.
*
* @property maxValue
* @type Number
*/
prototype.maxValue = null;
}, {value: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TypeAndQuantityNode
* A structured value indicating the quantity, unit of measurement, and business function of goods included in a bundle offer.
*
* @author schema.org
* @class TypeAndQuantityNode
* @module org.schema
* @extends StructuredValue
*/
var TypeAndQuantityNode = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.org/";
this.type = "TypeAndQuantityNode";
};
TypeAndQuantityNode = stjs.extend(TypeAndQuantityNode, StructuredValue, [], function(constructor, prototype) {
/**
* Schema.org/businessFunction
* The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell.
*
* @property businessFunction
* @type BusinessFunction
*/
prototype.businessFunction = null;
/**
* Schema.org/unitCode
* The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.
*
* @property unitCode
* @type schema, URL | schema,Text
*/
prototype.unitCode = null;
/**
* Schema.org/unitText
* A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for
* <a href='unitCode'>unitCode</a>.
*
* @property unitText
* @type Text
*/
prototype.unitText = null;
/**
* Schema.org/typeOfGood
* The product that this structured value is referring to.
*
* @property typeOfGood
* @type schema, Service | schema,Product
*/
prototype.typeOfGood = null;
/**
* Schema.org/amountOfThisGood
* The quantity of the goods included in the offer.
*
* @property amountOfThisGood
* @type Number
*/
prototype.amountOfThisGood = null;
}, {businessFunction: "BusinessFunction", unitCode: "Object", typeOfGood: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReservationStatusType
* Enumerated status values for Reservation.
*
* @author schema.org
* @class ReservationStatusType
* @module org.schema
* @extends Enumeration
*/
var ReservationStatusType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "ReservationStatusType";
};
ReservationStatusType = stjs.extend(ReservationStatusType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicAlbumProductionType
* Classification of the album by it's type of content: soundtrack, live album, studio album, etc.
*
* @author schema.org
* @class MusicAlbumProductionType
* @module org.schema
* @extends Enumeration
*/
var MusicAlbumProductionType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "MusicAlbumProductionType";
};
MusicAlbumProductionType = stjs.extend(MusicAlbumProductionType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ActionStatusType
* The status of an Action.
*
* @author schema.org
* @class ActionStatusType
* @module org.schema
* @extends Enumeration
*/
var ActionStatusType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "ActionStatusType";
};
ActionStatusType = stjs.extend(ActionStatusType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/QualitativeValue
* A predefined value for a product characteristic, e.g. the power cord plug type 'US' or the garment sizes 'S', 'M', 'L', and 'XL'.
*
* @author schema.org
* @class QualitativeValue
* @module org.schema
* @extends Enumeration
*/
var QualitativeValue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "QualitativeValue";
};
QualitativeValue = stjs.extend(QualitativeValue, Enumeration, [], function(constructor, prototype) {
/**
* Schema.org/greaterOrEqual
* This ordering relation for qualitative values indicates that the subject is greater than or equal to the object.
*
* @property greaterOrEqual
* @type QualitativeValue
*/
prototype.greaterOrEqual = null;
/**
* Schema.org/additionalProperty
* A property-value pair representing an additional characteristics of the entitity, e.g. a product feature or another characteristic for which there is no matching property in schema.org.\n\nNote: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism.
*
* @property additionalProperty
* @type PropertyValue
*/
prototype.additionalProperty = null;
/**
* Schema.org/nonEqual
* This ordering relation for qualitative values indicates that the subject is not equal to the object.
*
* @property nonEqual
* @type QualitativeValue
*/
prototype.nonEqual = null;
/**
* Schema.org/lesser
* This ordering relation for qualitative values indicates that the subject is lesser than the object.
*
* @property lesser
* @type QualitativeValue
*/
prototype.lesser = null;
/**
* Schema.org/lesserOrEqual
* This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object.
*
* @property lesserOrEqual
* @type QualitativeValue
*/
prototype.lesserOrEqual = null;
/**
* Schema.org/equal
* This ordering relation for qualitative values indicates that the subject is equal to the object.
*
* @property equal
* @type QualitativeValue
*/
prototype.equal = null;
/**
* Schema.org/greater
* This ordering relation for qualitative values indicates that the subject is greater than the object.
*
* @property greater
* @type QualitativeValue
*/
prototype.greater = null;
/**
* Schema.org/valueReference
* A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature.
*
* @property valueReference
* @type schema, StructuredValue | schema,QualitativeValue | schema,Enumeration | schema,QuantitativeValue | schema,PropertyValue
*/
prototype.valueReference = null;
}, {greaterOrEqual: "QualitativeValue", additionalProperty: "PropertyValue", nonEqual: "QualitativeValue", lesser: "QualitativeValue", lesserOrEqual: "QualitativeValue", equal: "QualitativeValue", greater: "QualitativeValue", valueReference: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusinessEntityType
* A business entity type is a conceptual entity representing the legal form, the size, the main line of business, the position in the value chain, or any combination thereof, of an organization or business person.\n\nCommonly used values:\n\n* http://purl.org/goodrelations/v1#Business\n* http://purl.org/goodrelations/v1#Enduser\n* http://purl.org/goodrelations/v1#PublicInstitution\n* http://purl.org/goodrelations/v1#Reseller
*
* @author schema.org
* @class BusinessEntityType
* @module org.schema
* @extends Enumeration
*/
var BusinessEntityType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "BusinessEntityType";
};
BusinessEntityType = stjs.extend(BusinessEntityType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusinessFunction
* The business function specifies the type of activity or access (i.e., the bundle of rights) offered by the organization or business person through the offer. Typical are sell, rental or lease, maintenance or repair, manufacture / produce, recycle / dispose, engineering / construction, or installation. Proprietary specifications of access rights are also instances of this class.\n\nCommonly used values:\n\n* http://purl.org/goodrelations/v1#ConstructionInstallation\n* http://purl.org/goodrelations/v1#Dispose\n* http://purl.org/goodrelations/v1#LeaseOut\n* http://purl.org/goodrelations/v1#Maintain\n* http://purl.org/goodrelations/v1#ProvideService\n* http://purl.org/goodrelations/v1#Repair\n* http://purl.org/goodrelations/v1#Sell\n* http://purl.org/goodrelations/v1#Buy
*
* @author schema.org
* @class BusinessFunction
* @module org.schema
* @extends Enumeration
*/
var BusinessFunction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "BusinessFunction";
};
BusinessFunction = stjs.extend(BusinessFunction, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DayOfWeek
* The day of the week, e.g. used to specify to which day the opening hours of an OpeningHoursSpecification refer.
* <p>
* Originally, URLs from [GoodRelations](http://purl.org/goodrelations/v1) were used (for [[Monday]], [[Tuesday]], [[Wednesday]], [[Thursday]], [[Friday]], [[Saturday]], [[Sunday]] plus a special entry for [[PublicHolidays]]); these have now been integrated directly into schema.org.
*
* @author schema.org
* @class DayOfWeek
* @module org.schema
* @extends Enumeration
*/
var DayOfWeek = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "DayOfWeek";
};
DayOfWeek = stjs.extend(DayOfWeek, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicAlbumReleaseType
* The kind of release which this album is: single, EP or album.
*
* @author schema.org
* @class MusicAlbumReleaseType
* @module org.schema
* @extends Enumeration
*/
var MusicAlbumReleaseType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "MusicAlbumReleaseType";
};
MusicAlbumReleaseType = stjs.extend(MusicAlbumReleaseType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RestrictedDiet
* A diet restricted to certain foods or preparations for cultural, religious, health or lifestyle reasons.
*
* @author schema.org
* @class RestrictedDiet
* @module org.schema
* @extends Enumeration
*/
var RestrictedDiet = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "RestrictedDiet";
};
RestrictedDiet = stjs.extend(RestrictedDiet, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PaymentStatusType
* A specific payment status. For example, PaymentDue, PaymentComplete, etc.
*
* @author schema.org
* @class PaymentStatusType
* @module org.schema
* @extends Enumeration
*/
var PaymentStatusType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "PaymentStatusType";
};
PaymentStatusType = stjs.extend(PaymentStatusType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicReleaseFormatType
* Format of this release (the type of recording media used, ie. compact disc, digital media, LP, etc.).
*
* @author schema.org
* @class MusicReleaseFormatType
* @module org.schema
* @extends Enumeration
*/
var MusicReleaseFormatType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "MusicReleaseFormatType";
};
MusicReleaseFormatType = stjs.extend(MusicReleaseFormatType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OfferItemCondition
* A list of possible conditions for the item.
*
* @author schema.org
* @class OfferItemCondition
* @module org.schema
* @extends Enumeration
*/
var OfferItemCondition = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "OfferItemCondition";
};
OfferItemCondition = stjs.extend(OfferItemCondition, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MapCategoryType
* An enumeration of several kinds of Map.
*
* @author schema.org
* @class MapCategoryType
* @module org.schema
* @extends Enumeration
*/
var MapCategoryType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "MapCategoryType";
};
MapCategoryType = stjs.extend(MapCategoryType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OrderStatus
* Enumerated status values for Order.
*
* @author schema.org
* @class OrderStatus
* @module org.schema
* @extends Enumeration
*/
var OrderStatus = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "OrderStatus";
};
OrderStatus = stjs.extend(OrderStatus, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BookFormatType
* The publication format of the book.
*
* @author schema.org
* @class BookFormatType
* @module org.schema
* @extends Enumeration
*/
var BookFormatType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "BookFormatType";
};
BookFormatType = stjs.extend(BookFormatType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DeliveryMethod
* A delivery method is a standardized procedure for transferring the product or service to the destination of fulfillment chosen by the customer. Delivery methods are characterized by the means of transportation used, and by the organization or group that is the contracting party for the sending organization or person.\n\nCommonly used values:\n\n* http://purl.org/goodrelations/v1#DeliveryModeDirectDownload\n* http://purl.org/goodrelations/v1#DeliveryModeFreight\n* http://purl.org/goodrelations/v1#DeliveryModeMail\n* http://purl.org/goodrelations/v1#DeliveryModeOwnFleet\n* http://purl.org/goodrelations/v1#DeliveryModePickUp\n* http://purl.org/goodrelations/v1#DHL\n* http://purl.org/goodrelations/v1#FederalExpress\n* http://purl.org/goodrelations/v1#UPS
*
* @author schema.org
* @class DeliveryMethod
* @module org.schema
* @extends Enumeration
*/
var DeliveryMethod = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "DeliveryMethod";
};
DeliveryMethod = stjs.extend(DeliveryMethod, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ItemListOrderType
* Enumerated for values for itemListOrder for indicating how an ordered ItemList is organized.
*
* @author schema.org
* @class ItemListOrderType
* @module org.schema
* @extends Enumeration
*/
var ItemListOrderType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "ItemListOrderType";
};
ItemListOrderType = stjs.extend(ItemListOrderType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GenderType
* An enumeration of genders.
*
* @author schema.org
* @class GenderType
* @module org.schema
* @extends Enumeration
*/
var GenderType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "GenderType";
};
GenderType = stjs.extend(GenderType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GamePlayMode
* Indicates whether this game is multi-player, co-op or single-player.
*
* @author schema.org
* @class GamePlayMode
* @module org.schema
* @extends Enumeration
*/
var GamePlayMode = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "GamePlayMode";
};
GamePlayMode = stjs.extend(GamePlayMode, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GameServerStatus
* Status of a game server.
*
* @author schema.org
* @class GameServerStatus
* @module org.schema
* @extends Enumeration
*/
var GameServerStatus = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "GameServerStatus";
};
GameServerStatus = stjs.extend(GameServerStatus, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ContactPointOption
* Enumerated options related to a ContactPoint.
*
* @author schema.org
* @class ContactPointOption
* @module org.schema
* @extends Enumeration
*/
var ContactPointOption = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "ContactPointOption";
};
ContactPointOption = stjs.extend(ContactPointOption, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ItemAvailability
* A list of possible product availability options.
*
* @author schema.org
* @class ItemAvailability
* @module org.schema
* @extends Enumeration
*/
var ItemAvailability = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "ItemAvailability";
};
ItemAvailability = stjs.extend(ItemAvailability, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BoardingPolicyType
* A type of boarding policy used by an airline.
*
* @author schema.org
* @class BoardingPolicyType
* @module org.schema
* @extends Enumeration
*/
var BoardingPolicyType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "BoardingPolicyType";
};
BoardingPolicyType = stjs.extend(BoardingPolicyType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RsvpResponseType
* RsvpResponseType is an enumeration type whose instances represent responding to an RSVP request.
*
* @author schema.org
* @class RsvpResponseType
* @module org.schema
* @extends Enumeration
*/
var RsvpResponseType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "RsvpResponseType";
};
RsvpResponseType = stjs.extend(RsvpResponseType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EventStatusType
* EventStatusType is an enumeration type whose instances represent several states that an Event may be in.
*
* @author schema.org
* @class EventStatusType
* @module org.schema
* @extends Enumeration
*/
var EventStatusType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "EventStatusType";
};
EventStatusType = stjs.extend(EventStatusType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Specialty
* Any branch of a field in which people typically develop specific expertise, usually after significant study, time, and effort.
*
* @author schema.org
* @class Specialty
* @module org.schema
* @extends Enumeration
*/
var Specialty = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "Specialty";
};
Specialty = stjs.extend(Specialty, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DigitalDocumentPermissionType
* A type of permission which can be granted for accessing a digital document.
*
* @author schema.org
* @class DigitalDocumentPermissionType
* @module org.schema
* @extends Enumeration
*/
var DigitalDocumentPermissionType = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "DigitalDocumentPermissionType";
};
DigitalDocumentPermissionType = stjs.extend(DigitalDocumentPermissionType, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WarrantyScope
* A range of of services that will be provided to a customer free of charge in case of a defect or malfunction of a product.\n\nCommonly used values:\n\n* http://purl.org/goodrelations/v1#Labor-BringIn\n* http://purl.org/goodrelations/v1#PartsAndLabor-BringIn\n* http://purl.org/goodrelations/v1#PartsAndLabor-PickUp
*
* @author schema.org
* @class WarrantyScope
* @module org.schema
* @extends Enumeration
*/
var WarrantyScope = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "WarrantyScope";
};
WarrantyScope = stjs.extend(WarrantyScope, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PaymentMethod
* A payment method is a standardized procedure for transferring the monetary amount for a purchase. Payment methods are characterized by the legal and technical structures used, and by the organization or group carrying out the transaction.\n\nCommonly used values:\n\n* http://purl.org/goodrelations/v1#ByBankTransferInAdvance\n* http://purl.org/goodrelations/v1#ByInvoice\n* http://purl.org/goodrelations/v1#Cash\n* http://purl.org/goodrelations/v1#CheckInAdvance\n* http://purl.org/goodrelations/v1#COD\n* http://purl.org/goodrelations/v1#DirectDebit\n* http://purl.org/goodrelations/v1#GoogleCheckout\n* http://purl.org/goodrelations/v1#PayPal\n* http://purl.org/goodrelations/v1#PaySwarm
*
* @author schema.org
* @class PaymentMethod
* @module org.schema
* @extends Enumeration
*/
var PaymentMethod = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Enumeration.call(this);
this.context = "http://schema.org/";
this.type = "PaymentMethod";
};
PaymentMethod = stjs.extend(PaymentMethod, Enumeration, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BreadcrumbList
* A BreadcrumbList is an ItemList consisting of a chain of linked Web pages, typically described using at least their URL and their name, and typically ending with the current page.\n\nThe [[position]] property is used to reconstruct the order of the items in a BreadcrumbList The convention is that a breadcrumb list has an [[itemListOrder]] of [[ItemListOrderAscending]] (lower values listed first), and that the first items in this list correspond to the "top" or beginning of the breadcrumb trail, e.g. with a site or section homepage. The specific values of 'position' are not assigned meaning for a BreadcrumbList, but they should be integers, e.g. beginning with '1' for the first item in the list.
*
* @author schema.org
* @class BreadcrumbList
* @module org.schema
* @extends ItemList
*/
var BreadcrumbList = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ItemList.call(this);
this.context = "http://schema.org/";
this.type = "BreadcrumbList";
};
BreadcrumbList = stjs.extend(BreadcrumbList, ItemList, [], null, {itemListOrder: "Object", itemListElement: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OfferCatalog
* An OfferCatalog is an ItemList that contains related Offers and/or further OfferCatalogs that are offeredBy the same provider.
*
* @author schema.org
* @class OfferCatalog
* @module org.schema
* @extends ItemList
*/
var OfferCatalog = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ItemList.call(this);
this.context = "http://schema.org/";
this.type = "OfferCatalog";
};
OfferCatalog = stjs.extend(OfferCatalog, ItemList, [], null, {itemListOrder: "Object", itemListElement: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AggregateOffer
* When a single product is associated with multiple offers (for example, the same pair of shoes is offered by different merchants), then AggregateOffer can be used.
*
* @author schema.org
* @class AggregateOffer
* @module org.schema
* @extends Offer
*/
var AggregateOffer = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Offer.call(this);
this.context = "http://schema.org/";
this.type = "AggregateOffer";
};
AggregateOffer = stjs.extend(AggregateOffer, Offer, [], function(constructor, prototype) {
/**
* Schema.org/offers
* An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event.
*
* @property offers
* @type Offer
*/
prototype.offers = null;
/**
* Schema.org/highPrice
* The highest price of all offers available.
*
* @property highPrice
* @type schema, Number | schema,Text
*/
prototype.highPrice = null;
/**
* Schema.org/lowPrice
* The lowest price of all offers available.
*
* @property lowPrice
* @type schema, Number | schema,Text
*/
prototype.lowPrice = null;
/**
* Schema.org/offerCount
* The number of offers for the product.
*
* @property offerCount
* @type Integer
*/
prototype.offerCount = null;
}, {offers: "Offer", highPrice: "Object", lowPrice: "Object", advanceBookingRequirement: "QuantitativeValue", reviews: "Review", availableDeliveryMethod: "DeliveryMethod", priceSpecification: "PriceSpecification", price: "Object", businessFunction: "BusinessFunction", itemOffered: "Object", includesObject: "TypeAndQuantityNode", availableAtOrFrom: "Place", warranty: "WarrantyPromise", inventoryLevel: "QuantitativeValue", offeredBy: "Object", eligibleDuration: "QuantitativeValue", review: "Review", eligibleTransactionVolume: "PriceSpecification", areaServed: "Object", seller: "Object", acceptedPaymentMethod: "Object", availability: "ItemAvailability", ineligibleRegion: "Object", deliveryLeadTime: "QuantitativeValue", eligibleQuantity: "QuantitativeValue", addOn: "Offer", itemCondition: "OfferItemCondition", eligibleRegion: "Object", aggregateRating: "AggregateRating", eligibleCustomerType: "BusinessEntityType", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TelevisionChannel
* A unique instance of a television BroadcastService on a CableOrSatelliteService lineup.
*
* @author schema.org
* @class TelevisionChannel
* @module org.schema
* @extends BroadcastChannel
*/
var TelevisionChannel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BroadcastChannel.call(this);
this.context = "http://schema.org/";
this.type = "TelevisionChannel";
};
TelevisionChannel = stjs.extend(TelevisionChannel, BroadcastChannel, [], null, {providesBroadcastService: "BroadcastService", genre: "Object", inBroadcastLineup: "CableOrSatelliteService", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RadioChannel
* A unique instance of a radio BroadcastService on a CableOrSatelliteService lineup.
*
* @author schema.org
* @class RadioChannel
* @module org.schema
* @extends BroadcastChannel
*/
var RadioChannel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BroadcastChannel.call(this);
this.context = "http://schema.org/";
this.type = "RadioChannel";
};
RadioChannel = stjs.extend(RadioChannel, BroadcastChannel, [], null, {providesBroadcastService: "BroadcastService", genre: "Object", inBroadcastLineup: "CableOrSatelliteService", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RentalCarReservation
* A reservation for a rental car.\n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations.
*
* @author schema.org
* @class RentalCarReservation
* @module org.schema
* @extends Reservation
*/
var RentalCarReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "RentalCarReservation";
};
RentalCarReservation = stjs.extend(RentalCarReservation, Reservation, [], function(constructor, prototype) {
/**
* Schema.org/dropoffLocation
* Where a rental car can be dropped off.
*
* @property dropoffLocation
* @type Place
*/
prototype.dropoffLocation = null;
/**
* Schema.org/pickupLocation
* Where a taxi will pick up a passenger or a rental car can be picked up.
*
* @property pickupLocation
* @type Place
*/
prototype.pickupLocation = null;
/**
* Schema.org/pickupTime
* When a taxi will pickup a passenger or a rental car can be picked up.
*
* @property pickupTime
* @type DateTime
*/
prototype.pickupTime = null;
/**
* Schema.org/dropoffTime
* When a rental car can be dropped off.
*
* @property dropoffTime
* @type DateTime
*/
prototype.dropoffTime = null;
}, {dropoffLocation: "Place", pickupLocation: "Place", bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LodgingReservation
* A reservation for lodging at a hotel, motel, inn, etc.\n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations.
*
* @author schema.org
* @class LodgingReservation
* @module org.schema
* @extends Reservation
*/
var LodgingReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "LodgingReservation";
};
LodgingReservation = stjs.extend(LodgingReservation, Reservation, [], function(constructor, prototype) {
/**
* Schema.org/numChildren
* The number of children staying in the unit.
*
* @property numChildren
* @type schema, Integer | schema,QuantitativeValue
*/
prototype.numChildren = null;
/**
* Schema.org/lodgingUnitType
* Textual description of the unit type (including suite vs. room, size of bed, etc.).
*
* @property lodgingUnitType
* @type schema, Text | schema,QualitativeValue
*/
prototype.lodgingUnitType = null;
/**
* Schema.org/numAdults
* The number of adults staying in the unit.
*
* @property numAdults
* @type schema, Integer | schema,QuantitativeValue
*/
prototype.numAdults = null;
/**
* Schema.org/lodgingUnitDescription
* A full description of the lodging unit.
*
* @property lodgingUnitDescription
* @type Text
*/
prototype.lodgingUnitDescription = null;
/**
* Schema.org/checkoutTime
* The latest someone may check out of a lodging establishment.
*
* @property checkoutTime
* @type DateTime
*/
prototype.checkoutTime = null;
/**
* Schema.org/checkinTime
* The earliest someone may check into a lodging establishment.
*
* @property checkinTime
* @type DateTime
*/
prototype.checkinTime = null;
}, {numChildren: "Object", lodgingUnitType: "Object", numAdults: "Object", bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BusReservation
* A reservation for bus travel. \n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use [[Offer]].
*
* @author schema.org
* @class BusReservation
* @module org.schema
* @extends Reservation
*/
var BusReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "BusReservation";
};
BusReservation = stjs.extend(BusReservation, Reservation, [], null, {bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EventReservation
* A reservation for an event like a concert, sporting event, or lecture.\n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use [[Offer]].
*
* @author schema.org
* @class EventReservation
* @module org.schema
* @extends Reservation
*/
var EventReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "EventReservation";
};
EventReservation = stjs.extend(EventReservation, Reservation, [], null, {bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TrainReservation
* A reservation for train travel.\n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use [[Offer]].
*
* @author schema.org
* @class TrainReservation
* @module org.schema
* @extends Reservation
*/
var TrainReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "TrainReservation";
};
TrainReservation = stjs.extend(TrainReservation, Reservation, [], null, {bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TaxiReservation
* A reservation for a taxi.\n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use [[Offer]].
*
* @author schema.org
* @class TaxiReservation
* @module org.schema
* @extends Reservation
*/
var TaxiReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "TaxiReservation";
};
TaxiReservation = stjs.extend(TaxiReservation, Reservation, [], function(constructor, prototype) {
/**
* Schema.org/pickupLocation
* Where a taxi will pick up a passenger or a rental car can be picked up.
*
* @property pickupLocation
* @type Place
*/
prototype.pickupLocation = null;
/**
* Schema.org/pickupTime
* When a taxi will pickup a passenger or a rental car can be picked up.
*
* @property pickupTime
* @type DateTime
*/
prototype.pickupTime = null;
/**
* Schema.org/partySize
* Number of people the reservation should accommodate.
*
* @property partySize
* @type schema, Integer | schema,QuantitativeValue
*/
prototype.partySize = null;
}, {pickupLocation: "Place", partySize: "Object", bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReservationPackage
* A group of multiple reservations with common values for all sub-reservations.
*
* @author schema.org
* @class ReservationPackage
* @module org.schema
* @extends Reservation
*/
var ReservationPackage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "ReservationPackage";
};
ReservationPackage = stjs.extend(ReservationPackage, Reservation, [], function(constructor, prototype) {
/**
* Schema.org/subReservation
* The individual reservations included in the package. Typically a repeated property.
*
* @property subReservation
* @type Reservation
*/
prototype.subReservation = null;
}, {subReservation: "Reservation", bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FlightReservation
* A reservation for air travel.\n\nNote: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use [[Offer]].
*
* @author schema.org
* @class FlightReservation
* @module org.schema
* @extends Reservation
*/
var FlightReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "FlightReservation";
};
FlightReservation = stjs.extend(FlightReservation, Reservation, [], function(constructor, prototype) {
/**
* Schema.org/boardingGroup
* The airline-specific indicator of boarding order / preference.
*
* @property boardingGroup
* @type Text
*/
prototype.boardingGroup = null;
/**
* Schema.org/securityScreening
* The type of security screening the passenger is subject to.
*
* @property securityScreening
* @type Text
*/
prototype.securityScreening = null;
/**
* Schema.org/passengerPriorityStatus
* The priority status assigned to a passenger for security or boarding (e.g. FastTrack or Priority).
*
* @property passengerPriorityStatus
* @type schema, Text | schema,QualitativeValue
*/
prototype.passengerPriorityStatus = null;
/**
* Schema.org/passengerSequenceNumber
* The passenger's sequence number as assigned by the airline.
*
* @property passengerSequenceNumber
* @type Text
*/
prototype.passengerSequenceNumber = null;
}, {passengerPriorityStatus: "Object", bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FoodEstablishmentReservation
* A reservation to dine at a food-related business.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations.
*
* @author schema.org
* @class FoodEstablishmentReservation
* @module org.schema
* @extends Reservation
*/
var FoodEstablishmentReservation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Reservation.call(this);
this.context = "http://schema.org/";
this.type = "FoodEstablishmentReservation";
};
FoodEstablishmentReservation = stjs.extend(FoodEstablishmentReservation, Reservation, [], function(constructor, prototype) {
/**
* Schema.org/startTime
* The startTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to start. For actions that span a period of time, when the action was performed. e.g. John wrote a book from *January* to December.\n\nNote that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
*
* @property startTime
* @type DateTime
*/
prototype.startTime = null;
/**
* Schema.org/partySize
* Number of people the reservation should accommodate.
*
* @property partySize
* @type schema, Integer | schema,QuantitativeValue
*/
prototype.partySize = null;
/**
* Schema.org/endTime
* The endTime of something. For a reserved event or service (e.g. FoodEstablishmentReservation), the time that it is expected to end. For actions that span a period of time, when the action was performed. e.g. John wrote a book from January to *December*.\n\nNote that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions.
*
* @property endTime
* @type DateTime
*/
prototype.endTime = null;
}, {partySize: "Object", bookingAgent: "Object", totalPrice: "Object", broker: "Object", reservationStatus: "ReservationStatusType", programMembershipUsed: "ProgramMembership", provider: "Object", reservationFor: "Thing", reservedTicket: "Ticket", underName: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RadioEpisode
* A radio episode which can be part of a series or season.
*
* @author schema.org
* @class RadioEpisode
* @module org.schema
* @extends Episode
*/
var RadioEpisode = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Episode.call(this);
this.context = "http://schema.org/";
this.type = "RadioEpisode";
};
RadioEpisode = stjs.extend(RadioEpisode, Episode, [], null, {director: "Person", partOfSeason: "CreativeWorkSeason", actor: "Person", episodeNumber: "Object", musicBy: "Object", actors: "Person", trailer: "VideoObject", productionCompany: "Organization", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TVEpisode
* A TV episode which can be part of a series or season.
*
* @author schema.org
* @class TVEpisode
* @module org.schema
* @extends Episode
*/
var TVEpisode = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Episode.call(this);
this.context = "http://schema.org/";
this.type = "TVEpisode";
};
TVEpisode = stjs.extend(TVEpisode, Episode, [], function(constructor, prototype) {
/**
* Schema.org/subtitleLanguage
* Languages in which subtitles/captions are available, in [IETF BCP 47 standard format](http://tools.ietf.org/html/bcp47).
*
* @property subtitleLanguage
* @type schema, Text | schema,Language
*/
prototype.subtitleLanguage = null;
/**
* Schema.org/countryOfOrigin
* The country of the principal offices of the production company or individual responsible for the movie or program.
*
* @property countryOfOrigin
* @type Country
*/
prototype.countryOfOrigin = null;
/**
* Schema.org/partOfTVSeries
* The TV series to which this episode or season belongs.
*
* @property partOfTVSeries
* @type TVSeries
*/
prototype.partOfTVSeries = null;
}, {subtitleLanguage: "Object", countryOfOrigin: "Country", partOfTVSeries: "TVSeries", director: "Person", partOfSeason: "CreativeWorkSeason", actor: "Person", episodeNumber: "Object", musicBy: "Object", actors: "Person", trailer: "VideoObject", productionCompany: "Organization", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TVSeries
* CreativeWorkSeries dedicated to TV broadcast and associated online delivery.
*
* @author schema.org
* @class TVSeries
* @module org.schema
* @extends CreativeWorkSeries
*/
var TVSeries = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeries.call(this);
this.context = "http://schema.org/";
this.type = "TVSeries";
};
TVSeries = stjs.extend(TVSeries, CreativeWorkSeries, [], function(constructor, prototype) {
/**
* Schema.org/episodes
* An episode of a TV/radio series or season.
*
* @property episodes
* @type Episode
*/
prototype.episodes = null;
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/countryOfOrigin
* The country of the principal offices of the production company or individual responsible for the movie or program.
*
* @property countryOfOrigin
* @type Country
*/
prototype.countryOfOrigin = null;
/**
* Schema.org/episode
* An episode of a tv, radio or game media within a series or season.
*
* @property episode
* @type Episode
*/
prototype.episode = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/containsSeason
* A season that is part of the media series.
*
* @property containsSeason
* @type CreativeWorkSeason
*/
prototype.containsSeason = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/seasons
* A season in a media series.
*
* @property seasons
* @type CreativeWorkSeason
*/
prototype.seasons = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/numberOfSeasons
* The number of seasons in this series.
*
* @property numberOfSeasons
* @type Integer
*/
prototype.numberOfSeasons = null;
/**
* Schema.org/season
* A season in a media series.
*
* @property season
* @type CreativeWorkSeason
*/
prototype.season = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/numberOfEpisodes
* The number of episodes in this season or series.
*
* @property numberOfEpisodes
* @type Integer
*/
prototype.numberOfEpisodes = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
}, {episodes: "Episode", director: "Person", countryOfOrigin: "Country", episode: "Episode", actor: "Person", containsSeason: "CreativeWorkSeason", musicBy: "Object", actors: "Person", seasons: "CreativeWorkSeason", trailer: "VideoObject", season: "CreativeWorkSeason", productionCompany: "Organization", directors: "Person", startDate: "Object", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RadioSeries
* CreativeWorkSeries dedicated to radio broadcast and associated online delivery.
*
* @author schema.org
* @class RadioSeries
* @module org.schema
* @extends CreativeWorkSeries
*/
var RadioSeries = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeries.call(this);
this.context = "http://schema.org/";
this.type = "RadioSeries";
};
RadioSeries = stjs.extend(RadioSeries, CreativeWorkSeries, [], function(constructor, prototype) {
/**
* Schema.org/episodes
* An episode of a TV/radio series or season.
*
* @property episodes
* @type Episode
*/
prototype.episodes = null;
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/episode
* An episode of a tv, radio or game media within a series or season.
*
* @property episode
* @type Episode
*/
prototype.episode = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/containsSeason
* A season that is part of the media series.
*
* @property containsSeason
* @type CreativeWorkSeason
*/
prototype.containsSeason = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/seasons
* A season in a media series.
*
* @property seasons
* @type CreativeWorkSeason
*/
prototype.seasons = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/numberOfSeasons
* The number of seasons in this series.
*
* @property numberOfSeasons
* @type Integer
*/
prototype.numberOfSeasons = null;
/**
* Schema.org/season
* A season in a media series.
*
* @property season
* @type CreativeWorkSeason
*/
prototype.season = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/numberOfEpisodes
* The number of episodes in this season or series.
*
* @property numberOfEpisodes
* @type Integer
*/
prototype.numberOfEpisodes = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
}, {episodes: "Episode", director: "Person", episode: "Episode", actor: "Person", containsSeason: "CreativeWorkSeason", musicBy: "Object", actors: "Person", seasons: "CreativeWorkSeason", trailer: "VideoObject", season: "CreativeWorkSeason", productionCompany: "Organization", directors: "Person", startDate: "Object", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Periodical
* A publication in any medium issued in successive parts bearing numerical or chronological designations and intended, such as a magazine, scholarly journal, or newspaper to continue indefinitely.\n\nSee also [blog post](http://blog.schema.org/2014/09/schemaorg-support-for-bibliographic_2.html).
*
* @author schema.org
* @class Periodical
* @module org.schema
* @extends CreativeWorkSeries
*/
var Periodical = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeries.call(this);
this.context = "http://schema.org/";
this.type = "Periodical";
};
Periodical = stjs.extend(Periodical, CreativeWorkSeries, [], function(constructor, prototype) {
/**
* Schema.org/issn
* The International Standard Serial Number (ISSN) that identifies this periodical. You can repeat this property to (for example) identify different formats of this periodical.
*
* @property issn
* @type Text
*/
prototype.issn = null;
}, {startDate: "Object", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MovieSeries
* A series of movies. Included movies can be indicated with the hasPart property.
*
* @author schema.org
* @class MovieSeries
* @module org.schema
* @extends CreativeWorkSeries
*/
var MovieSeries = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeries.call(this);
this.context = "http://schema.org/";
this.type = "MovieSeries";
};
MovieSeries = stjs.extend(MovieSeries, CreativeWorkSeries, [], function(constructor, prototype) {
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
}, {director: "Person", actor: "Person", musicBy: "Object", actors: "Person", trailer: "VideoObject", productionCompany: "Organization", directors: "Person", startDate: "Object", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VideoGameSeries
* A video game series.
*
* @author schema.org
* @class VideoGameSeries
* @module org.schema
* @extends CreativeWorkSeries
*/
var VideoGameSeries = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeries.call(this);
this.context = "http://schema.org/";
this.type = "VideoGameSeries";
};
VideoGameSeries = stjs.extend(VideoGameSeries, CreativeWorkSeries, [], function(constructor, prototype) {
/**
* Schema.org/gameLocation
* Real or fictional location of the game (or part of game).
*
* @property gameLocation
* @type schema, PostalAddress | schema,Place | schema,URL
*/
prototype.gameLocation = null;
/**
* Schema.org/episodes
* An episode of a TV/radio series or season.
*
* @property episodes
* @type Episode
*/
prototype.episodes = null;
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/cheatCode
* Cheat codes to the game.
*
* @property cheatCode
* @type CreativeWork
*/
prototype.cheatCode = null;
/**
* Schema.org/episode
* An episode of a tv, radio or game media within a series or season.
*
* @property episode
* @type Episode
*/
prototype.episode = null;
/**
* Schema.org/gamePlatform
* The electronic systems used to play <a href="http://en.wikipedia.org/wiki/Category:Video_game_platforms">video games</a>.
*
* @property gamePlatform
* @type schema, URL | schema,Text | schema,Thing
*/
prototype.gamePlatform = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/containsSeason
* A season that is part of the media series.
*
* @property containsSeason
* @type CreativeWorkSeason
*/
prototype.containsSeason = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/seasons
* A season in a media series.
*
* @property seasons
* @type CreativeWorkSeason
*/
prototype.seasons = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/playMode
* Indicates whether this game is multi-player, co-op or single-player. The game can be marked as multi-player, co-op and single-player at the same time.
*
* @property playMode
* @type GamePlayMode
*/
prototype.playMode = null;
/**
* Schema.org/quest
* The task that a player-controlled character, or group of characters may complete in order to gain a reward.
*
* @property quest
* @type Thing
*/
prototype.quest = null;
/**
* Schema.org/numberOfSeasons
* The number of seasons in this series.
*
* @property numberOfSeasons
* @type Integer
*/
prototype.numberOfSeasons = null;
/**
* Schema.org/season
* A season in a media series.
*
* @property season
* @type CreativeWorkSeason
*/
prototype.season = null;
/**
* Schema.org/gameItem
* An item is an object within the game world that can be collected by a player or, occasionally, a non-player character.
*
* @property gameItem
* @type Thing
*/
prototype.gameItem = null;
/**
* Schema.org/numberOfPlayers
* Indicate how many people can play this game (minimum, maximum, or range).
*
* @property numberOfPlayers
* @type QuantitativeValue
*/
prototype.numberOfPlayers = null;
/**
* Schema.org/productionCompany
* The production company or studio responsible for the item e.g. series, video game, episode etc.
*
* @property productionCompany
* @type Organization
*/
prototype.productionCompany = null;
/**
* Schema.org/numberOfEpisodes
* The number of episodes in this season or series.
*
* @property numberOfEpisodes
* @type Integer
*/
prototype.numberOfEpisodes = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
/**
* Schema.org/characterAttribute
* A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage).
*
* @property characterAttribute
* @type Thing
*/
prototype.characterAttribute = null;
}, {gameLocation: "Object", episodes: "Episode", director: "Person", cheatCode: "CreativeWork", episode: "Episode", gamePlatform: "Object", actor: "Person", containsSeason: "CreativeWorkSeason", musicBy: "Object", actors: "Person", seasons: "CreativeWorkSeason", trailer: "VideoObject", playMode: "GamePlayMode", quest: "Thing", season: "CreativeWorkSeason", gameItem: "Thing", numberOfPlayers: "QuantitativeValue", productionCompany: "Organization", directors: "Person", characterAttribute: "Thing", startDate: "Object", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BookSeries
* A series of books. Included books can be indicated with the hasPart property.
*
* @author schema.org
* @class BookSeries
* @module org.schema
* @extends CreativeWorkSeries
*/
var BookSeries = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeries.call(this);
this.context = "http://schema.org/";
this.type = "BookSeries";
};
BookSeries = stjs.extend(BookSeries, CreativeWorkSeries, [], null, {startDate: "Object", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ClaimReview
* A fact-checking review of claims made (or reported) in some creative work (referenced via itemReviewed).
*
* @author schema.org
* @class ClaimReview
* @module org.schema
* @extends Review
*/
var ClaimReview = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Review.call(this);
this.context = "http://schema.org/";
this.type = "ClaimReview";
};
ClaimReview = stjs.extend(ClaimReview, Review, [], function(constructor, prototype) {
/**
* Schema.org/claimReviewed
* A short summary of the specific claims reviewed in a ClaimReview.
*
* @property claimReviewed
* @type Text
*/
prototype.claimReviewed = null;
}, {reviewRating: "Rating", itemReviewed: "Thing", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WPHeader
* The header section of the page.
*
* @author schema.org
* @class WPHeader
* @module org.schema
* @extends WebPageElement
*/
var WPHeader = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPageElement.call(this);
this.context = "http://schema.org/";
this.type = "WPHeader";
};
WPHeader = stjs.extend(WPHeader, WebPageElement, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SiteNavigationElement
* A navigation element of the page.
*
* @author schema.org
* @class SiteNavigationElement
* @module org.schema
* @extends WebPageElement
*/
var SiteNavigationElement = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPageElement.call(this);
this.context = "http://schema.org/";
this.type = "SiteNavigationElement";
};
SiteNavigationElement = stjs.extend(SiteNavigationElement, WebPageElement, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WPFooter
* The footer section of the page.
*
* @author schema.org
* @class WPFooter
* @module org.schema
* @extends WebPageElement
*/
var WPFooter = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPageElement.call(this);
this.context = "http://schema.org/";
this.type = "WPFooter";
};
WPFooter = stjs.extend(WPFooter, WebPageElement, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WPAdBlock
* An advertising section of the page.
*
* @author schema.org
* @class WPAdBlock
* @module org.schema
* @extends WebPageElement
*/
var WPAdBlock = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPageElement.call(this);
this.context = "http://schema.org/";
this.type = "WPAdBlock";
};
WPAdBlock = stjs.extend(WPAdBlock, WebPageElement, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Table
* A table on a Web page.
*
* @author schema.org
* @class Table
* @module org.schema
* @extends WebPageElement
*/
var Table = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPageElement.call(this);
this.context = "http://schema.org/";
this.type = "Table";
};
Table = stjs.extend(Table, WebPageElement, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WPSideBar
* A sidebar section of the page.
*
* @author schema.org
* @class WPSideBar
* @module org.schema
* @extends WebPageElement
*/
var WPSideBar = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPageElement.call(this);
this.context = "http://schema.org/";
this.type = "WPSideBar";
};
WPSideBar = stjs.extend(WPSideBar, WebPageElement, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VideoGameClip
* A short segment/part of a video game.
*
* @author schema.org
* @class VideoGameClip
* @module org.schema
* @extends Clip
*/
var VideoGameClip = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Clip.call(this);
this.context = "http://schema.org/";
this.type = "VideoGameClip";
};
VideoGameClip = stjs.extend(VideoGameClip, Clip, [], null, {clipNumber: "Object", director: "Person", partOfEpisode: "Episode", partOfSeason: "CreativeWorkSeason", actor: "Person", musicBy: "Object", actors: "Person", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TVClip
* A short TV program or a segment/part of a TV program.
*
* @author schema.org
* @class TVClip
* @module org.schema
* @extends Clip
*/
var TVClip = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Clip.call(this);
this.context = "http://schema.org/";
this.type = "TVClip";
};
TVClip = stjs.extend(TVClip, Clip, [], function(constructor, prototype) {
/**
* Schema.org/partOfTVSeries
* The TV series to which this episode or season belongs.
*
* @property partOfTVSeries
* @type TVSeries
*/
prototype.partOfTVSeries = null;
}, {partOfTVSeries: "TVSeries", clipNumber: "Object", director: "Person", partOfEpisode: "Episode", partOfSeason: "CreativeWorkSeason", actor: "Person", musicBy: "Object", actors: "Person", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RadioClip
* A short radio program or a segment/part of a radio program.
*
* @author schema.org
* @class RadioClip
* @module org.schema
* @extends Clip
*/
var RadioClip = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Clip.call(this);
this.context = "http://schema.org/";
this.type = "RadioClip";
};
RadioClip = stjs.extend(RadioClip, Clip, [], null, {clipNumber: "Object", director: "Person", partOfEpisode: "Episode", partOfSeason: "CreativeWorkSeason", actor: "Person", musicBy: "Object", actors: "Person", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MovieClip
* A short segment/part of a movie.
*
* @author schema.org
* @class MovieClip
* @module org.schema
* @extends Clip
*/
var MovieClip = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Clip.call(this);
this.context = "http://schema.org/";
this.type = "MovieClip";
};
MovieClip = stjs.extend(MovieClip, Clip, [], null, {clipNumber: "Object", director: "Person", partOfEpisode: "Episode", partOfSeason: "CreativeWorkSeason", actor: "Person", musicBy: "Object", actors: "Person", directors: "Person", partOfSeries: "CreativeWorkSeries", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Answer
* An answer offered to a question; perhaps correct, perhaps opinionated or wrong.
*
* @author schema.org
* @class Answer
* @module org.schema
* @extends Comment
*/
var Answer = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Comment.call(this);
this.context = "http://schema.org/";
this.type = "Answer";
};
Answer = stjs.extend(Answer, Comment, [], null, {parentItem: "Question", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RadioSeason
* Season dedicated to radio broadcast and associated online delivery.
*
* @author schema.org
* @class RadioSeason
* @module org.schema
* @extends CreativeWorkSeason
*/
var RadioSeason = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeason.call(this);
this.context = "http://schema.org/";
this.type = "RadioSeason";
};
RadioSeason = stjs.extend(RadioSeason, CreativeWorkSeason, [], null, {episodes: "Episode", director: "Person", seasonNumber: "Object", episode: "Episode", actor: "Person", trailer: "VideoObject", startDate: "Object", productionCompany: "Organization", partOfSeries: "CreativeWorkSeries", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TVSeason
* Season dedicated to TV broadcast and associated online delivery.
*
* @author schema.org
* @class TVSeason
* @module org.schema
* @extends CreativeWorkSeason
*/
var TVSeason = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreativeWorkSeason.call(this);
this.context = "http://schema.org/";
this.type = "TVSeason";
};
TVSeason = stjs.extend(TVSeason, CreativeWorkSeason, [], function(constructor, prototype) {
/**
* Schema.org/countryOfOrigin
* The country of the principal offices of the production company or individual responsible for the movie or program.
*
* @property countryOfOrigin
* @type Country
*/
prototype.countryOfOrigin = null;
/**
* Schema.org/partOfTVSeries
* The TV series to which this episode or season belongs.
*
* @property partOfTVSeries
* @type TVSeries
*/
prototype.partOfTVSeries = null;
}, {countryOfOrigin: "Country", partOfTVSeries: "TVSeries", episodes: "Episode", director: "Person", seasonNumber: "Object", episode: "Episode", actor: "Person", trailer: "VideoObject", startDate: "Object", productionCompany: "Organization", partOfSeries: "CreativeWorkSeries", endDate: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EmailMessage
* An email message.
*
* @author schema.org
* @class EmailMessage
* @module org.schema
* @extends Message
*/
var EmailMessage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Message.call(this);
this.context = "http://schema.org/";
this.type = "EmailMessage";
};
EmailMessage = stjs.extend(EmailMessage, Message, [], null, {sender: "Object", messageAttachment: "CreativeWork", recipient: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/NoteDigitalDocument
* A file containing a note, primarily for the author.
*
* @author schema.org
* @class NoteDigitalDocument
* @module org.schema
* @extends DigitalDocument
*/
var NoteDigitalDocument = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
DigitalDocument.call(this);
this.context = "http://schema.org/";
this.type = "NoteDigitalDocument";
};
NoteDigitalDocument = stjs.extend(NoteDigitalDocument, DigitalDocument, [], null, {hasDigitalDocumentPermission: "DigitalDocumentPermission", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SpreadsheetDigitalDocument
* A spreadsheet file.
*
* @author schema.org
* @class SpreadsheetDigitalDocument
* @module org.schema
* @extends DigitalDocument
*/
var SpreadsheetDigitalDocument = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
DigitalDocument.call(this);
this.context = "http://schema.org/";
this.type = "SpreadsheetDigitalDocument";
};
SpreadsheetDigitalDocument = stjs.extend(SpreadsheetDigitalDocument, DigitalDocument, [], null, {hasDigitalDocumentPermission: "DigitalDocumentPermission", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PresentationDigitalDocument
* A file containing slides or used for a presentation.
*
* @author schema.org
* @class PresentationDigitalDocument
* @module org.schema
* @extends DigitalDocument
*/
var PresentationDigitalDocument = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
DigitalDocument.call(this);
this.context = "http://schema.org/";
this.type = "PresentationDigitalDocument";
};
PresentationDigitalDocument = stjs.extend(PresentationDigitalDocument, DigitalDocument, [], null, {hasDigitalDocumentPermission: "DigitalDocumentPermission", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TextDigitalDocument
* A file composed primarily of text.
*
* @author schema.org
* @class TextDigitalDocument
* @module org.schema
* @extends DigitalDocument
*/
var TextDigitalDocument = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
DigitalDocument.call(this);
this.context = "http://schema.org/";
this.type = "TextDigitalDocument";
};
TextDigitalDocument = stjs.extend(TextDigitalDocument, DigitalDocument, [], null, {hasDigitalDocumentPermission: "DigitalDocumentPermission", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/NewsArticle
* A news article.
*
* @author schema.org
* @class NewsArticle
* @module org.schema
* @extends Article
*/
var NewsArticle = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Article.call(this);
this.context = "http://schema.org/";
this.type = "NewsArticle";
};
NewsArticle = stjs.extend(NewsArticle, Article, [], function(constructor, prototype) {
/**
* Schema.org/printPage
* If this NewsArticle appears in print, this field indicates the name of the page on which the article is found. Please note that this field is intended for the exact page name (e.g. A5, B18).
*
* @property printPage
* @type Text
*/
prototype.printPage = null;
/**
* Schema.org/dateline
* The location where the NewsArticle was produced.
*
* @property dateline
* @type Text
*/
prototype.dateline = null;
/**
* Schema.org/printEdition
* The edition of the print product in which the NewsArticle appears.
*
* @property printEdition
* @type Text
*/
prototype.printEdition = null;
/**
* Schema.org/printSection
* If this NewsArticle appears in print, this field indicates the print section in which the article appeared.
*
* @property printSection
* @type Text
*/
prototype.printSection = null;
/**
* Schema.org/printColumn
* The number of the column in which the NewsArticle appears in the print edition.
*
* @property printColumn
* @type Text
*/
prototype.printColumn = null;
}, {pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SocialMediaPosting
* A post to a social media platform, including blog posts, tweets, Facebook posts, etc.
*
* @author schema.org
* @class SocialMediaPosting
* @module org.schema
* @extends Article
*/
var SocialMediaPosting = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Article.call(this);
this.context = "http://schema.org/";
this.type = "SocialMediaPosting";
};
SocialMediaPosting = stjs.extend(SocialMediaPosting, Article, [], function(constructor, prototype) {
/**
* Schema.org/sharedContent
* A CreativeWork such as an image, video, or audio clip shared as part of this posting.
*
* @property sharedContent
* @type CreativeWork
*/
prototype.sharedContent = null;
}, {sharedContent: "CreativeWork", pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TechArticle
* A technical article - Example: How-to (task) topics, step-by-step, procedural troubleshooting, specifications, etc.
*
* @author schema.org
* @class TechArticle
* @module org.schema
* @extends Article
*/
var TechArticle = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Article.call(this);
this.context = "http://schema.org/";
this.type = "TechArticle";
};
TechArticle = stjs.extend(TechArticle, Article, [], function(constructor, prototype) {
/**
* Schema.org/dependencies
* Prerequisites needed to fulfill steps in article.
*
* @property dependencies
* @type Text
*/
prototype.dependencies = null;
/**
* Schema.org/proficiencyLevel
* Proficiency needed for this content; expected values: 'Beginner', 'Expert'.
*
* @property proficiencyLevel
* @type Text
*/
prototype.proficiencyLevel = null;
}, {pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ScholarlyArticle
* A scholarly article.
*
* @author schema.org
* @class ScholarlyArticle
* @module org.schema
* @extends Article
*/
var ScholarlyArticle = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Article.call(this);
this.context = "http://schema.org/";
this.type = "ScholarlyArticle";
};
ScholarlyArticle = stjs.extend(ScholarlyArticle, Article, [], null, {pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Report
* A Report generated by governmental or non-governmental organization.
*
* @author schema.org
* @class Report
* @module org.schema
* @extends Article
*/
var Report = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Article.call(this);
this.context = "http://schema.org/";
this.type = "Report";
};
Report = stjs.extend(Report, Article, [], function(constructor, prototype) {
/**
* Schema.org/reportNumber
* The number or other unique designator assigned to a Report by the publishing organization.
*
* @property reportNumber
* @type Text
*/
prototype.reportNumber = null;
}, {pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicRelease
* A MusicRelease is a specific release of a music album.
*
* @author schema.org
* @class MusicRelease
* @module org.schema
* @extends MusicPlaylist
*/
var MusicRelease = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MusicPlaylist.call(this);
this.context = "http://schema.org/";
this.type = "MusicRelease";
};
MusicRelease = stjs.extend(MusicRelease, MusicPlaylist, [], function(constructor, prototype) {
/**
* Schema.org/creditedTo
* The group the release is credited to if different than the byArtist. For example, Red and Blue is credited to "Stefani Germanotta Band", but by Lady Gaga.
*
* @property creditedTo
* @type schema, Organization | schema,Person
*/
prototype.creditedTo = null;
/**
* Schema.org/recordLabel
* The label that issued the release.
*
* @property recordLabel
* @type Organization
*/
prototype.recordLabel = null;
/**
* Schema.org/musicReleaseFormat
* Format of this release (the type of recording media used, ie. compact disc, digital media, LP, etc.).
*
* @property musicReleaseFormat
* @type MusicReleaseFormatType
*/
prototype.musicReleaseFormat = null;
/**
* Schema.org/catalogNumber
* The catalog number for the release.
*
* @property catalogNumber
* @type Text
*/
prototype.catalogNumber = null;
/**
* Schema.org/duration
* The duration of the item (movie, audio recording, event, etc.) in [ISO 8601 date format](http://en.wikipedia.org/wiki/ISO_8601).
*
* @property duration
* @type Duration
*/
prototype.duration = null;
/**
* Schema.org/releaseOf
* The album this is a release of.
*
* @property releaseOf
* @type MusicAlbum
*/
prototype.releaseOf = null;
}, {creditedTo: "Object", recordLabel: "Organization", musicReleaseFormat: "MusicReleaseFormatType", duration: "Duration", releaseOf: "MusicAlbum", tracks: "MusicRecording", track: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicAlbum
* A collection of music tracks.
*
* @author schema.org
* @class MusicAlbum
* @module org.schema
* @extends MusicPlaylist
*/
var MusicAlbum = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MusicPlaylist.call(this);
this.context = "http://schema.org/";
this.type = "MusicAlbum";
};
MusicAlbum = stjs.extend(MusicAlbum, MusicPlaylist, [], function(constructor, prototype) {
/**
* Schema.org/albumReleaseType
* The kind of release which this album is: single, EP or album.
*
* @property albumReleaseType
* @type MusicAlbumReleaseType
*/
prototype.albumReleaseType = null;
/**
* Schema.org/albumProductionType
* Classification of the album by it's type of content: soundtrack, live album, studio album, etc.
*
* @property albumProductionType
* @type MusicAlbumProductionType
*/
prototype.albumProductionType = null;
/**
* Schema.org/albumRelease
* A release of this album.
*
* @property albumRelease
* @type MusicRelease
*/
prototype.albumRelease = null;
/**
* Schema.org/byArtist
* The artist that performed this album or recording.
*
* @property byArtist
* @type MusicGroup
*/
prototype.byArtist = null;
}, {albumReleaseType: "MusicAlbumReleaseType", albumProductionType: "MusicAlbumProductionType", albumRelease: "MusicRelease", byArtist: "MusicGroup", tracks: "MusicRecording", track: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MobileApplication
* A software application designed specifically to work well on a mobile device such as a telephone.
*
* @author schema.org
* @class MobileApplication
* @module org.schema
* @extends SoftwareApplication
*/
var MobileApplication = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SoftwareApplication.call(this);
this.context = "http://schema.org/";
this.type = "MobileApplication";
};
MobileApplication = stjs.extend(MobileApplication, SoftwareApplication, [], function(constructor, prototype) {
/**
* Schema.org/carrierRequirements
* Specifies specific carrier(s) requirements for the application (e.g. an application may only work on a specific carrier network).
*
* @property carrierRequirements
* @type Text
*/
prototype.carrierRequirements = null;
}, {storageRequirements: "Object", softwareAddOn: "SoftwareApplication", supportingData: "DataFeed", memoryRequirements: "Object", applicationSubCategory: "Object", featureList: "Object", softwareHelp: "CreativeWork", screenshot: "Object", requirements: "Object", applicationCategory: "Object", releaseNotes: "Object", softwareRequirements: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WebApplication
* Web applications.
*
* @author schema.org
* @class WebApplication
* @module org.schema
* @extends SoftwareApplication
*/
var WebApplication = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SoftwareApplication.call(this);
this.context = "http://schema.org/";
this.type = "WebApplication";
};
WebApplication = stjs.extend(WebApplication, SoftwareApplication, [], function(constructor, prototype) {
/**
* Schema.org/browserRequirements
* Specifies browser requirements in human-readable text. For example, 'requires HTML5 support'.
*
* @property browserRequirements
* @type Text
*/
prototype.browserRequirements = null;
}, {storageRequirements: "Object", softwareAddOn: "SoftwareApplication", supportingData: "DataFeed", memoryRequirements: "Object", applicationSubCategory: "Object", featureList: "Object", softwareHelp: "CreativeWork", screenshot: "Object", requirements: "Object", applicationCategory: "Object", releaseNotes: "Object", softwareRequirements: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CheckoutPage
* Web page type: Checkout page.
*
* @author schema.org
* @class CheckoutPage
* @module org.schema
* @extends WebPage
*/
var CheckoutPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "CheckoutPage";
};
CheckoutPage = stjs.extend(CheckoutPage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ItemPage
* A page devoted to a single item, such as a particular product or hotel.
*
* @author schema.org
* @class ItemPage
* @module org.schema
* @extends WebPage
*/
var ItemPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "ItemPage";
};
ItemPage = stjs.extend(ItemPage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ContactPage
* Web page type: Contact page.
*
* @author schema.org
* @class ContactPage
* @module org.schema
* @extends WebPage
*/
var ContactPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "ContactPage";
};
ContactPage = stjs.extend(ContactPage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SearchResultsPage
* Web page type: Search results page.
*
* @author schema.org
* @class SearchResultsPage
* @module org.schema
* @extends WebPage
*/
var SearchResultsPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "SearchResultsPage";
};
SearchResultsPage = stjs.extend(SearchResultsPage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CollectionPage
* Web page type: Collection page.
*
* @author schema.org
* @class CollectionPage
* @module org.schema
* @extends WebPage
*/
var CollectionPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "CollectionPage";
};
CollectionPage = stjs.extend(CollectionPage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ProfilePage
* Web page type: Profile page.
*
* @author schema.org
* @class ProfilePage
* @module org.schema
* @extends WebPage
*/
var ProfilePage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "ProfilePage";
};
ProfilePage = stjs.extend(ProfilePage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AboutPage
* Web page type: About page.
*
* @author schema.org
* @class AboutPage
* @module org.schema
* @extends WebPage
*/
var AboutPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "AboutPage";
};
AboutPage = stjs.extend(AboutPage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/QAPage
* A QAPage is a WebPage focussed on a specific Question and its Answer(s), e.g. in a question answering site or documenting Frequently Asked Questions (FAQs).
*
* @author schema.org
* @class QAPage
* @module org.schema
* @extends WebPage
*/
var QAPage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
WebPage.call(this);
this.context = "http://schema.org/";
this.type = "QAPage";
};
QAPage = stjs.extend(QAPage, WebPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DataFeed
* A single feed providing structured information about one or more entities or topics.
*
* @author schema.org
* @class DataFeed
* @module org.schema
* @extends Dataset
*/
var DataFeed = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Dataset.call(this);
this.context = "http://schema.org/";
this.type = "DataFeed";
};
DataFeed = stjs.extend(DataFeed, Dataset, [], function(constructor, prototype) {
/**
* Schema.org/dataFeedElement
* An item within in a data feed. Data feeds may have many elements.
*
* @property dataFeedElement
* @type schema, Text | schema,DataFeedItem | schema,Thing
*/
prototype.dataFeedElement = null;
}, {dataFeedElement: "Object", spatial: "Place", includedDataCatalog: "DataCatalog", includedInDataCatalog: "DataCatalog", distribution: "DataDownload", catalog: "DataCatalog", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VideoGame
* A video game is an electronic game that involves human interaction with a user interface to generate visual feedback on a video device.
*
* @author schema.org
* @class VideoGame
* @module org.schema
* @extends Game
*/
var VideoGame = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Game.call(this);
this.context = "http://schema.org/";
this.type = "VideoGame";
};
VideoGame = stjs.extend(VideoGame, Game, [], function(constructor, prototype) {
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/gameServer
* The server on which it is possible to play the game.
*
* @property gameServer
* @type GameServer
*/
prototype.gameServer = null;
/**
* Schema.org/cheatCode
* Cheat codes to the game.
*
* @property cheatCode
* @type CreativeWork
*/
prototype.cheatCode = null;
/**
* Schema.org/gamePlatform
* The electronic systems used to play <a href="http://en.wikipedia.org/wiki/Category:Video_game_platforms">video games</a>.
*
* @property gamePlatform
* @type schema, URL | schema,Text | schema,Thing
*/
prototype.gamePlatform = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/gameTip
* Links to tips, tactics, etc.
*
* @property gameTip
* @type CreativeWork
*/
prototype.gameTip = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/trailer
* The trailer of a movie or tv/radio series, season, episode, etc.
*
* @property trailer
* @type VideoObject
*/
prototype.trailer = null;
/**
* Schema.org/playMode
* Indicates whether this game is multi-player, co-op or single-player. The game can be marked as multi-player, co-op and single-player at the same time.
*
* @property playMode
* @type GamePlayMode
*/
prototype.playMode = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
}, {director: "Person", gameServer: "GameServer", cheatCode: "CreativeWork", gamePlatform: "Object", actor: "Person", gameTip: "CreativeWork", musicBy: "Object", actors: "Person", trailer: "VideoObject", playMode: "GamePlayMode", directors: "Person", gameLocation: "Object", quest: "Thing", gameItem: "Thing", numberOfPlayers: "QuantitativeValue", characterAttribute: "Thing", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DataDownload
* A dataset in downloadable form.
*
* @author schema.org
* @class DataDownload
* @module org.schema
* @extends MediaObject
*/
var DataDownload = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MediaObject.call(this);
this.context = "http://schema.org/";
this.type = "DataDownload";
};
DataDownload = stjs.extend(DataDownload, MediaObject, [], null, {regionsAllowed: "Place", height: "Object", duration: "Duration", width: "Object", associatedArticle: "NewsArticle", productionCompany: "Organization", encodesCreativeWork: "CreativeWork", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicVideoObject
* A music video file.
*
* @author schema.org
* @class MusicVideoObject
* @module org.schema
* @extends MediaObject
*/
var MusicVideoObject = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MediaObject.call(this);
this.context = "http://schema.org/";
this.type = "MusicVideoObject";
};
MusicVideoObject = stjs.extend(MusicVideoObject, MediaObject, [], null, {regionsAllowed: "Place", height: "Object", duration: "Duration", width: "Object", associatedArticle: "NewsArticle", productionCompany: "Organization", encodesCreativeWork: "CreativeWork", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AudioObject
* An audio file.
*
* @author schema.org
* @class AudioObject
* @module org.schema
* @extends MediaObject
*/
var AudioObject = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MediaObject.call(this);
this.context = "http://schema.org/";
this.type = "AudioObject";
};
AudioObject = stjs.extend(AudioObject, MediaObject, [], function(constructor, prototype) {
/**
* Schema.org/transcript
* If this MediaObject is an AudioObject or VideoObject, the transcript of that object.
*
* @property transcript
* @type Text
*/
prototype.transcript = null;
}, {regionsAllowed: "Place", height: "Object", duration: "Duration", width: "Object", associatedArticle: "NewsArticle", productionCompany: "Organization", encodesCreativeWork: "CreativeWork", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ImageObject
* An image file.
*
* @author schema.org
* @class ImageObject
* @module org.schema
* @extends MediaObject
*/
var ImageObject = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MediaObject.call(this);
this.context = "http://schema.org/";
this.type = "ImageObject";
};
ImageObject = stjs.extend(ImageObject, MediaObject, [], function(constructor, prototype) {
/**
* Schema.org/exifData
* exif data for this object.
*
* @property exifData
* @type schema, Text | schema,PropertyValue
*/
prototype.exifData = null;
/**
* Schema.org/thumbnail
* Thumbnail image for an image or video.
*
* @property thumbnail
* @type ImageObject
*/
prototype.thumbnail = null;
/**
* Schema.org/representativeOfPage
* Indicates whether this image is representative of the content of the page.
*
* @property representativeOfPage
* @type Boolean
*/
prototype.representativeOfPage = null;
/**
* Schema.org/caption
* The caption for this object.
*
* @property caption
* @type Text
*/
prototype.caption = null;
}, {exifData: "Object", thumbnail: "ImageObject", regionsAllowed: "Place", height: "Object", duration: "Duration", width: "Object", associatedArticle: "NewsArticle", productionCompany: "Organization", encodesCreativeWork: "CreativeWork", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VideoObject
* A video file.
*
* @author schema.org
* @class VideoObject
* @module org.schema
* @extends MediaObject
*/
var VideoObject = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MediaObject.call(this);
this.context = "http://schema.org/";
this.type = "VideoObject";
};
VideoObject = stjs.extend(VideoObject, MediaObject, [], function(constructor, prototype) {
/**
* Schema.org/director
* A director of e.g. tv, radio, movie, video gaming etc. content, or of an event. Directors can be associated with individual items or with a series, episode, clip.
*
* @property director
* @type Person
*/
prototype.director = null;
/**
* Schema.org/actor
* An actor, e.g. in tv, radio, movie, video games etc., or in an event. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actor
* @type Person
*/
prototype.actor = null;
/**
* Schema.org/thumbnail
* Thumbnail image for an image or video.
*
* @property thumbnail
* @type ImageObject
*/
prototype.thumbnail = null;
/**
* Schema.org/transcript
* If this MediaObject is an AudioObject or VideoObject, the transcript of that object.
*
* @property transcript
* @type Text
*/
prototype.transcript = null;
/**
* Schema.org/musicBy
* The composer of the soundtrack.
*
* @property musicBy
* @type schema, Person | schema,MusicGroup
*/
prototype.musicBy = null;
/**
* Schema.org/actors
* An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip.
*
* @property actors
* @type Person
*/
prototype.actors = null;
/**
* Schema.org/videoQuality
* The quality of the video.
*
* @property videoQuality
* @type Text
*/
prototype.videoQuality = null;
/**
* Schema.org/videoFrameSize
* The frame size of the video.
*
* @property videoFrameSize
* @type Text
*/
prototype.videoFrameSize = null;
/**
* Schema.org/caption
* The caption for this object.
*
* @property caption
* @type Text
*/
prototype.caption = null;
/**
* Schema.org/directors
* A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip.
*
* @property directors
* @type Person
*/
prototype.directors = null;
}, {director: "Person", actor: "Person", thumbnail: "ImageObject", musicBy: "Object", actors: "Person", directors: "Person", regionsAllowed: "Place", height: "Object", duration: "Duration", width: "Object", associatedArticle: "NewsArticle", productionCompany: "Organization", encodesCreativeWork: "CreativeWork", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TheaterGroup
* A theater group or company, for example, the Royal Shakespeare Company or Druid Theatre.
*
* @author schema.org
* @class TheaterGroup
* @module org.schema
* @extends PerformingGroup
*/
var TheaterGroup = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PerformingGroup.call(this);
this.context = "http://schema.org/";
this.type = "TheaterGroup";
};
TheaterGroup = stjs.extend(TheaterGroup, PerformingGroup, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DanceGroup
* A dance group—for example, the Alvin Ailey Dance Theater or Riverdance.
*
* @author schema.org
* @class DanceGroup
* @module org.schema
* @extends PerformingGroup
*/
var DanceGroup = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PerformingGroup.call(this);
this.context = "http://schema.org/";
this.type = "DanceGroup";
};
DanceGroup = stjs.extend(DanceGroup, PerformingGroup, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicGroup
* A musical group, such as a band, an orchestra, or a choir. Can also be a solo musician.
*
* @author schema.org
* @class MusicGroup
* @module org.schema
* @extends PerformingGroup
*/
var MusicGroup = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PerformingGroup.call(this);
this.context = "http://schema.org/";
this.type = "MusicGroup";
};
MusicGroup = stjs.extend(MusicGroup, PerformingGroup, [], function(constructor, prototype) {
/**
* Schema.org/albums
* A collection of music albums.
*
* @property albums
* @type MusicAlbum
*/
prototype.albums = null;
/**
* Schema.org/genre
* Genre of the creative work, broadcast channel or group.
*
* @property genre
* @type schema, URL | schema,Text
*/
prototype.genre = null;
/**
* Schema.org/musicGroupMember
* A member of a music group—for example, John, Paul, George, or Ringo.
*
* @property musicGroupMember
* @type Person
*/
prototype.musicGroupMember = null;
/**
* Schema.org/tracks
* A music recording (track)—usually a single song.
*
* @property tracks
* @type MusicRecording
*/
prototype.tracks = null;
/**
* Schema.org/track
* A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording.
*
* @property track
* @type schema, MusicRecording | schema,ItemList
*/
prototype.track = null;
/**
* Schema.org/album
* A music album.
*
* @property album
* @type MusicAlbum
*/
prototype.album = null;
}, {albums: "MusicAlbum", genre: "Object", musicGroupMember: "Person", tracks: "MusicRecording", track: "Object", album: "MusicAlbum", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CollegeOrUniversity
* A college, university, or other third-level educational institution.
*
* @author schema.org
* @class CollegeOrUniversity
* @module org.schema
* @extends EducationalOrganization
*/
var CollegeOrUniversity = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EducationalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "CollegeOrUniversity";
};
CollegeOrUniversity = stjs.extend(CollegeOrUniversity, EducationalOrganization, [], null, {alumni: "Person", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HighSchool
* A high school.
*
* @author schema.org
* @class HighSchool
* @module org.schema
* @extends EducationalOrganization
*/
var HighSchool = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EducationalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "HighSchool";
};
HighSchool = stjs.extend(HighSchool, EducationalOrganization, [], null, {alumni: "Person", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MiddleSchool
* A middle school (typically for children aged around 11-14, although this varies somewhat).
*
* @author schema.org
* @class MiddleSchool
* @module org.schema
* @extends EducationalOrganization
*/
var MiddleSchool = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EducationalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "MiddleSchool";
};
MiddleSchool = stjs.extend(MiddleSchool, EducationalOrganization, [], null, {alumni: "Person", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Preschool
* A preschool.
*
* @author schema.org
* @class Preschool
* @module org.schema
* @extends EducationalOrganization
*/
var Preschool = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EducationalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "Preschool";
};
Preschool = stjs.extend(Preschool, EducationalOrganization, [], null, {alumni: "Person", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ElementarySchool
* An elementary school.
*
* @author schema.org
* @class ElementarySchool
* @module org.schema
* @extends EducationalOrganization
*/
var ElementarySchool = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EducationalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "ElementarySchool";
};
ElementarySchool = stjs.extend(ElementarySchool, EducationalOrganization, [], null, {alumni: "Person", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/School
* A school.
*
* @author schema.org
* @class School
* @module org.schema
* @extends EducationalOrganization
*/
var School = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EducationalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "School";
};
School = stjs.extend(School, EducationalOrganization, [], null, {alumni: "Person", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Pharmacy
* A pharmacy or drugstore.
*
* @author schema.org
* @class Pharmacy
* @module org.schema
* @extends MedicalOrganization
*/
var Pharmacy = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MedicalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "Pharmacy";
};
Pharmacy = stjs.extend(Pharmacy, MedicalOrganization, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Physician
* A doctor's office.
*
* @author schema.org
* @class Physician
* @module org.schema
* @extends MedicalOrganization
*/
var Physician = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MedicalOrganization.call(this);
this.context = "http://schema.org/";
this.type = "Physician";
};
Physician = stjs.extend(Physician, MedicalOrganization, [], null, {reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ProfessionalService
* Original definition: "provider of professional services."\n\nThe general [[ProfessionalService]] type for local businesses was deprecated due to confusion with [[Service]]. For reference, the types that it included were: [[Dentist]],
* [[AccountingService]], [[Attorney]], [[Notary]], as well as types for several kinds of [[HomeAndConstructionBusiness]]: [[Electrician]], [[GeneralContractor]],
* [[HousePainter]], [[Locksmith]], [[Plumber]], [[RoofingContractor]]. [[LegalService]] was introduced as a more inclusive supertype of [[Attorney]].
*
* @author schema.org
* @class ProfessionalService
* @module org.schema
* @extends LocalBusiness
*/
var ProfessionalService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "ProfessionalService";
};
ProfessionalService = stjs.extend(ProfessionalService, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SelfStorage
* A self-storage facility.
*
* @author schema.org
* @class SelfStorage
* @module org.schema
* @extends LocalBusiness
*/
var SelfStorage = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "SelfStorage";
};
SelfStorage = stjs.extend(SelfStorage, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RecyclingCenter
* A recycling center.
*
* @author schema.org
* @class RecyclingCenter
* @module org.schema
* @extends LocalBusiness
*/
var RecyclingCenter = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "RecyclingCenter";
};
RecyclingCenter = stjs.extend(RecyclingCenter, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GovernmentOffice
* A government office—for example, an IRS or DMV office.
*
* @author schema.org
* @class GovernmentOffice
* @module org.schema
* @extends LocalBusiness
*/
var GovernmentOffice = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "GovernmentOffice";
};
GovernmentOffice = stjs.extend(GovernmentOffice, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ShoppingCenter
* A shopping center or mall.
*
* @author schema.org
* @class ShoppingCenter
* @module org.schema
* @extends LocalBusiness
*/
var ShoppingCenter = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "ShoppingCenter";
};
ShoppingCenter = stjs.extend(ShoppingCenter, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HealthAndBeautyBusiness
* Health and beauty.
*
* @author schema.org
* @class HealthAndBeautyBusiness
* @module org.schema
* @extends LocalBusiness
*/
var HealthAndBeautyBusiness = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "HealthAndBeautyBusiness";
};
HealthAndBeautyBusiness = stjs.extend(HealthAndBeautyBusiness, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Library
* A library.
*
* @author schema.org
* @class Library
* @module org.schema
* @extends LocalBusiness
*/
var Library = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Library";
};
Library = stjs.extend(Library, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TravelAgency
* A travel agency.
*
* @author schema.org
* @class TravelAgency
* @module org.schema
* @extends LocalBusiness
*/
var TravelAgency = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "TravelAgency";
};
TravelAgency = stjs.extend(TravelAgency, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TelevisionStation
* A television station.
*
* @author schema.org
* @class TelevisionStation
* @module org.schema
* @extends LocalBusiness
*/
var TelevisionStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "TelevisionStation";
};
TelevisionStation = stjs.extend(TelevisionStation, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Store
* A retail good store.
*
* @author schema.org
* @class Store
* @module org.schema
* @extends LocalBusiness
*/
var Store = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Store";
};
Store = stjs.extend(Store, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InternetCafe
* An internet cafe.
*
* @author schema.org
* @class InternetCafe
* @module org.schema
* @extends LocalBusiness
*/
var InternetCafe = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "InternetCafe";
};
InternetCafe = stjs.extend(InternetCafe, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DryCleaningOrLaundry
* A dry-cleaning business.
*
* @author schema.org
* @class DryCleaningOrLaundry
* @module org.schema
* @extends LocalBusiness
*/
var DryCleaningOrLaundry = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "DryCleaningOrLaundry";
};
DryCleaningOrLaundry = stjs.extend(DryCleaningOrLaundry, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Dentist
* A dentist.
*
* @author schema.org
* @class Dentist
* @module org.schema
* @extends LocalBusiness
*/
var Dentist = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Dentist";
};
Dentist = stjs.extend(Dentist, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LegalService
* A LegalService is a business that provides legally-oriented services, advice and representation, e.g. law firms.\n\nAs a [[LocalBusiness]] it can be described as a [[provider]] of one or more [[Service]]\(s).
*
* @author schema.org
* @class LegalService
* @module org.schema
* @extends LocalBusiness
*/
var LegalService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "LegalService";
};
LegalService = stjs.extend(LegalService, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FoodEstablishment
* A food-related business.
*
* @author schema.org
* @class FoodEstablishment
* @module org.schema
* @extends LocalBusiness
*/
var FoodEstablishment = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "FoodEstablishment";
};
FoodEstablishment = stjs.extend(FoodEstablishment, LocalBusiness, [], function(constructor, prototype) {
/**
* Schema.org/starRating
* An official rating for a lodging business or food establishment, e.g. from national associations or standards bodies. Use the author property to indicate the rating organization, e.g. as an Organization with name such as (e.g. HOTREC, DEHOGA, WHR, or Hotelstars).
*
* @property starRating
* @type Rating
*/
prototype.starRating = null;
/**
* Schema.org/acceptsReservations
* Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings ```Yes``` or ```No```.
*
* @property acceptsReservations
* @type schema, URL | schema,Boolean | schema,Text
*/
prototype.acceptsReservations = null;
/**
* Schema.org/menu
* Either the actual menu as a structured representation, as text, or a URL of the menu.
*
* @property menu
* @type schema, URL | schema,Text | schema,Menu
*/
prototype.menu = null;
/**
* Schema.org/servesCuisine
* The cuisine of the restaurant.
*
* @property servesCuisine
* @type Text
*/
prototype.servesCuisine = null;
/**
* Schema.org/hasMenu
* Either the actual menu as a structured representation, as text, or a URL of the menu.
*
* @property hasMenu
* @type schema, URL | schema,Text | schema,Menu
*/
prototype.hasMenu = null;
}, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutomotiveBusiness
* Car repair, sales, or parts.
*
* @author schema.org
* @class AutomotiveBusiness
* @module org.schema
* @extends LocalBusiness
*/
var AutomotiveBusiness = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AutomotiveBusiness";
};
AutomotiveBusiness = stjs.extend(AutomotiveBusiness, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EntertainmentBusiness
* A business providing entertainment.
*
* @author schema.org
* @class EntertainmentBusiness
* @module org.schema
* @extends LocalBusiness
*/
var EntertainmentBusiness = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "EntertainmentBusiness";
};
EntertainmentBusiness = stjs.extend(EntertainmentBusiness, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RadioStation
* A radio station.
*
* @author schema.org
* @class RadioStation
* @module org.schema
* @extends LocalBusiness
*/
var RadioStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "RadioStation";
};
RadioStation = stjs.extend(RadioStation, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HomeAndConstructionBusiness
* A construction business.\n\nA HomeAndConstructionBusiness is a [[LocalBusiness]] that provides services around homes and buildings.\n\nAs a [[LocalBusiness]] it can be described as a [[provider]] of one or more [[Service]]\(s).
*
* @author schema.org
* @class HomeAndConstructionBusiness
* @module org.schema
* @extends LocalBusiness
*/
var HomeAndConstructionBusiness = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "HomeAndConstructionBusiness";
};
HomeAndConstructionBusiness = stjs.extend(HomeAndConstructionBusiness, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ChildCare
* A Childcare center.
*
* @author schema.org
* @class ChildCare
* @module org.schema
* @extends LocalBusiness
*/
var ChildCare = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "ChildCare";
};
ChildCare = stjs.extend(ChildCare, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FinancialService
* Financial services business.
*
* @author schema.org
* @class FinancialService
* @module org.schema
* @extends LocalBusiness
*/
var FinancialService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "FinancialService";
};
FinancialService = stjs.extend(FinancialService, LocalBusiness, [], function(constructor, prototype) {
/**
* Schema.org/feesAndCommissionsSpecification
* Description of fees, commissions, and other terms applied either to a class of financial product, or by a financial service organization.
*
* @property feesAndCommissionsSpecification
* @type schema, URL | schema,Text
*/
prototype.feesAndCommissionsSpecification = null;
}, {feesAndCommissionsSpecification: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AnimalShelter
* Animal shelter.
*
* @author schema.org
* @class AnimalShelter
* @module org.schema
* @extends LocalBusiness
*/
var AnimalShelter = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AnimalShelter";
};
AnimalShelter = stjs.extend(AnimalShelter, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EmergencyService
* An emergency service, such as a fire station or ER.
*
* @author schema.org
* @class EmergencyService
* @module org.schema
* @extends LocalBusiness
*/
var EmergencyService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "EmergencyService";
};
EmergencyService = stjs.extend(EmergencyService, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EmploymentAgency
* An employment agency.
*
* @author schema.org
* @class EmploymentAgency
* @module org.schema
* @extends LocalBusiness
*/
var EmploymentAgency = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "EmploymentAgency";
};
EmploymentAgency = stjs.extend(EmploymentAgency, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LodgingBusiness
* A lodging business, such as a motel, hotel, or inn.
*
* @author schema.org
* @class LodgingBusiness
* @module org.schema
* @extends LocalBusiness
*/
var LodgingBusiness = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "LodgingBusiness";
};
LodgingBusiness = stjs.extend(LodgingBusiness, LocalBusiness, [], function(constructor, prototype) {
/**
* Schema.org/audience
* An intended audience, i.e. a group for whom something was created.
*
* @property audience
* @type Audience
*/
prototype.audience = null;
/**
* Schema.org/amenityFeature
* An amenity feature (e.g. a characteristic or service) of the Accommodation. This generic property does not make a statement about whether the feature is included in an offer for the main accommodation or available at extra costs.
*
* @property amenityFeature
* @type LocationFeatureSpecification
*/
prototype.amenityFeature = null;
/**
* Schema.org/availableLanguage
* A language someone may use with the item. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[inLanguage]]
*
* @property availableLanguage
* @type schema, Text | schema,Language
*/
prototype.availableLanguage = null;
/**
* Schema.org/starRating
* An official rating for a lodging business or food establishment, e.g. from national associations or standards bodies. Use the author property to indicate the rating organization, e.g. as an Organization with name such as (e.g. HOTREC, DEHOGA, WHR, or Hotelstars).
*
* @property starRating
* @type Rating
*/
prototype.starRating = null;
/**
* Schema.org/petsAllowed
* Indicates whether pets are allowed to enter the accommodation or lodging business. More detailed information can be put in a text value.
*
* @property petsAllowed
* @type schema, Boolean | schema,Text
*/
prototype.petsAllowed = null;
/**
* Schema.org/checkoutTime
* The latest someone may check out of a lodging establishment.
*
* @property checkoutTime
* @type DateTime
*/
prototype.checkoutTime = null;
/**
* Schema.org/checkinTime
* The earliest someone may check into a lodging establishment.
*
* @property checkinTime
* @type DateTime
*/
prototype.checkinTime = null;
}, {audience: "Audience", amenityFeature: "LocationFeatureSpecification", availableLanguage: "Object", starRating: "Rating", petsAllowed: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TouristInformationCenter
* A tourist information center.
*
* @author schema.org
* @class TouristInformationCenter
* @module org.schema
* @extends LocalBusiness
*/
var TouristInformationCenter = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "TouristInformationCenter";
};
TouristInformationCenter = stjs.extend(TouristInformationCenter, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RealEstateAgent
* A real-estate agent.
*
* @author schema.org
* @class RealEstateAgent
* @module org.schema
* @extends LocalBusiness
*/
var RealEstateAgent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "RealEstateAgent";
};
RealEstateAgent = stjs.extend(RealEstateAgent, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SportsActivityLocation
* A sports location, such as a playing field.
*
* @author schema.org
* @class SportsActivityLocation
* @module org.schema
* @extends LocalBusiness
*/
var SportsActivityLocation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LocalBusiness.call(this);
this.context = "http://schema.org/";
this.type = "SportsActivityLocation";
};
SportsActivityLocation = stjs.extend(SportsActivityLocation, LocalBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SportsTeam
* Organization: Sports team.
*
* @author schema.org
* @class SportsTeam
* @module org.schema
* @extends SportsOrganization
*/
var SportsTeam = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsOrganization.call(this);
this.context = "http://schema.org/";
this.type = "SportsTeam";
};
SportsTeam = stjs.extend(SportsTeam, SportsOrganization, [], function(constructor, prototype) {
/**
* Schema.org/athlete
* A person that acts as performing member of a sports team; a player as opposed to a coach.
*
* @property athlete
* @type Person
*/
prototype.athlete = null;
/**
* Schema.org/coach
* A person that acts in a coaching role for a sports team.
*
* @property coach
* @type Person
*/
prototype.coach = null;
}, {athlete: "Person", coach: "Person", sport: "Object", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Car
* A car is a wheeled, self-powered motor vehicle used for transportation.
*
* @author schema.org
* @class Car
* @module org.schema
* @extends Vehicle
*/
var Car = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Vehicle.call(this);
this.context = "http://schema.org/";
this.type = "Car";
};
Car = stjs.extend(Car, Vehicle, [], null, {driveWheelConfiguration: "Object", numberOfDoors: "Object", vehicleTransmission: "Object", vehicleSeatingCapacity: "Object", cargoVolume: "QuantitativeValue", vehicleEngine: "EngineSpecification", fuelConsumption: "QuantitativeValue", numberOfAirbags: "Object", numberOfPreviousOwners: "Object", numberOfForwardGears: "Object", mileageFromOdometer: "QuantitativeValue", fuelEfficiency: "QuantitativeValue", fuelType: "Object", steeringPosition: "SteeringPositionValue", numberOfAxles: "Object", reviews: "Review", audience: "Audience", isAccessoryOrSparePartFor: "Product", height: "Object", additionalProperty: "PropertyValue", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", depth: "Object", model: "Object", material: "Object", isConsumableFor: "Product", weight: "QuantitativeValue", isSimilarTo: "Object", width: "Object", itemCondition: "OfferItemCondition", aggregateRating: "AggregateRating", manufacturer: "Organization", logo: "Object", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DepartAction
* The act of departing from a place. An agent departs from an fromLocation for a destination, optionally with participants.
*
* @author schema.org
* @class DepartAction
* @module org.schema
* @extends MoveAction
*/
var DepartAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MoveAction.call(this);
this.context = "http://schema.org/";
this.type = "DepartAction";
};
DepartAction = stjs.extend(DepartAction, MoveAction, [], null, {fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TravelAction
* The act of traveling from an fromLocation to a destination by a specified mode of transport, optionally with participants.
*
* @author schema.org
* @class TravelAction
* @module org.schema
* @extends MoveAction
*/
var TravelAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MoveAction.call(this);
this.context = "http://schema.org/";
this.type = "TravelAction";
};
TravelAction = stjs.extend(TravelAction, MoveAction, [], function(constructor, prototype) {
/**
* Schema.org/distance
* The distance travelled, e.g. exercising or travelling.
*
* @property distance
* @type Distance
*/
prototype.distance = null;
}, {distance: "Distance", fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ArriveAction
* The act of arriving at a place. An agent arrives at a destination from a fromLocation, optionally with participants.
*
* @author schema.org
* @class ArriveAction
* @module org.schema
* @extends MoveAction
*/
var ArriveAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
MoveAction.call(this);
this.context = "http://schema.org/";
this.type = "ArriveAction";
};
ArriveAction = stjs.extend(ArriveAction, MoveAction, [], null, {fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WatchAction
* The act of consuming dynamic/moving visual content.
*
* @author schema.org
* @class WatchAction
* @module org.schema
* @extends ConsumeAction
*/
var WatchAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "WatchAction";
};
WatchAction = stjs.extend(WatchAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InstallAction
* The act of installing an application.
*
* @author schema.org
* @class InstallAction
* @module org.schema
* @extends ConsumeAction
*/
var InstallAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "InstallAction";
};
InstallAction = stjs.extend(InstallAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DrinkAction
* The act of swallowing liquids.
*
* @author schema.org
* @class DrinkAction
* @module org.schema
* @extends ConsumeAction
*/
var DrinkAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "DrinkAction";
};
DrinkAction = stjs.extend(DrinkAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EatAction
* The act of swallowing solid objects.
*
* @author schema.org
* @class EatAction
* @module org.schema
* @extends ConsumeAction
*/
var EatAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "EatAction";
};
EatAction = stjs.extend(EatAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ViewAction
* The act of consuming static visual content.
*
* @author schema.org
* @class ViewAction
* @module org.schema
* @extends ConsumeAction
*/
var ViewAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "ViewAction";
};
ViewAction = stjs.extend(ViewAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ListenAction
* The act of consuming audio content.
*
* @author schema.org
* @class ListenAction
* @module org.schema
* @extends ConsumeAction
*/
var ListenAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "ListenAction";
};
ListenAction = stjs.extend(ListenAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UseAction
* The act of applying an object to its intended purpose.
*
* @author schema.org
* @class UseAction
* @module org.schema
* @extends ConsumeAction
*/
var UseAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "UseAction";
};
UseAction = stjs.extend(UseAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReadAction
* The act of consuming written content.
*
* @author schema.org
* @class ReadAction
* @module org.schema
* @extends ConsumeAction
*/
var ReadAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ConsumeAction.call(this);
this.context = "http://schema.org/";
this.type = "ReadAction";
};
ReadAction = stjs.extend(ReadAction, ConsumeAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReplaceAction
* The act of editing a recipient by replacing an old object with a new object.
*
* @author schema.org
* @class ReplaceAction
* @module org.schema
* @extends UpdateAction
*/
var ReplaceAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UpdateAction.call(this);
this.context = "http://schema.org/";
this.type = "ReplaceAction";
};
ReplaceAction = stjs.extend(ReplaceAction, UpdateAction, [], function(constructor, prototype) {
/**
* Schema.org/replacer
* A sub property of object. The object that replaces.
*
* @property replacer
* @type Thing
*/
prototype.replacer = null;
/**
* Schema.org/replacee
* A sub property of object. The object that is being replaced.
*
* @property replacee
* @type Thing
*/
prototype.replacee = null;
}, {replacer: "Thing", replacee: "Thing", targetCollection: "Thing", collection: "Thing", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DeleteAction
* The act of editing a recipient by removing one of its objects.
*
* @author schema.org
* @class DeleteAction
* @module org.schema
* @extends UpdateAction
*/
var DeleteAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UpdateAction.call(this);
this.context = "http://schema.org/";
this.type = "DeleteAction";
};
DeleteAction = stjs.extend(DeleteAction, UpdateAction, [], null, {targetCollection: "Thing", collection: "Thing", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AddAction
* The act of editing by adding an object to a collection.
*
* @author schema.org
* @class AddAction
* @module org.schema
* @extends UpdateAction
*/
var AddAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UpdateAction.call(this);
this.context = "http://schema.org/";
this.type = "AddAction";
};
AddAction = stjs.extend(AddAction, UpdateAction, [], null, {targetCollection: "Thing", collection: "Thing", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BorrowAction
* The act of obtaining an object under an agreement to return it at a later date. Reciprocal of LendAction.\n\nRelated actions:\n\n* [[LendAction]]: Reciprocal of BorrowAction.
*
* @author schema.org
* @class BorrowAction
* @module org.schema
* @extends TransferAction
*/
var BorrowAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "BorrowAction";
};
BorrowAction = stjs.extend(BorrowAction, TransferAction, [], function(constructor, prototype) {
/**
* Schema.org/lender
* A sub property of participant. The person that lends the object being borrowed.
*
* @property lender
* @type schema, Organization | schema,Person
*/
prototype.lender = null;
}, {lender: "Object", fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SendAction
* The act of physically/electronically dispatching an object for transfer from an origin to a destination.Related actions:\n\n* [[ReceiveAction]]: The reciprocal of SendAction.\n* [[GiveAction]]: Unlike GiveAction, SendAction does not imply the transfer of ownership (e.g. I can send you my laptop, but I'm not necessarily giving it to you).
*
* @author schema.org
* @class SendAction
* @module org.schema
* @extends TransferAction
*/
var SendAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "SendAction";
};
SendAction = stjs.extend(SendAction, TransferAction, [], function(constructor, prototype) {
/**
* Schema.org/deliveryMethod
* A sub property of instrument. The method of delivery.
*
* @property deliveryMethod
* @type DeliveryMethod
*/
prototype.deliveryMethod = null;
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {deliveryMethod: "DeliveryMethod", recipient: "Object", fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DownloadAction
* The act of downloading an object.
*
* @author schema.org
* @class DownloadAction
* @module org.schema
* @extends TransferAction
*/
var DownloadAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "DownloadAction";
};
DownloadAction = stjs.extend(DownloadAction, TransferAction, [], null, {fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LendAction
* The act of providing an object under an agreement that it will be returned at a later date. Reciprocal of BorrowAction.\n\nRelated actions:\n\n* [[BorrowAction]]: Reciprocal of LendAction.
*
* @author schema.org
* @class LendAction
* @module org.schema
* @extends TransferAction
*/
var LendAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "LendAction";
};
LendAction = stjs.extend(LendAction, TransferAction, [], function(constructor, prototype) {
/**
* Schema.org/borrower
* A sub property of participant. The person that borrows the object being lent.
*
* @property borrower
* @type Person
*/
prototype.borrower = null;
}, {borrower: "Person", fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReceiveAction
* The act of physically/electronically taking delivery of an object thathas been transferred from an origin to a destination. Reciprocal of SendAction.\n\nRelated actions:\n\n* [[SendAction]]: The reciprocal of ReceiveAction.\n* [[TakeAction]]: Unlike TakeAction, ReceiveAction does not imply that the ownership has been transfered (e.g. I can receive a package, but it does not mean the package is now mine).
*
* @author schema.org
* @class ReceiveAction
* @module org.schema
* @extends TransferAction
*/
var ReceiveAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "ReceiveAction";
};
ReceiveAction = stjs.extend(ReceiveAction, TransferAction, [], function(constructor, prototype) {
/**
* Schema.org/sender
* A sub property of participant. The participant who is at the sending end of the action.
*
* @property sender
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.sender = null;
/**
* Schema.org/deliveryMethod
* A sub property of instrument. The method of delivery.
*
* @property deliveryMethod
* @type DeliveryMethod
*/
prototype.deliveryMethod = null;
}, {sender: "Object", deliveryMethod: "DeliveryMethod", fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GiveAction
* The act of transferring ownership of an object to a destination. Reciprocal of TakeAction.\n\nRelated actions:\n\n* [[TakeAction]]: Reciprocal of GiveAction.\n* [[SendAction]]: Unlike SendAction, GiveAction implies that ownership is being transferred (e.g. I may send my laptop to you, but that doesn't mean I'm giving it to you).
*
* @author schema.org
* @class GiveAction
* @module org.schema
* @extends TransferAction
*/
var GiveAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "GiveAction";
};
GiveAction = stjs.extend(GiveAction, TransferAction, [], function(constructor, prototype) {
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {recipient: "Object", fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReturnAction
* The act of returning to the origin that which was previously received (concrete objects) or taken (ownership).
*
* @author schema.org
* @class ReturnAction
* @module org.schema
* @extends TransferAction
*/
var ReturnAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "ReturnAction";
};
ReturnAction = stjs.extend(ReturnAction, TransferAction, [], function(constructor, prototype) {
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {recipient: "Object", fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TakeAction
* The act of gaining ownership of an object from an origin. Reciprocal of GiveAction.\n\nRelated actions:\n\n* [[GiveAction]]: The reciprocal of TakeAction.\n* [[ReceiveAction]]: Unlike ReceiveAction, TakeAction implies that ownership has been transfered.
*
* @author schema.org
* @class TakeAction
* @module org.schema
* @extends TransferAction
*/
var TakeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TransferAction.call(this);
this.context = "http://schema.org/";
this.type = "TakeAction";
};
TakeAction = stjs.extend(TakeAction, TransferAction, [], null, {fromLocation: "Place", toLocation: "Place", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TrackAction
* An agent tracks an object for updates.\n\nRelated actions:\n\n* [[FollowAction]]: Unlike FollowAction, TrackAction refers to the interest on the location of innanimates objects.\n* [[SubscribeAction]]: Unlike SubscribeAction, TrackAction refers to the interest on the location of innanimate objects.
*
* @author schema.org
* @class TrackAction
* @module org.schema
* @extends FindAction
*/
var TrackAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FindAction.call(this);
this.context = "http://schema.org/";
this.type = "TrackAction";
};
TrackAction = stjs.extend(TrackAction, FindAction, [], function(constructor, prototype) {
/**
* Schema.org/deliveryMethod
* A sub property of instrument. The method of delivery.
*
* @property deliveryMethod
* @type DeliveryMethod
*/
prototype.deliveryMethod = null;
}, {deliveryMethod: "DeliveryMethod", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DiscoverAction
* The act of discovering/finding an object.
*
* @author schema.org
* @class DiscoverAction
* @module org.schema
* @extends FindAction
*/
var DiscoverAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FindAction.call(this);
this.context = "http://schema.org/";
this.type = "DiscoverAction";
};
DiscoverAction = stjs.extend(DiscoverAction, FindAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CheckAction
* An agent inspects, determines, investigates, inquires, or examines an object's accuracy, quality, condition, or state.
*
* @author schema.org
* @class CheckAction
* @module org.schema
* @extends FindAction
*/
var CheckAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FindAction.call(this);
this.context = "http://schema.org/";
this.type = "CheckAction";
};
CheckAction = stjs.extend(CheckAction, FindAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ApplyAction
* The act of registering to an organization/service without the guarantee to receive it.\n\nRelated actions:\n\n* [[RegisterAction]]: Unlike RegisterAction, ApplyAction has no guarantees that the application will be accepted.
*
* @author schema.org
* @class ApplyAction
* @module org.schema
* @extends OrganizeAction
*/
var ApplyAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
OrganizeAction.call(this);
this.context = "http://schema.org/";
this.type = "ApplyAction";
};
ApplyAction = stjs.extend(ApplyAction, OrganizeAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BookmarkAction
* An agent bookmarks/flags/labels/tags/marks an object.
*
* @author schema.org
* @class BookmarkAction
* @module org.schema
* @extends OrganizeAction
*/
var BookmarkAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
OrganizeAction.call(this);
this.context = "http://schema.org/";
this.type = "BookmarkAction";
};
BookmarkAction = stjs.extend(BookmarkAction, OrganizeAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PlanAction
* The act of planning the execution of an event/task/action/reservation/plan to a future date.
*
* @author schema.org
* @class PlanAction
* @module org.schema
* @extends OrganizeAction
*/
var PlanAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
OrganizeAction.call(this);
this.context = "http://schema.org/";
this.type = "PlanAction";
};
PlanAction = stjs.extend(PlanAction, OrganizeAction, [], function(constructor, prototype) {
/**
* Schema.org/scheduledTime
* The time the object is scheduled to.
*
* @property scheduledTime
* @type DateTime
*/
prototype.scheduledTime = null;
}, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AllocateAction
* The act of organizing tasks/objects/events by associating resources to it.
*
* @author schema.org
* @class AllocateAction
* @module org.schema
* @extends OrganizeAction
*/
var AllocateAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
OrganizeAction.call(this);
this.context = "http://schema.org/";
this.type = "AllocateAction";
};
AllocateAction = stjs.extend(AllocateAction, OrganizeAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LoseAction
* The act of being defeated in a competitive activity.
*
* @author schema.org
* @class LoseAction
* @module org.schema
* @extends AchieveAction
*/
var LoseAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AchieveAction.call(this);
this.context = "http://schema.org/";
this.type = "LoseAction";
};
LoseAction = stjs.extend(LoseAction, AchieveAction, [], function(constructor, prototype) {
/**
* Schema.org/winner
* A sub property of participant. The winner of the action.
*
* @property winner
* @type Person
*/
prototype.winner = null;
}, {winner: "Person", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WinAction
* The act of achieving victory in a competitive activity.
*
* @author schema.org
* @class WinAction
* @module org.schema
* @extends AchieveAction
*/
var WinAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AchieveAction.call(this);
this.context = "http://schema.org/";
this.type = "WinAction";
};
WinAction = stjs.extend(WinAction, AchieveAction, [], function(constructor, prototype) {
/**
* Schema.org/loser
* A sub property of participant. The loser of the action.
*
* @property loser
* @type Person
*/
prototype.loser = null;
}, {loser: "Person", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TieAction
* The act of reaching a draw in a competitive activity.
*
* @author schema.org
* @class TieAction
* @module org.schema
* @extends AchieveAction
*/
var TieAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AchieveAction.call(this);
this.context = "http://schema.org/";
this.type = "TieAction";
};
TieAction = stjs.extend(TieAction, AchieveAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/IgnoreAction
* The act of intentionally disregarding the object. An agent ignores an object.
*
* @author schema.org
* @class IgnoreAction
* @module org.schema
* @extends AssessAction
*/
var IgnoreAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AssessAction.call(this);
this.context = "http://schema.org/";
this.type = "IgnoreAction";
};
IgnoreAction = stjs.extend(IgnoreAction, AssessAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReviewAction
* The act of producing a balanced opinion about the object for an audience. An agent reviews an object with participants resulting in a review.
*
* @author schema.org
* @class ReviewAction
* @module org.schema
* @extends AssessAction
*/
var ReviewAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AssessAction.call(this);
this.context = "http://schema.org/";
this.type = "ReviewAction";
};
ReviewAction = stjs.extend(ReviewAction, AssessAction, [], function(constructor, prototype) {
/**
* Schema.org/resultReview
* A sub property of result. The review that resulted in the performing of the action.
*
* @property resultReview
* @type Review
*/
prototype.resultReview = null;
}, {resultReview: "Review", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ChooseAction
* The act of expressing a preference from a set of options or a large or unbounded set of choices/options.
*
* @author schema.org
* @class ChooseAction
* @module org.schema
* @extends AssessAction
*/
var ChooseAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AssessAction.call(this);
this.context = "http://schema.org/";
this.type = "ChooseAction";
};
ChooseAction = stjs.extend(ChooseAction, AssessAction, [], function(constructor, prototype) {
/**
* Schema.org/actionOption
* A sub property of object. The options subject to this action.
*
* @property actionOption
* @type schema, Text | schema,Thing
*/
prototype.actionOption = null;
/**
* Schema.org/option
* A sub property of object. The options subject to this action.
*
* @property option
* @type schema, Text | schema,Thing
*/
prototype.option = null;
}, {actionOption: "Object", option: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReactAction
* The act of responding instinctively and emotionally to an object, expressing a sentiment.
*
* @author schema.org
* @class ReactAction
* @module org.schema
* @extends AssessAction
*/
var ReactAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AssessAction.call(this);
this.context = "http://schema.org/";
this.type = "ReactAction";
};
ReactAction = stjs.extend(ReactAction, AssessAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/JoinAction
* An agent joins an event/group with participants/friends at a location.\n\nRelated actions:\n\n* [[RegisterAction]]: Unlike RegisterAction, JoinAction refers to joining a group/team of people.\n* [[SubscribeAction]]: Unlike SubscribeAction, JoinAction does not imply that you'll be receiving updates.\n* [[FollowAction]]: Unlike FollowAction, JoinAction does not imply that you'll be polling for updates.
*
* @author schema.org
* @class JoinAction
* @module org.schema
* @extends InteractAction
*/
var JoinAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "JoinAction";
};
JoinAction = stjs.extend(JoinAction, InteractAction, [], function(constructor, prototype) {
/**
* Schema.org/event
* Upcoming or past event associated with this place, organization, or action.
*
* @property event
* @type Event
*/
prototype.event = null;
}, {event: "Event", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MarryAction
* The act of marrying a person.
*
* @author schema.org
* @class MarryAction
* @module org.schema
* @extends InteractAction
*/
var MarryAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "MarryAction";
};
MarryAction = stjs.extend(MarryAction, InteractAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CommunicateAction
* The act of conveying information to another person via a communication medium (instrument) such as speech, email, or telephone conversation.
*
* @author schema.org
* @class CommunicateAction
* @module org.schema
* @extends InteractAction
*/
var CommunicateAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "CommunicateAction";
};
CommunicateAction = stjs.extend(CommunicateAction, InteractAction, [], function(constructor, prototype) {
/**
* Schema.org/language
* A sub property of instrument. The language used on this action.
*
* @property language
* @type Language
*/
prototype.language = null;
/**
* Schema.org/about
* The subject matter of the content.
*
* @property about
* @type Thing
*/
prototype.about = null;
/**
* Schema.org/inLanguage
* The language of the content or performance or used in an action. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[availableLanguage]].
*
* @property inLanguage
* @type schema, Text | schema,Language
*/
prototype.inLanguage = null;
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BefriendAction
* The act of forming a personal connection with someone (object) mutually/bidirectionally/symmetrically.\n\nRelated actions:\n\n* [[FollowAction]]: Unlike FollowAction, BefriendAction implies that the connection is reciprocal.
*
* @author schema.org
* @class BefriendAction
* @module org.schema
* @extends InteractAction
*/
var BefriendAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "BefriendAction";
};
BefriendAction = stjs.extend(BefriendAction, InteractAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RegisterAction
* The act of registering to be a user of a service, product or web page.\n\nRelated actions:\n\n* [[JoinAction]]: Unlike JoinAction, RegisterAction implies you are registering to be a user of a service, *not* a group/team of people.\n* [FollowAction]]: Unlike FollowAction, RegisterAction doesn't imply that the agent is expecting to poll for updates from the object.\n* [[SubscribeAction]]: Unlike SubscribeAction, RegisterAction doesn't imply that the agent is expecting updates from the object.
*
* @author schema.org
* @class RegisterAction
* @module org.schema
* @extends InteractAction
*/
var RegisterAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "RegisterAction";
};
RegisterAction = stjs.extend(RegisterAction, InteractAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SubscribeAction
* The act of forming a personal connection with someone/something (object) unidirectionally/asymmetrically to get updates pushed to.\n\nRelated actions:\n\n* [[FollowAction]]: Unlike FollowAction, SubscribeAction implies that the subscriber acts as a passive agent being constantly/actively pushed for updates.\n* [[RegisterAction]]: Unlike RegisterAction, SubscribeAction implies that the agent is interested in continuing receiving updates from the object.\n* [[JoinAction]]: Unlike JoinAction, SubscribeAction implies that the agent is interested in continuing receiving updates from the object.
*
* @author schema.org
* @class SubscribeAction
* @module org.schema
* @extends InteractAction
*/
var SubscribeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "SubscribeAction";
};
SubscribeAction = stjs.extend(SubscribeAction, InteractAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FollowAction
* The act of forming a personal connection with someone/something (object) unidirectionally/asymmetrically to get updates polled from.\n\nRelated actions:\n\n* [[BefriendAction]]: Unlike BefriendAction, FollowAction implies that the connection is *not* necessarily reciprocal.\n* [[SubscribeAction]]: Unlike SubscribeAction, FollowAction implies that the follower acts as an active agent constantly/actively polling for updates.\n* [[RegisterAction]]: Unlike RegisterAction, FollowAction implies that the agent is interested in continuing receiving updates from the object.\n* [[JoinAction]]: Unlike JoinAction, FollowAction implies that the agent is interested in getting updates from the object.\n* [[TrackAction]]: Unlike TrackAction, FollowAction refers to the polling of updates of all aspects of animate objects rather than the location of inanimate objects (e.g. you track a package, but you don't follow it).
*
* @author schema.org
* @class FollowAction
* @module org.schema
* @extends InteractAction
*/
var FollowAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "FollowAction";
};
FollowAction = stjs.extend(FollowAction, InteractAction, [], function(constructor, prototype) {
/**
* Schema.org/followee
* A sub property of object. The person or organization being followed.
*
* @property followee
* @type schema, Organization | schema,Person
*/
prototype.followee = null;
}, {followee: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UnRegisterAction
* The act of un-registering from a service.\n\nRelated actions:\n\n* [[RegisterAction]]: antonym of UnRegisterAction.\n* [[Leave]]: Unlike LeaveAction, UnRegisterAction implies that you are unregistering from a service you werer previously registered, rather than leaving a team/group of people.
*
* @author schema.org
* @class UnRegisterAction
* @module org.schema
* @extends InteractAction
*/
var UnRegisterAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "UnRegisterAction";
};
UnRegisterAction = stjs.extend(UnRegisterAction, InteractAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LeaveAction
* An agent leaves an event / group with participants/friends at a location.\n\nRelated actions:\n\n* [[JoinAction]]: The antonym of LeaveAction.\n* [[UnRegisterAction]]: Unlike UnRegisterAction, LeaveAction implies leaving a group/team of people rather than a service.
*
* @author schema.org
* @class LeaveAction
* @module org.schema
* @extends InteractAction
*/
var LeaveAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InteractAction.call(this);
this.context = "http://schema.org/";
this.type = "LeaveAction";
};
LeaveAction = stjs.extend(LeaveAction, InteractAction, [], function(constructor, prototype) {
/**
* Schema.org/event
* Upcoming or past event associated with this place, organization, or action.
*
* @property event
* @type Event
*/
prototype.event = null;
}, {event: "Event", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ExerciseAction
* The act of participating in exertive activity for the purposes of improving health and fitness.
*
* @author schema.org
* @class ExerciseAction
* @module org.schema
* @extends PlayAction
*/
var ExerciseAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlayAction.call(this);
this.context = "http://schema.org/";
this.type = "ExerciseAction";
};
ExerciseAction = stjs.extend(ExerciseAction, PlayAction, [], function(constructor, prototype) {
/**
* Schema.org/opponent
* A sub property of participant. The opponent on this action.
*
* @property opponent
* @type Person
*/
prototype.opponent = null;
/**
* Schema.org/exerciseCourse
* A sub property of location. The course where this action was taken.
*
* @property exerciseCourse
* @type Place
*/
prototype.exerciseCourse = null;
/**
* Schema.org/fromLocation
* A sub property of location. The original location of the object or the agent before the action.
*
* @property fromLocation
* @type Place
*/
prototype.fromLocation = null;
/**
* Schema.org/course
* A sub property of location. The course where this action was taken.
*
* @property course
* @type Place
*/
prototype.course = null;
/**
* Schema.org/toLocation
* A sub property of location. The final location of the object or the agent after the action.
*
* @property toLocation
* @type Place
*/
prototype.toLocation = null;
/**
* Schema.org/distance
* The distance travelled, e.g. exercising or travelling.
*
* @property distance
* @type Distance
*/
prototype.distance = null;
/**
* Schema.org/sportsActivityLocation
* A sub property of location. The sports activity location where this action occurred.
*
* @property sportsActivityLocation
* @type SportsActivityLocation
*/
prototype.sportsActivityLocation = null;
/**
* Schema.org/sportsEvent
* A sub property of location. The sports event where this action occurred.
*
* @property sportsEvent
* @type SportsEvent
*/
prototype.sportsEvent = null;
/**
* Schema.org/sportsTeam
* A sub property of participant. The sports team that participated on this action.
*
* @property sportsTeam
* @type SportsTeam
*/
prototype.sportsTeam = null;
}, {opponent: "Person", exerciseCourse: "Place", fromLocation: "Place", course: "Place", toLocation: "Place", distance: "Distance", sportsActivityLocation: "SportsActivityLocation", sportsEvent: "SportsEvent", sportsTeam: "SportsTeam", audience: "Audience", event: "Event", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PerformAction
* The act of participating in performance arts.
*
* @author schema.org
* @class PerformAction
* @module org.schema
* @extends PlayAction
*/
var PerformAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlayAction.call(this);
this.context = "http://schema.org/";
this.type = "PerformAction";
};
PerformAction = stjs.extend(PerformAction, PlayAction, [], function(constructor, prototype) {
/**
* Schema.org/entertainmentBusiness
* A sub property of location. The entertainment business where the action occurred.
*
* @property entertainmentBusiness
* @type EntertainmentBusiness
*/
prototype.entertainmentBusiness = null;
}, {entertainmentBusiness: "EntertainmentBusiness", audience: "Audience", event: "Event", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DonateAction
* The act of providing goods, services, or money without compensation, often for philanthropic reasons.
*
* @author schema.org
* @class DonateAction
* @module org.schema
* @extends TradeAction
*/
var DonateAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "DonateAction";
};
DonateAction = stjs.extend(DonateAction, TradeAction, [], function(constructor, prototype) {
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {recipient: "Object", priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BuyAction
* The act of giving money to a seller in exchange for goods or services rendered. An agent buys an object, product, or service from a seller for a price. Reciprocal of SellAction.
*
* @author schema.org
* @class BuyAction
* @module org.schema
* @extends TradeAction
*/
var BuyAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "BuyAction";
};
BuyAction = stjs.extend(BuyAction, TradeAction, [], function(constructor, prototype) {
/**
* Schema.org/warrantyPromise
* The warranty promise(s) included in the offer.
*
* @property warrantyPromise
* @type WarrantyPromise
*/
prototype.warrantyPromise = null;
/**
* Schema.org/vendor
* 'vendor' is an earlier term for 'seller'.
*
* @property vendor
* @type schema, Organization | schema,Person
*/
prototype.vendor = null;
/**
* Schema.org/seller
* An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider.
*
* @property seller
* @type schema, Organization | schema,Person
*/
prototype.seller = null;
}, {warrantyPromise: "WarrantyPromise", vendor: "Object", seller: "Object", priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OrderAction
* An agent orders an object/product/service to be delivered/sent.
*
* @author schema.org
* @class OrderAction
* @module org.schema
* @extends TradeAction
*/
var OrderAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "OrderAction";
};
OrderAction = stjs.extend(OrderAction, TradeAction, [], function(constructor, prototype) {
/**
* Schema.org/deliveryMethod
* A sub property of instrument. The method of delivery.
*
* @property deliveryMethod
* @type DeliveryMethod
*/
prototype.deliveryMethod = null;
}, {deliveryMethod: "DeliveryMethod", priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PayAction
* An agent pays a price to a participant.
*
* @author schema.org
* @class PayAction
* @module org.schema
* @extends TradeAction
*/
var PayAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "PayAction";
};
PayAction = stjs.extend(PayAction, TradeAction, [], function(constructor, prototype) {
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {recipient: "Object", priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SellAction
* The act of taking money from a buyer in exchange for goods or services rendered. An agent sells an object, product, or service to a buyer for a price. Reciprocal of BuyAction.
*
* @author schema.org
* @class SellAction
* @module org.schema
* @extends TradeAction
*/
var SellAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "SellAction";
};
SellAction = stjs.extend(SellAction, TradeAction, [], function(constructor, prototype) {
/**
* Schema.org/warrantyPromise
* The warranty promise(s) included in the offer.
*
* @property warrantyPromise
* @type WarrantyPromise
*/
prototype.warrantyPromise = null;
/**
* Schema.org/buyer
* A sub property of participant. The participant/person/organization that bought the object.
*
* @property buyer
* @type Person
*/
prototype.buyer = null;
}, {warrantyPromise: "WarrantyPromise", buyer: "Person", priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RentAction
* The act of giving money in return for temporary use, but not ownership, of an object such as a vehicle or property. For example, an agent rents a property from a landlord in exchange for a periodic payment.
*
* @author schema.org
* @class RentAction
* @module org.schema
* @extends TradeAction
*/
var RentAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "RentAction";
};
RentAction = stjs.extend(RentAction, TradeAction, [], function(constructor, prototype) {
/**
* Schema.org/realEstateAgent
* A sub property of participant. The real estate agent involved in the action.
*
* @property realEstateAgent
* @type RealEstateAgent
*/
prototype.realEstateAgent = null;
/**
* Schema.org/landlord
* A sub property of participant. The owner of the real estate property.
*
* @property landlord
* @type schema, Organization | schema,Person
*/
prototype.landlord = null;
}, {realEstateAgent: "RealEstateAgent", landlord: "Object", priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TipAction
* The act of giving money voluntarily to a beneficiary in recognition of services rendered.
*
* @author schema.org
* @class TipAction
* @module org.schema
* @extends TradeAction
*/
var TipAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "TipAction";
};
TipAction = stjs.extend(TipAction, TradeAction, [], function(constructor, prototype) {
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {recipient: "Object", priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/QuoteAction
* An agent quotes/estimates/appraises an object/product/service with a price at a location/store.
*
* @author schema.org
* @class QuoteAction
* @module org.schema
* @extends TradeAction
*/
var QuoteAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TradeAction.call(this);
this.context = "http://schema.org/";
this.type = "QuoteAction";
};
QuoteAction = stjs.extend(QuoteAction, TradeAction, [], null, {priceSpecification: "PriceSpecification", price: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ActivateAction
* The act of starting or activating a device or application (e.g. starting a timer or turning on a flashlight).
*
* @author schema.org
* @class ActivateAction
* @module org.schema
* @extends ControlAction
*/
var ActivateAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ControlAction.call(this);
this.context = "http://schema.org/";
this.type = "ActivateAction";
};
ActivateAction = stjs.extend(ActivateAction, ControlAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SuspendAction
* The act of momentarily pausing a device or application (e.g. pause music playback or pause a timer).
*
* @author schema.org
* @class SuspendAction
* @module org.schema
* @extends ControlAction
*/
var SuspendAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ControlAction.call(this);
this.context = "http://schema.org/";
this.type = "SuspendAction";
};
SuspendAction = stjs.extend(SuspendAction, ControlAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ResumeAction
* The act of resuming a device or application which was formerly paused (e.g. resume music playback or resume a timer).
*
* @author schema.org
* @class ResumeAction
* @module org.schema
* @extends ControlAction
*/
var ResumeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ControlAction.call(this);
this.context = "http://schema.org/";
this.type = "ResumeAction";
};
ResumeAction = stjs.extend(ResumeAction, ControlAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DeactivateAction
* The act of stopping or deactivating a device or application (e.g. stopping a timer or turning off a flashlight).
*
* @author schema.org
* @class DeactivateAction
* @module org.schema
* @extends ControlAction
*/
var DeactivateAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ControlAction.call(this);
this.context = "http://schema.org/";
this.type = "DeactivateAction";
};
DeactivateAction = stjs.extend(DeactivateAction, ControlAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FilmAction
* The act of capturing sound and moving images on film, video, or digitally.
*
* @author schema.org
* @class FilmAction
* @module org.schema
* @extends CreateAction
*/
var FilmAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreateAction.call(this);
this.context = "http://schema.org/";
this.type = "FilmAction";
};
FilmAction = stjs.extend(FilmAction, CreateAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WriteAction
* The act of authoring written creative content.
*
* @author schema.org
* @class WriteAction
* @module org.schema
* @extends CreateAction
*/
var WriteAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreateAction.call(this);
this.context = "http://schema.org/";
this.type = "WriteAction";
};
WriteAction = stjs.extend(WriteAction, CreateAction, [], function(constructor, prototype) {
/**
* Schema.org/language
* A sub property of instrument. The language used on this action.
*
* @property language
* @type Language
*/
prototype.language = null;
/**
* Schema.org/inLanguage
* The language of the content or performance or used in an action. Please use one of the language codes from the [IETF BCP 47 standard](http://tools.ietf.org/html/bcp47). See also [[availableLanguage]].
*
* @property inLanguage
* @type schema, Text | schema,Language
*/
prototype.inLanguage = null;
}, {language: "Language", inLanguage: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PaintAction
* The act of producing a painting, typically with paint and canvas as instruments.
*
* @author schema.org
* @class PaintAction
* @module org.schema
* @extends CreateAction
*/
var PaintAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreateAction.call(this);
this.context = "http://schema.org/";
this.type = "PaintAction";
};
PaintAction = stjs.extend(PaintAction, CreateAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CookAction
* The act of producing/preparing food.
*
* @author schema.org
* @class CookAction
* @module org.schema
* @extends CreateAction
*/
var CookAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreateAction.call(this);
this.context = "http://schema.org/";
this.type = "CookAction";
};
CookAction = stjs.extend(CookAction, CreateAction, [], function(constructor, prototype) {
/**
* Schema.org/foodEstablishment
* A sub property of location. The specific food establishment where the action occurred.
*
* @property foodEstablishment
* @type schema, FoodEstablishment | schema,Place
*/
prototype.foodEstablishment = null;
/**
* Schema.org/recipe
* A sub property of instrument. The recipe/instructions used to perform the action.
*
* @property recipe
* @type Recipe
*/
prototype.recipe = null;
/**
* Schema.org/foodEvent
* A sub property of location. The specific food event where the action occurred.
*
* @property foodEvent
* @type FoodEvent
*/
prototype.foodEvent = null;
}, {foodEstablishment: "Object", recipe: "Recipe", foodEvent: "FoodEvent", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PhotographAction
* The act of capturing still images of objects using a camera.
*
* @author schema.org
* @class PhotographAction
* @module org.schema
* @extends CreateAction
*/
var PhotographAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreateAction.call(this);
this.context = "http://schema.org/";
this.type = "PhotographAction";
};
PhotographAction = stjs.extend(PhotographAction, CreateAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DrawAction
* The act of producing a visual/graphical representation of an object, typically with a pen/pencil and paper as instruments.
*
* @author schema.org
* @class DrawAction
* @module org.schema
* @extends CreateAction
*/
var DrawAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CreateAction.call(this);
this.context = "http://schema.org/";
this.type = "DrawAction";
};
DrawAction = stjs.extend(DrawAction, CreateAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserComments
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserComments
* @module org.schema
* @extends UserInteraction
*/
var UserComments = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserComments";
};
UserComments = stjs.extend(UserComments, UserInteraction, [], function(constructor, prototype) {
/**
* Schema.org/replyToUrl
* The URL at which a reply may be posted to the specified UserComment.
*
* @property replyToUrl
* @type URL
*/
prototype.replyToUrl = null;
/**
* Schema.org/commentText
* The text of the UserComment.
*
* @property commentText
* @type Text
*/
prototype.commentText = null;
/**
* Schema.org/discusses
* Specifies the CreativeWork associated with the UserComment.
*
* @property discusses
* @type CreativeWork
*/
prototype.discusses = null;
/**
* Schema.org/creator
* The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork.
*
* @property creator
* @type schema, Organization | schema,Person
*/
prototype.creator = null;
/**
* Schema.org/commentTime
* The time at which the UserComment was made.
*
* @property commentTime
* @type schema, DateTime | schema,Date
*/
prototype.commentTime = null;
}, {discusses: "CreativeWork", creator: "Object", commentTime: "Object", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserCheckins
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserCheckins
* @module org.schema
* @extends UserInteraction
*/
var UserCheckins = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserCheckins";
};
UserCheckins = stjs.extend(UserCheckins, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserPlays
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserPlays
* @module org.schema
* @extends UserInteraction
*/
var UserPlays = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserPlays";
};
UserPlays = stjs.extend(UserPlays, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserTweets
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserTweets
* @module org.schema
* @extends UserInteraction
*/
var UserTweets = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserTweets";
};
UserTweets = stjs.extend(UserTweets, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserBlocks
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserBlocks
* @module org.schema
* @extends UserInteraction
*/
var UserBlocks = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserBlocks";
};
UserBlocks = stjs.extend(UserBlocks, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserDownloads
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserDownloads
* @module org.schema
* @extends UserInteraction
*/
var UserDownloads = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserDownloads";
};
UserDownloads = stjs.extend(UserDownloads, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserPlusOnes
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserPlusOnes
* @module org.schema
* @extends UserInteraction
*/
var UserPlusOnes = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserPlusOnes";
};
UserPlusOnes = stjs.extend(UserPlusOnes, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserLikes
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserLikes
* @module org.schema
* @extends UserInteraction
*/
var UserLikes = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserLikes";
};
UserLikes = stjs.extend(UserLikes, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UserPageVisits
* UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use [[Action]]-based vocabulary, alongside types such as [[Comment]].
*
* @author schema.org
* @class UserPageVisits
* @module org.schema
* @extends UserInteraction
*/
var UserPageVisits = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UserInteraction.call(this);
this.context = "http://schema.org/";
this.type = "UserPageVisits";
};
UserPageVisits = stjs.extend(UserPageVisits, UserInteraction, [], null, {contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OnDemandEvent
* A publication event e.g. catch-up TV or radio podcast, during which a program is available on-demand.
*
* @author schema.org
* @class OnDemandEvent
* @module org.schema
* @extends PublicationEvent
*/
var OnDemandEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PublicationEvent.call(this);
this.context = "http://schema.org/";
this.type = "OnDemandEvent";
};
OnDemandEvent = stjs.extend(OnDemandEvent, PublicationEvent, [], null, {publishedOn: "BroadcastService", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BroadcastEvent
* An over the air or online broadcast event.
*
* @author schema.org
* @class BroadcastEvent
* @module org.schema
* @extends PublicationEvent
*/
var BroadcastEvent = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PublicationEvent.call(this);
this.context = "http://schema.org/";
this.type = "BroadcastEvent";
};
BroadcastEvent = stjs.extend(BroadcastEvent, PublicationEvent, [], function(constructor, prototype) {
/**
* Schema.org/videoFormat
* The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD, etc.).
*
* @property videoFormat
* @type Text
*/
prototype.videoFormat = null;
/**
* Schema.org/broadcastOfEvent
* The event being broadcast such as a sporting event or awards ceremony.
*
* @property broadcastOfEvent
* @type Event
*/
prototype.broadcastOfEvent = null;
/**
* Schema.org/isLiveBroadcast
* True is the broadcast is of a live event.
*
* @property isLiveBroadcast
* @type Boolean
*/
prototype.isLiveBroadcast = null;
}, {broadcastOfEvent: "Event", publishedOn: "BroadcastService", contributor: "Object", attendees: "Object", performers: "Object", composer: "Object", performer: "Object", director: "Person", eventStatus: "EventStatusType", superEvent: "Event", translator: "Object", offers: "Offer", review: "Review", duration: "Duration", subEvent: "Event", actor: "Person", attendee: "Object", about: "Thing", funder: "Object", sponsor: "Object", location: "Object", recordedIn: "CreativeWork", organizer: "Object", aggregateRating: "AggregateRating", startDate: "Object", workFeatured: "CreativeWork", workPerformed: "CreativeWork", endDate: "Object", inLanguage: "Object", subEvents: "Event", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SingleFamilyResidence
* Residence type: Single-family home.
*
* @author schema.org
* @class SingleFamilyResidence
* @module org.schema
* @extends House
*/
var SingleFamilyResidence = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
House.call(this);
this.context = "http://schema.org/";
this.type = "SingleFamilyResidence";
};
SingleFamilyResidence = stjs.extend(SingleFamilyResidence, House, [], function(constructor, prototype) {
/**
* Schema.org/numberOfRooms
* The number of rooms (excluding bathrooms and closets) of the acccommodation or lodging business.
* Typical unit code(s): ROM for room or C62 for no unit. The type of room can be put in the unitText property of the QuantitativeValue.
*
* @property numberOfRooms
* @type schema, Number | schema,QuantitativeValue
*/
prototype.numberOfRooms = null;
/**
* Schema.org/occupancy
* The allowed total occupancy for the accommodation in persons (including infants etc). For individual accommodations, this is not necessarily the legal maximum but defines the permitted usage as per the contractual agreement (e.g. a double room used by a single person).
* Typical unit code(s): C62 for person
*
* @property occupancy
* @type QuantitativeValue
*/
prototype.occupancy = null;
}, {numberOfRooms: "Object", occupancy: "QuantitativeValue", numberOfRooms: "Object", amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HotelRoom
* A hotel room is a single room in a hotel.
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class HotelRoom
* @module org.schema
* @extends Room
*/
var HotelRoom = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Room.call(this);
this.context = "http://schema.org/";
this.type = "HotelRoom";
};
HotelRoom = stjs.extend(HotelRoom, Room, [], function(constructor, prototype) {
/**
* Schema.org/bed
* The type of bed or beds included in the accommodation. For the single case of just one bed of a certain type, you use bed directly with a text.
* If you want to indicate the quantity of a certain kind of bed, use an instance of BedDetails. For more detailed information, use the amenityFeature property.
*
* @property bed
* @type schema, Text | schema,BedDetails
*/
prototype.bed = null;
/**
* Schema.org/occupancy
* The allowed total occupancy for the accommodation in persons (including infants etc). For individual accommodations, this is not necessarily the legal maximum but defines the permitted usage as per the contractual agreement (e.g. a double room used by a single person).
* Typical unit code(s): C62 for person
*
* @property occupancy
* @type QuantitativeValue
*/
prototype.occupancy = null;
}, {bed: "Object", occupancy: "QuantitativeValue", amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MeetingRoom
* A meeting room, conference room, or conference hall is a room provided for singular events such as business conferences and meetings (Source: Wikipedia, the free encyclopedia, see <a href="http://en.wikipedia.org/wiki/Conference_hall">http://en.wikipedia.org/wiki/Conference_hall</a>).
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class MeetingRoom
* @module org.schema
* @extends Room
*/
var MeetingRoom = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Room.call(this);
this.context = "http://schema.org/";
this.type = "MeetingRoom";
};
MeetingRoom = stjs.extend(MeetingRoom, Room, [], null, {amenityFeature: "LocationFeatureSpecification", floorSize: "QuantitativeValue", petsAllowed: "Object", numberOfRooms: "Object", reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LegislativeBuilding
* A legislative building—for example, the state capitol.
*
* @author schema.org
* @class LegislativeBuilding
* @module org.schema
* @extends GovernmentBuilding
*/
var LegislativeBuilding = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
GovernmentBuilding.call(this);
this.context = "http://schema.org/";
this.type = "LegislativeBuilding";
};
LegislativeBuilding = stjs.extend(LegislativeBuilding, GovernmentBuilding, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CityHall
* A city hall.
*
* @author schema.org
* @class CityHall
* @module org.schema
* @extends GovernmentBuilding
*/
var CityHall = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
GovernmentBuilding.call(this);
this.context = "http://schema.org/";
this.type = "CityHall";
};
CityHall = stjs.extend(CityHall, GovernmentBuilding, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DefenceEstablishment
* A defence establishment, such as an army or navy base.
*
* @author schema.org
* @class DefenceEstablishment
* @module org.schema
* @extends GovernmentBuilding
*/
var DefenceEstablishment = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
GovernmentBuilding.call(this);
this.context = "http://schema.org/";
this.type = "DefenceEstablishment";
};
DefenceEstablishment = stjs.extend(DefenceEstablishment, GovernmentBuilding, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Courthouse
* A courthouse.
*
* @author schema.org
* @class Courthouse
* @module org.schema
* @extends GovernmentBuilding
*/
var Courthouse = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
GovernmentBuilding.call(this);
this.context = "http://schema.org/";
this.type = "Courthouse";
};
Courthouse = stjs.extend(Courthouse, GovernmentBuilding, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Embassy
* An embassy.
*
* @author schema.org
* @class Embassy
* @module org.schema
* @extends GovernmentBuilding
*/
var Embassy = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
GovernmentBuilding.call(this);
this.context = "http://schema.org/";
this.type = "Embassy";
};
Embassy = stjs.extend(Embassy, GovernmentBuilding, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HinduTemple
* A Hindu temple.
*
* @author schema.org
* @class HinduTemple
* @module org.schema
* @extends PlaceOfWorship
*/
var HinduTemple = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlaceOfWorship.call(this);
this.context = "http://schema.org/";
this.type = "HinduTemple";
};
HinduTemple = stjs.extend(HinduTemple, PlaceOfWorship, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Synagogue
* A synagogue.
*
* @author schema.org
* @class Synagogue
* @module org.schema
* @extends PlaceOfWorship
*/
var Synagogue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlaceOfWorship.call(this);
this.context = "http://schema.org/";
this.type = "Synagogue";
};
Synagogue = stjs.extend(Synagogue, PlaceOfWorship, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Mosque
* A mosque.
*
* @author schema.org
* @class Mosque
* @module org.schema
* @extends PlaceOfWorship
*/
var Mosque = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlaceOfWorship.call(this);
this.context = "http://schema.org/";
this.type = "Mosque";
};
Mosque = stjs.extend(Mosque, PlaceOfWorship, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BuddhistTemple
* A Buddhist temple.
*
* @author schema.org
* @class BuddhistTemple
* @module org.schema
* @extends PlaceOfWorship
*/
var BuddhistTemple = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlaceOfWorship.call(this);
this.context = "http://schema.org/";
this.type = "BuddhistTemple";
};
BuddhistTemple = stjs.extend(BuddhistTemple, PlaceOfWorship, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Church
* A church.
*
* @author schema.org
* @class Church
* @module org.schema
* @extends PlaceOfWorship
*/
var Church = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlaceOfWorship.call(this);
this.context = "http://schema.org/";
this.type = "Church";
};
Church = stjs.extend(Church, PlaceOfWorship, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CatholicChurch
* A Catholic church.
*
* @author schema.org
* @class CatholicChurch
* @module org.schema
* @extends PlaceOfWorship
*/
var CatholicChurch = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlaceOfWorship.call(this);
this.context = "http://schema.org/";
this.type = "CatholicChurch";
};
CatholicChurch = stjs.extend(CatholicChurch, PlaceOfWorship, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OceanBodyOfWater
* An ocean (for example, the Pacific).
*
* @author schema.org
* @class OceanBodyOfWater
* @module org.schema
* @extends BodyOfWater
*/
var OceanBodyOfWater = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "OceanBodyOfWater";
};
OceanBodyOfWater = stjs.extend(OceanBodyOfWater, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Canal
* A canal, like the Panama Canal.
*
* @author schema.org
* @class Canal
* @module org.schema
* @extends BodyOfWater
*/
var Canal = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "Canal";
};
Canal = stjs.extend(Canal, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Reservoir
* A reservoir of water, typically an artificially created lake, like the Lake Kariba reservoir.
*
* @author schema.org
* @class Reservoir
* @module org.schema
* @extends BodyOfWater
*/
var Reservoir = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "Reservoir";
};
Reservoir = stjs.extend(Reservoir, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Waterfall
* A waterfall, like Niagara.
*
* @author schema.org
* @class Waterfall
* @module org.schema
* @extends BodyOfWater
*/
var Waterfall = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "Waterfall";
};
Waterfall = stjs.extend(Waterfall, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Pond
* A pond.
*
* @author schema.org
* @class Pond
* @module org.schema
* @extends BodyOfWater
*/
var Pond = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "Pond";
};
Pond = stjs.extend(Pond, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LakeBodyOfWater
* A lake (for example, Lake Pontrachain).
*
* @author schema.org
* @class LakeBodyOfWater
* @module org.schema
* @extends BodyOfWater
*/
var LakeBodyOfWater = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "LakeBodyOfWater";
};
LakeBodyOfWater = stjs.extend(LakeBodyOfWater, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SeaBodyOfWater
* A sea (for example, the Caspian sea).
*
* @author schema.org
* @class SeaBodyOfWater
* @module org.schema
* @extends BodyOfWater
*/
var SeaBodyOfWater = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "SeaBodyOfWater";
};
SeaBodyOfWater = stjs.extend(SeaBodyOfWater, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RiverBodyOfWater
* A river (for example, the broad majestic Shannon).
*
* @author schema.org
* @class RiverBodyOfWater
* @module org.schema
* @extends BodyOfWater
*/
var RiverBodyOfWater = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BodyOfWater.call(this);
this.context = "http://schema.org/";
this.type = "RiverBodyOfWater";
};
RiverBodyOfWater = stjs.extend(RiverBodyOfWater, BodyOfWater, [], null, {reviews: "Review", amenityFeature: "LocationFeatureSpecification", event: "Event", additionalProperty: "PropertyValue", events: "Event", containsPlace: "Place", containedIn: "Place", review: "Review", containedInPlace: "Place", photo: "Object", address: "Object", geo: "Object", openingHoursSpecification: "OpeningHoursSpecification", photos: "Object", hasMap: "Object", aggregateRating: "AggregateRating", specialOpeningHoursSpecification: "OpeningHoursSpecification", logo: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EmployeeRole
* A subclass of OrganizationRole used to describe employee relationships.
*
* @author schema.org
* @class EmployeeRole
* @module org.schema
* @extends OrganizationRole
*/
var EmployeeRole = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
OrganizationRole.call(this);
this.context = "http://schema.org/";
this.type = "EmployeeRole";
};
EmployeeRole = stjs.extend(EmployeeRole, OrganizationRole, [], function(constructor, prototype) {
/**
* Schema.org/baseSalary
* The base salary of the job or of an employee in an EmployeeRole.
*
* @property baseSalary
* @type schema, Number | schema,PriceSpecification | schema,MonetaryAmount
*/
prototype.baseSalary = null;
/**
* Schema.org/salaryCurrency
* The currency (coded using [ISO 4217](http://en.wikipedia.org/wiki/ISO_4217) ) used for the main salary information in this job posting or for this employee.
*
* @property salaryCurrency
* @type Text
*/
prototype.salaryCurrency = null;
}, {baseSalary: "Object", roleName: "Object", namedPosition: "Object", startDate: "Object", endDate: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ParentAudience
* A set of characteristics describing parents, who can be interested in viewing some content.
*
* @author schema.org
* @class ParentAudience
* @module org.schema
* @extends PeopleAudience
*/
var ParentAudience = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PeopleAudience.call(this);
this.context = "http://schema.org/";
this.type = "ParentAudience";
};
ParentAudience = stjs.extend(ParentAudience, PeopleAudience, [], function(constructor, prototype) {
/**
* Schema.org/childMinAge
* Minimal age of the child.
*
* @property childMinAge
* @type Number
*/
prototype.childMinAge = null;
/**
* Schema.org/childMaxAge
* Maximal age of the child.
*
* @property childMaxAge
* @type Number
*/
prototype.childMaxAge = null;
}, {geographicArea: "AdministrativeArea", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BankAccount
* A product or service offered by a bank whereby one may deposit, withdraw or transfer money and in some cases be paid interest.
*
* @author schema.org
* @class BankAccount
* @module org.schema
* @extends FinancialProduct
*/
var BankAccount = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialProduct.call(this);
this.context = "http://schema.org/";
this.type = "BankAccount";
};
BankAccount = stjs.extend(BankAccount, FinancialProduct, [], null, {feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PaymentCard
* A payment method using a credit, debit, store or other card to associate the payment with an account.
*
* @author schema.org
* @class PaymentCard
* @module org.schema
* @extends FinancialProduct
*/
var PaymentCard = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialProduct.call(this);
this.context = "http://schema.org/";
this.type = "PaymentCard";
};
PaymentCard = stjs.extend(PaymentCard, FinancialProduct, [], null, {feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LoanOrCredit
* A financial product for the loaning of an amount of money under agreed terms and charges.
*
* @author schema.org
* @class LoanOrCredit
* @module org.schema
* @extends FinancialProduct
*/
var LoanOrCredit = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialProduct.call(this);
this.context = "http://schema.org/";
this.type = "LoanOrCredit";
};
LoanOrCredit = stjs.extend(LoanOrCredit, FinancialProduct, [], function(constructor, prototype) {
/**
* Schema.org/requiredCollateral
* Assets required to secure loan or credit repayments. It may take form of third party pledge, goods, financial instruments (cash, securities, etc.)
*
* @property requiredCollateral
* @type schema, Text | schema,Thing
*/
prototype.requiredCollateral = null;
/**
* Schema.org/amount
* The amount of money.
*
* @property amount
* @type schema, Number | schema,MonetaryAmount
*/
prototype.amount = null;
/**
* Schema.org/loanTerm
* The duration of the loan or credit agreement.
*
* @property loanTerm
* @type QuantitativeValue
*/
prototype.loanTerm = null;
}, {requiredCollateral: "Object", amount: "Object", loanTerm: "QuantitativeValue", feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PaymentService
* A Service to transfer funds from a person or organization to a beneficiary person or organization.
*
* @author schema.org
* @class PaymentService
* @module org.schema
* @extends FinancialProduct
*/
var PaymentService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialProduct.call(this);
this.context = "http://schema.org/";
this.type = "PaymentService";
};
PaymentService = stjs.extend(PaymentService, FinancialProduct, [], null, {feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InvestmentOrDeposit
* A type of financial product that typically requires the client to transfer funds to a financial service in return for potential beneficial financial return.
*
* @author schema.org
* @class InvestmentOrDeposit
* @module org.schema
* @extends FinancialProduct
*/
var InvestmentOrDeposit = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialProduct.call(this);
this.context = "http://schema.org/";
this.type = "InvestmentOrDeposit";
};
InvestmentOrDeposit = stjs.extend(InvestmentOrDeposit, FinancialProduct, [], function(constructor, prototype) {
/**
* Schema.org/amount
* The amount of money.
*
* @property amount
* @type schema, Number | schema,MonetaryAmount
*/
prototype.amount = null;
}, {amount: "Object", feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CurrencyConversionService
* A service to convert funds from one currency to another currency.
*
* @author schema.org
* @class CurrencyConversionService
* @module org.schema
* @extends FinancialProduct
*/
var CurrencyConversionService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialProduct.call(this);
this.context = "http://schema.org/";
this.type = "CurrencyConversionService";
};
CurrencyConversionService = stjs.extend(CurrencyConversionService, FinancialProduct, [], null, {feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/UnitPriceSpecification
* The price asked for a given offer by the respective organization or person.
*
* @author schema.org
* @class UnitPriceSpecification
* @module org.schema
* @extends PriceSpecification
*/
var UnitPriceSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PriceSpecification.call(this);
this.context = "http://schema.org/";
this.type = "UnitPriceSpecification";
};
UnitPriceSpecification = stjs.extend(UnitPriceSpecification, PriceSpecification, [], function(constructor, prototype) {
/**
* Schema.org/billingIncrement
* This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property.
*
* @property billingIncrement
* @type Number
*/
prototype.billingIncrement = null;
/**
* Schema.org/priceType
* A short text or acronym indicating multiple price specifications for the same offer, e.g. SRP for the suggested retail price or INVOICE for the invoice price, mostly used in the car industry.
*
* @property priceType
* @type Text
*/
prototype.priceType = null;
/**
* Schema.org/unitCode
* The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon.
*
* @property unitCode
* @type schema, URL | schema,Text
*/
prototype.unitCode = null;
/**
* Schema.org/referenceQuantity
* The reference quantity for which a certain price applies, e.g. 1 EUR per 4 kWh of electricity. This property is a replacement for unitOfMeasurement for the advanced cases where the price does not relate to a standard unit.
*
* @property referenceQuantity
* @type QuantitativeValue
*/
prototype.referenceQuantity = null;
/**
* Schema.org/unitText
* A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for
* <a href='unitCode'>unitCode</a>.
*
* @property unitText
* @type Text
*/
prototype.unitText = null;
}, {unitCode: "Object", referenceQuantity: "QuantitativeValue", price: "Object", eligibleTransactionVolume: "PriceSpecification", eligibleQuantity: "QuantitativeValue", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PaymentChargeSpecification
* The costs of settling the payment using a particular payment method.
*
* @author schema.org
* @class PaymentChargeSpecification
* @module org.schema
* @extends PriceSpecification
*/
var PaymentChargeSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PriceSpecification.call(this);
this.context = "http://schema.org/";
this.type = "PaymentChargeSpecification";
};
PaymentChargeSpecification = stjs.extend(PaymentChargeSpecification, PriceSpecification, [], function(constructor, prototype) {
/**
* Schema.org/appliesToDeliveryMethod
* The delivery method(s) to which the delivery charge or payment charge specification applies.
*
* @property appliesToDeliveryMethod
* @type DeliveryMethod
*/
prototype.appliesToDeliveryMethod = null;
/**
* Schema.org/appliesToPaymentMethod
* The payment method(s) to which the payment charge specification applies.
*
* @property appliesToPaymentMethod
* @type PaymentMethod
*/
prototype.appliesToPaymentMethod = null;
}, {appliesToDeliveryMethod: "DeliveryMethod", appliesToPaymentMethod: "PaymentMethod", price: "Object", eligibleTransactionVolume: "PriceSpecification", eligibleQuantity: "QuantitativeValue", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CompoundPriceSpecification
* A compound price specification is one that bundles multiple prices that all apply in combination for different dimensions of consumption. Use the name property of the attached unit price specification for indicating the dimension of a price component (e.g. "electricity" or "final cleaning").
*
* @author schema.org
* @class CompoundPriceSpecification
* @module org.schema
* @extends PriceSpecification
*/
var CompoundPriceSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PriceSpecification.call(this);
this.context = "http://schema.org/";
this.type = "CompoundPriceSpecification";
};
CompoundPriceSpecification = stjs.extend(CompoundPriceSpecification, PriceSpecification, [], function(constructor, prototype) {
/**
* Schema.org/priceComponent
* This property links to all [[UnitPriceSpecification]] nodes that apply in parallel for the [[CompoundPriceSpecification]] node.
*
* @property priceComponent
* @type UnitPriceSpecification
*/
prototype.priceComponent = null;
}, {priceComponent: "UnitPriceSpecification", price: "Object", eligibleTransactionVolume: "PriceSpecification", eligibleQuantity: "QuantitativeValue", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DeliveryChargeSpecification
* The price for the delivery of an offer using a particular delivery method.
*
* @author schema.org
* @class DeliveryChargeSpecification
* @module org.schema
* @extends PriceSpecification
*/
var DeliveryChargeSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PriceSpecification.call(this);
this.context = "http://schema.org/";
this.type = "DeliveryChargeSpecification";
};
DeliveryChargeSpecification = stjs.extend(DeliveryChargeSpecification, PriceSpecification, [], function(constructor, prototype) {
/**
* Schema.org/appliesToDeliveryMethod
* The delivery method(s) to which the delivery charge or payment charge specification applies.
*
* @property appliesToDeliveryMethod
* @type DeliveryMethod
*/
prototype.appliesToDeliveryMethod = null;
/**
* Schema.org/areaServed
* The geographic area where a service or offered item is provided.
*
* @property areaServed
* @type schema, GeoShape | schema,Text | schema,Place | schema,AdministrativeArea
*/
prototype.areaServed = null;
/**
* Schema.org/ineligibleRegion
* The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed.\n\nSee also [[eligibleRegion]].
*
* @property ineligibleRegion
* @type schema, GeoShape | schema,Text | schema,Place
*/
prototype.ineligibleRegion = null;
/**
* Schema.org/eligibleRegion
* The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid.\n\nSee also [[ineligibleRegion]].
*
* @property eligibleRegion
* @type schema, GeoShape | schema,Text | schema,Place
*/
prototype.eligibleRegion = null;
}, {appliesToDeliveryMethod: "DeliveryMethod", areaServed: "Object", ineligibleRegion: "Object", eligibleRegion: "Object", price: "Object", eligibleTransactionVolume: "PriceSpecification", eligibleQuantity: "QuantitativeValue", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GeoCircle
* A GeoCircle is a GeoShape representing a circular geographic area. As it is a GeoShape
* it provides the simple textual property 'circle', but also allows the combination of postalCode alongside geoRadius.
* The center of the circle can be indicated via the 'geoMidpoint' property, or more approximately using 'address', 'postalCode'.
*
* @author schema.org
* @class GeoCircle
* @module org.schema
* @extends GeoShape
*/
var GeoCircle = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
GeoShape.call(this);
this.context = "http://schema.org/";
this.type = "GeoCircle";
};
GeoCircle = stjs.extend(GeoCircle, GeoShape, [], function(constructor, prototype) {
/**
* Schema.org/geoMidpoint
* Indicates the GeoCoordinates at the centre of a GeoShape e.g. GeoCircle.
*
* @property geoMidpoint
* @type GeoCoordinates
*/
prototype.geoMidpoint = null;
/**
* Schema.org/geoRadius
* Indicates the approximate radius of a GeoCircle (metres unless indicated otherwise via Distance notation).
*
* @property geoRadius
* @type schema, Number | schema,Text | schema,Distance
*/
prototype.geoRadius = null;
}, {geoMidpoint: "GeoCoordinates", geoRadius: "Object", elevation: "Object", addressCountry: "Object", address: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LocationFeatureSpecification
* Specifies a location feature by providing a structured value representing a feature of an accommodation as a property-value pair of varying degrees of formality.
*
* @author schema.org
* @class LocationFeatureSpecification
* @module org.schema
* @extends PropertyValue
*/
var LocationFeatureSpecification = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PropertyValue.call(this);
this.context = "http://schema.org/";
this.type = "LocationFeatureSpecification";
};
LocationFeatureSpecification = stjs.extend(LocationFeatureSpecification, PropertyValue, [], function(constructor, prototype) {
/**
* Schema.org/validFrom
* The date when the item becomes valid.
*
* @property validFrom
* @type DateTime
*/
prototype.validFrom = null;
/**
* Schema.org/hoursAvailable
* The hours during which this service or contact is available.
*
* @property hoursAvailable
* @type OpeningHoursSpecification
*/
prototype.hoursAvailable = null;
/**
* Schema.org/validThrough
* The date after when the item is not valid. For example the end of an offer, salary period, or a period of opening hours.
*
* @property validThrough
* @type DateTime
*/
prototype.validThrough = null;
}, {hoursAvailable: "OpeningHoursSpecification", unitCode: "Object", valueReference: "Object", propertyID: "Object", value: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PostalAddress
* The mailing address.
*
* @author schema.org
* @class PostalAddress
* @module org.schema
* @extends ContactPoint
*/
var PostalAddress = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ContactPoint.call(this);
this.context = "http://schema.org/";
this.type = "PostalAddress";
};
PostalAddress = stjs.extend(PostalAddress, ContactPoint, [], function(constructor, prototype) {
/**
* Schema.org/postalCode
* The postal code. For example, 94043.
*
* @property postalCode
* @type Text
*/
prototype.postalCode = null;
/**
* Schema.org/postOfficeBoxNumber
* The post office box number for PO box addresses.
*
* @property postOfficeBoxNumber
* @type Text
*/
prototype.postOfficeBoxNumber = null;
/**
* Schema.org/addressLocality
* The locality. For example, Mountain View.
*
* @property addressLocality
* @type Text
*/
prototype.addressLocality = null;
/**
* Schema.org/addressCountry
* The country. For example, USA. You can also provide the two-letter [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1).
*
* @property addressCountry
* @type schema, Text | schema,Country
*/
prototype.addressCountry = null;
/**
* Schema.org/streetAddress
* The street address. For example, 1600 Amphitheatre Pkwy.
*
* @property streetAddress
* @type Text
*/
prototype.streetAddress = null;
/**
* Schema.org/addressRegion
* The region. For example, CA.
*
* @property addressRegion
* @type Text
*/
prototype.addressRegion = null;
}, {addressCountry: "Object", productSupported: "Object", availableLanguage: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", serviceArea: "Object", contactOption: "ContactPointOption", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DriveWheelConfigurationValue
* A value indicating which roadwheels will receive torque.
*
* @author schema.org
* @class DriveWheelConfigurationValue
* @module org.schema
* @extends QualitativeValue
*/
var DriveWheelConfigurationValue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
QualitativeValue.call(this);
this.context = "http://schema.org/";
this.type = "DriveWheelConfigurationValue";
};
DriveWheelConfigurationValue = stjs.extend(DriveWheelConfigurationValue, QualitativeValue, [], null, {greaterOrEqual: "QualitativeValue", additionalProperty: "PropertyValue", nonEqual: "QualitativeValue", lesser: "QualitativeValue", lesserOrEqual: "QualitativeValue", equal: "QualitativeValue", greater: "QualitativeValue", valueReference: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SteeringPositionValue
* A value indicating a steering position.
*
* @author schema.org
* @class SteeringPositionValue
* @module org.schema
* @extends QualitativeValue
*/
var SteeringPositionValue = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
QualitativeValue.call(this);
this.context = "http://schema.org/";
this.type = "SteeringPositionValue";
};
SteeringPositionValue = stjs.extend(SteeringPositionValue, QualitativeValue, [], null, {greaterOrEqual: "QualitativeValue", additionalProperty: "PropertyValue", nonEqual: "QualitativeValue", lesser: "QualitativeValue", lesserOrEqual: "QualitativeValue", equal: "QualitativeValue", greater: "QualitativeValue", valueReference: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LockerDelivery
* A DeliveryMethod in which an item is made available via locker.
*
* @author schema.org
* @class LockerDelivery
* @module org.schema
* @extends DeliveryMethod
*/
var LockerDelivery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
DeliveryMethod.call(this);
this.context = "http://schema.org/";
this.type = "LockerDelivery";
};
LockerDelivery = stjs.extend(LockerDelivery, DeliveryMethod, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ParcelService
* A private parcel service as the delivery mode available for a certain offer.\n\nCommonly used values:\n\n* http://purl.org/goodrelations/v1#DHL\n* http://purl.org/goodrelations/v1#FederalExpress\n* http://purl.org/goodrelations/v1#UPS
*
* @author schema.org
* @class ParcelService
* @module org.schema
* @extends DeliveryMethod
*/
var ParcelService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
DeliveryMethod.call(this);
this.context = "http://schema.org/";
this.type = "ParcelService";
};
ParcelService = stjs.extend(ParcelService, DeliveryMethod, [], null, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BlogPosting
* A blog post.
*
* @author schema.org
* @class BlogPosting
* @module org.schema
* @extends SocialMediaPosting
*/
var BlogPosting = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SocialMediaPosting.call(this);
this.context = "http://schema.org/";
this.type = "BlogPosting";
};
BlogPosting = stjs.extend(BlogPosting, SocialMediaPosting, [], null, {sharedContent: "CreativeWork", pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DiscussionForumPosting
* A posting to a discussion forum.
*
* @author schema.org
* @class DiscussionForumPosting
* @module org.schema
* @extends SocialMediaPosting
*/
var DiscussionForumPosting = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SocialMediaPosting.call(this);
this.context = "http://schema.org/";
this.type = "DiscussionForumPosting";
};
DiscussionForumPosting = stjs.extend(DiscussionForumPosting, SocialMediaPosting, [], null, {sharedContent: "CreativeWork", pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/APIReference
* Reference documentation for application programming interfaces (APIs).
*
* @author schema.org
* @class APIReference
* @module org.schema
* @extends TechArticle
*/
var APIReference = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
TechArticle.call(this);
this.context = "http://schema.org/";
this.type = "APIReference";
};
APIReference = stjs.extend(APIReference, TechArticle, [], function(constructor, prototype) {
/**
* Schema.org/assembly
* Library file name e.g., mscorlib.dll, system.web.dll.
*
* @property assembly
* @type Text
*/
prototype.assembly = null;
/**
* Schema.org/executableLibraryName
* Library file name e.g., mscorlib.dll, system.web.dll.
*
* @property executableLibraryName
* @type Text
*/
prototype.executableLibraryName = null;
/**
* Schema.org/assemblyVersion
* Associated product/technology version. e.g., .NET Framework 4.5.
*
* @property assemblyVersion
* @type Text
*/
prototype.assemblyVersion = null;
/**
* Schema.org/targetPlatform
* Type of app development: phone, Metro style, desktop, XBox, etc.
*
* @property targetPlatform
* @type Text
*/
prototype.targetPlatform = null;
/**
* Schema.org/programmingModel
* Indicates whether API is managed or unmanaged.
*
* @property programmingModel
* @type Text
*/
prototype.programmingModel = null;
}, {pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ImageGallery
* Web page type: Image gallery page.
*
* @author schema.org
* @class ImageGallery
* @module org.schema
* @extends CollectionPage
*/
var ImageGallery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CollectionPage.call(this);
this.context = "http://schema.org/";
this.type = "ImageGallery";
};
ImageGallery = stjs.extend(ImageGallery, CollectionPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VideoGallery
* Web page type: Video gallery page.
*
* @author schema.org
* @class VideoGallery
* @module org.schema
* @extends CollectionPage
*/
var VideoGallery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CollectionPage.call(this);
this.context = "http://schema.org/";
this.type = "VideoGallery";
};
VideoGallery = stjs.extend(VideoGallery, CollectionPage, [], null, {specialty: "Specialty", breadcrumb: "Object", primaryImageOfPage: "ImageObject", mainContentOfPage: "WebPageElement", reviewedBy: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Barcode
* An image of a visual machine-readable code such as a barcode or QR code.
*
* @author schema.org
* @class Barcode
* @module org.schema
* @extends ImageObject
*/
var Barcode = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ImageObject.call(this);
this.context = "http://schema.org/";
this.type = "Barcode";
};
Barcode = stjs.extend(Barcode, ImageObject, [], null, {exifData: "Object", thumbnail: "ImageObject", regionsAllowed: "Place", height: "Object", duration: "Duration", width: "Object", associatedArticle: "NewsArticle", productionCompany: "Organization", encodesCreativeWork: "CreativeWork", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PostOffice
* A post office.
*
* @author schema.org
* @class PostOffice
* @module org.schema
* @extends GovernmentOffice
*/
var PostOffice = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
GovernmentOffice.call(this);
this.context = "http://schema.org/";
this.type = "PostOffice";
};
PostOffice = stjs.extend(PostOffice, GovernmentOffice, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TattooParlor
* A tattoo parlor.
*
* @author schema.org
* @class TattooParlor
* @module org.schema
* @extends HealthAndBeautyBusiness
*/
var TattooParlor = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HealthAndBeautyBusiness.call(this);
this.context = "http://schema.org/";
this.type = "TattooParlor";
};
TattooParlor = stjs.extend(TattooParlor, HealthAndBeautyBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HairSalon
* A hair salon.
*
* @author schema.org
* @class HairSalon
* @module org.schema
* @extends HealthAndBeautyBusiness
*/
var HairSalon = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HealthAndBeautyBusiness.call(this);
this.context = "http://schema.org/";
this.type = "HairSalon";
};
HairSalon = stjs.extend(HairSalon, HealthAndBeautyBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/NailSalon
* A nail salon.
*
* @author schema.org
* @class NailSalon
* @module org.schema
* @extends HealthAndBeautyBusiness
*/
var NailSalon = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HealthAndBeautyBusiness.call(this);
this.context = "http://schema.org/";
this.type = "NailSalon";
};
NailSalon = stjs.extend(NailSalon, HealthAndBeautyBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DaySpa
* A day spa.
*
* @author schema.org
* @class DaySpa
* @module org.schema
* @extends HealthAndBeautyBusiness
*/
var DaySpa = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HealthAndBeautyBusiness.call(this);
this.context = "http://schema.org/";
this.type = "DaySpa";
};
DaySpa = stjs.extend(DaySpa, HealthAndBeautyBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BeautySalon
* Beauty salon.
*
* @author schema.org
* @class BeautySalon
* @module org.schema
* @extends HealthAndBeautyBusiness
*/
var BeautySalon = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HealthAndBeautyBusiness.call(this);
this.context = "http://schema.org/";
this.type = "BeautySalon";
};
BeautySalon = stjs.extend(BeautySalon, HealthAndBeautyBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ToyStore
* A toy store.
*
* @author schema.org
* @class ToyStore
* @module org.schema
* @extends Store
*/
var ToyStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "ToyStore";
};
ToyStore = stjs.extend(ToyStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ClothingStore
* A clothing store.
*
* @author schema.org
* @class ClothingStore
* @module org.schema
* @extends Store
*/
var ClothingStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "ClothingStore";
};
ClothingStore = stjs.extend(ClothingStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OutletStore
* An outlet store.
*
* @author schema.org
* @class OutletStore
* @module org.schema
* @extends Store
*/
var OutletStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "OutletStore";
};
OutletStore = stjs.extend(OutletStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MovieRentalStore
* A movie rental store.
*
* @author schema.org
* @class MovieRentalStore
* @module org.schema
* @extends Store
*/
var MovieRentalStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "MovieRentalStore";
};
MovieRentalStore = stjs.extend(MovieRentalStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/JewelryStore
* A jewelry store.
*
* @author schema.org
* @class JewelryStore
* @module org.schema
* @extends Store
*/
var JewelryStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "JewelryStore";
};
JewelryStore = stjs.extend(JewelryStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PawnShop
* A shop that will buy, or lend money against the security of, personal possessions.
*
* @author schema.org
* @class PawnShop
* @module org.schema
* @extends Store
*/
var PawnShop = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "PawnShop";
};
PawnShop = stjs.extend(PawnShop, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MobilePhoneStore
* A store that sells mobile phones and related accessories.
*
* @author schema.org
* @class MobilePhoneStore
* @module org.schema
* @extends Store
*/
var MobilePhoneStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "MobilePhoneStore";
};
MobilePhoneStore = stjs.extend(MobilePhoneStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SportingGoodsStore
* A sporting goods store.
*
* @author schema.org
* @class SportingGoodsStore
* @module org.schema
* @extends Store
*/
var SportingGoodsStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "SportingGoodsStore";
};
SportingGoodsStore = stjs.extend(SportingGoodsStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Florist
* A florist.
*
* @author schema.org
* @class Florist
* @module org.schema
* @extends Store
*/
var Florist = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "Florist";
};
Florist = stjs.extend(Florist, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ComputerStore
* A computer store.
*
* @author schema.org
* @class ComputerStore
* @module org.schema
* @extends Store
*/
var ComputerStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "ComputerStore";
};
ComputerStore = stjs.extend(ComputerStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ConvenienceStore
* A convenience store.
*
* @author schema.org
* @class ConvenienceStore
* @module org.schema
* @extends Store
*/
var ConvenienceStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "ConvenienceStore";
};
ConvenienceStore = stjs.extend(ConvenienceStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MensClothingStore
* A men's clothing store.
*
* @author schema.org
* @class MensClothingStore
* @module org.schema
* @extends Store
*/
var MensClothingStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "MensClothingStore";
};
MensClothingStore = stjs.extend(MensClothingStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HomeGoodsStore
* A home goods store.
*
* @author schema.org
* @class HomeGoodsStore
* @module org.schema
* @extends Store
*/
var HomeGoodsStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "HomeGoodsStore";
};
HomeGoodsStore = stjs.extend(HomeGoodsStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FurnitureStore
* A furniture store.
*
* @author schema.org
* @class FurnitureStore
* @module org.schema
* @extends Store
*/
var FurnitureStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "FurnitureStore";
};
FurnitureStore = stjs.extend(FurnitureStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ShoeStore
* A shoe store.
*
* @author schema.org
* @class ShoeStore
* @module org.schema
* @extends Store
*/
var ShoeStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "ShoeStore";
};
ShoeStore = stjs.extend(ShoeStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DepartmentStore
* A department store.
*
* @author schema.org
* @class DepartmentStore
* @module org.schema
* @extends Store
*/
var DepartmentStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "DepartmentStore";
};
DepartmentStore = stjs.extend(DepartmentStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GardenStore
* A garden store.
*
* @author schema.org
* @class GardenStore
* @module org.schema
* @extends Store
*/
var GardenStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "GardenStore";
};
GardenStore = stjs.extend(GardenStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HardwareStore
* A hardware store.
*
* @author schema.org
* @class HardwareStore
* @module org.schema
* @extends Store
*/
var HardwareStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "HardwareStore";
};
HardwareStore = stjs.extend(HardwareStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BikeStore
* A bike store.
*
* @author schema.org
* @class BikeStore
* @module org.schema
* @extends Store
*/
var BikeStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "BikeStore";
};
BikeStore = stjs.extend(BikeStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/OfficeEquipmentStore
* An office equipment store.
*
* @author schema.org
* @class OfficeEquipmentStore
* @module org.schema
* @extends Store
*/
var OfficeEquipmentStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "OfficeEquipmentStore";
};
OfficeEquipmentStore = stjs.extend(OfficeEquipmentStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BookStore
* A bookstore.
*
* @author schema.org
* @class BookStore
* @module org.schema
* @extends Store
*/
var BookStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "BookStore";
};
BookStore = stjs.extend(BookStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HobbyShop
* A store that sells materials useful or necessary for various hobbies.
*
* @author schema.org
* @class HobbyShop
* @module org.schema
* @extends Store
*/
var HobbyShop = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "HobbyShop";
};
HobbyShop = stjs.extend(HobbyShop, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TireShop
* A tire shop.
*
* @author schema.org
* @class TireShop
* @module org.schema
* @extends Store
*/
var TireShop = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "TireShop";
};
TireShop = stjs.extend(TireShop, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LiquorStore
* A shop that sells alcoholic drinks such as wine, beer, whisky and other spirits.
*
* @author schema.org
* @class LiquorStore
* @module org.schema
* @extends Store
*/
var LiquorStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "LiquorStore";
};
LiquorStore = stjs.extend(LiquorStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ElectronicsStore
* An electronics store.
*
* @author schema.org
* @class ElectronicsStore
* @module org.schema
* @extends Store
*/
var ElectronicsStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "ElectronicsStore";
};
ElectronicsStore = stjs.extend(ElectronicsStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PetStore
* A pet store.
*
* @author schema.org
* @class PetStore
* @module org.schema
* @extends Store
*/
var PetStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "PetStore";
};
PetStore = stjs.extend(PetStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MusicStore
* A music store.
*
* @author schema.org
* @class MusicStore
* @module org.schema
* @extends Store
*/
var MusicStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "MusicStore";
};
MusicStore = stjs.extend(MusicStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GroceryStore
* A grocery store.
*
* @author schema.org
* @class GroceryStore
* @module org.schema
* @extends Store
*/
var GroceryStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "GroceryStore";
};
GroceryStore = stjs.extend(GroceryStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WholesaleStore
* A wholesale store.
*
* @author schema.org
* @class WholesaleStore
* @module org.schema
* @extends Store
*/
var WholesaleStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
Store.call(this);
this.context = "http://schema.org/";
this.type = "WholesaleStore";
};
WholesaleStore = stjs.extend(WholesaleStore, Store, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Attorney
* Professional service: Attorney. \n\nThis type is deprecated - [[LegalService]] is more inclusive and less ambiguous.
*
* @author schema.org
* @class Attorney
* @module org.schema
* @extends LegalService
*/
var Attorney = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LegalService.call(this);
this.context = "http://schema.org/";
this.type = "Attorney";
};
Attorney = stjs.extend(Attorney, LegalService, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Notary
* A notary.
*
* @author schema.org
* @class Notary
* @module org.schema
* @extends LegalService
*/
var Notary = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LegalService.call(this);
this.context = "http://schema.org/";
this.type = "Notary";
};
Notary = stjs.extend(Notary, LegalService, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CafeOrCoffeeShop
* A cafe or coffee shop.
*
* @author schema.org
* @class CafeOrCoffeeShop
* @module org.schema
* @extends FoodEstablishment
*/
var CafeOrCoffeeShop = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "CafeOrCoffeeShop";
};
CafeOrCoffeeShop = stjs.extend(CafeOrCoffeeShop, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Brewery
* Brewery.
*
* @author schema.org
* @class Brewery
* @module org.schema
* @extends FoodEstablishment
*/
var Brewery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "Brewery";
};
Brewery = stjs.extend(Brewery, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Bakery
* A bakery.
*
* @author schema.org
* @class Bakery
* @module org.schema
* @extends FoodEstablishment
*/
var Bakery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "Bakery";
};
Bakery = stjs.extend(Bakery, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Restaurant
* A restaurant.
*
* @author schema.org
* @class Restaurant
* @module org.schema
* @extends FoodEstablishment
*/
var Restaurant = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "Restaurant";
};
Restaurant = stjs.extend(Restaurant, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/IceCreamShop
* An ice cream shop.
*
* @author schema.org
* @class IceCreamShop
* @module org.schema
* @extends FoodEstablishment
*/
var IceCreamShop = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "IceCreamShop";
};
IceCreamShop = stjs.extend(IceCreamShop, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Winery
* A winery.
*
* @author schema.org
* @class Winery
* @module org.schema
* @extends FoodEstablishment
*/
var Winery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "Winery";
};
Winery = stjs.extend(Winery, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/FastFoodRestaurant
* A fast-food restaurant.
*
* @author schema.org
* @class FastFoodRestaurant
* @module org.schema
* @extends FoodEstablishment
*/
var FastFoodRestaurant = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "FastFoodRestaurant";
};
FastFoodRestaurant = stjs.extend(FastFoodRestaurant, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BarOrPub
* A bar or pub.
*
* @author schema.org
* @class BarOrPub
* @module org.schema
* @extends FoodEstablishment
*/
var BarOrPub = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FoodEstablishment.call(this);
this.context = "http://schema.org/";
this.type = "BarOrPub";
};
BarOrPub = stjs.extend(BarOrPub, FoodEstablishment, [], null, {starRating: "Rating", acceptsReservations: "Object", menu: "Object", hasMenu: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutoBodyShop
* Auto body shop.
*
* @author schema.org
* @class AutoBodyShop
* @module org.schema
* @extends AutomotiveBusiness
*/
var AutoBodyShop = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AutoBodyShop";
};
AutoBodyShop = stjs.extend(AutoBodyShop, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GasStation
* A gas station.
*
* @author schema.org
* @class GasStation
* @module org.schema
* @extends AutomotiveBusiness
*/
var GasStation = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "GasStation";
};
GasStation = stjs.extend(GasStation, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutoDealer
* An car dealership.
*
* @author schema.org
* @class AutoDealer
* @module org.schema
* @extends AutomotiveBusiness
*/
var AutoDealer = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AutoDealer";
};
AutoDealer = stjs.extend(AutoDealer, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MotorcycleDealer
* A motorcycle dealer.
*
* @author schema.org
* @class MotorcycleDealer
* @module org.schema
* @extends AutomotiveBusiness
*/
var MotorcycleDealer = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "MotorcycleDealer";
};
MotorcycleDealer = stjs.extend(MotorcycleDealer, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutoWash
* A car wash business.
*
* @author schema.org
* @class AutoWash
* @module org.schema
* @extends AutomotiveBusiness
*/
var AutoWash = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AutoWash";
};
AutoWash = stjs.extend(AutoWash, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutoRental
* A car rental business.
*
* @author schema.org
* @class AutoRental
* @module org.schema
* @extends AutomotiveBusiness
*/
var AutoRental = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AutoRental";
};
AutoRental = stjs.extend(AutoRental, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutoPartsStore
* An auto parts store.
*
* @author schema.org
* @class AutoPartsStore
* @module org.schema
* @extends AutomotiveBusiness
*/
var AutoPartsStore = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AutoPartsStore";
};
AutoPartsStore = stjs.extend(AutoPartsStore, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutoRepair
* Car repair business.
*
* @author schema.org
* @class AutoRepair
* @module org.schema
* @extends AutomotiveBusiness
*/
var AutoRepair = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AutoRepair";
};
AutoRepair = stjs.extend(AutoRepair, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MotorcycleRepair
* A motorcycle repair shop.
*
* @author schema.org
* @class MotorcycleRepair
* @module org.schema
* @extends AutomotiveBusiness
*/
var MotorcycleRepair = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AutomotiveBusiness.call(this);
this.context = "http://schema.org/";
this.type = "MotorcycleRepair";
};
MotorcycleRepair = stjs.extend(MotorcycleRepair, AutomotiveBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/NightClub
* A nightclub or discotheque.
*
* @author schema.org
* @class NightClub
* @module org.schema
* @extends EntertainmentBusiness
*/
var NightClub = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EntertainmentBusiness.call(this);
this.context = "http://schema.org/";
this.type = "NightClub";
};
NightClub = stjs.extend(NightClub, EntertainmentBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Casino
* A casino.
*
* @author schema.org
* @class Casino
* @module org.schema
* @extends EntertainmentBusiness
*/
var Casino = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EntertainmentBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Casino";
};
Casino = stjs.extend(Casino, EntertainmentBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ComedyClub
* A comedy club.
*
* @author schema.org
* @class ComedyClub
* @module org.schema
* @extends EntertainmentBusiness
*/
var ComedyClub = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EntertainmentBusiness.call(this);
this.context = "http://schema.org/";
this.type = "ComedyClub";
};
ComedyClub = stjs.extend(ComedyClub, EntertainmentBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ArtGallery
* An art gallery.
*
* @author schema.org
* @class ArtGallery
* @module org.schema
* @extends EntertainmentBusiness
*/
var ArtGallery = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EntertainmentBusiness.call(this);
this.context = "http://schema.org/";
this.type = "ArtGallery";
};
ArtGallery = stjs.extend(ArtGallery, EntertainmentBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MovieTheater
* A movie theater.
*
* @author schema.org
* @class MovieTheater
* @module org.schema
* @extends EntertainmentBusiness
*/
var MovieTheater = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EntertainmentBusiness.call(this);
this.context = "http://schema.org/";
this.type = "MovieTheater";
};
MovieTheater = stjs.extend(MovieTheater, EntertainmentBusiness, [], function(constructor, prototype) {
/**
* Schema.org/screenCount
* The number of screens in the movie theater.
*
* @property screenCount
* @type Number
*/
prototype.screenCount = null;
}, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AdultEntertainment
* An adult entertainment establishment.
*
* @author schema.org
* @class AdultEntertainment
* @module org.schema
* @extends EntertainmentBusiness
*/
var AdultEntertainment = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EntertainmentBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AdultEntertainment";
};
AdultEntertainment = stjs.extend(AdultEntertainment, EntertainmentBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AmusementPark
* An amusement park.
*
* @author schema.org
* @class AmusementPark
* @module org.schema
* @extends EntertainmentBusiness
*/
var AmusementPark = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
EntertainmentBusiness.call(this);
this.context = "http://schema.org/";
this.type = "AmusementPark";
};
AmusementPark = stjs.extend(AmusementPark, EntertainmentBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Electrician
* An electrician.
*
* @author schema.org
* @class Electrician
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var Electrician = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Electrician";
};
Electrician = stjs.extend(Electrician, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Locksmith
* A locksmith.
*
* @author schema.org
* @class Locksmith
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var Locksmith = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Locksmith";
};
Locksmith = stjs.extend(Locksmith, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/MovingCompany
* A moving company.
*
* @author schema.org
* @class MovingCompany
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var MovingCompany = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "MovingCompany";
};
MovingCompany = stjs.extend(MovingCompany, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HousePainter
* A house painting service.
*
* @author schema.org
* @class HousePainter
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var HousePainter = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "HousePainter";
};
HousePainter = stjs.extend(HousePainter, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RoofingContractor
* A roofing contractor.
*
* @author schema.org
* @class RoofingContractor
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var RoofingContractor = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "RoofingContractor";
};
RoofingContractor = stjs.extend(RoofingContractor, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Plumber
* A plumbing service.
*
* @author schema.org
* @class Plumber
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var Plumber = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Plumber";
};
Plumber = stjs.extend(Plumber, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HVACBusiness
* A business that provide Heating, Ventilation and Air Conditioning services.
*
* @author schema.org
* @class HVACBusiness
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var HVACBusiness = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "HVACBusiness";
};
HVACBusiness = stjs.extend(HVACBusiness, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GeneralContractor
* A general contractor.
*
* @author schema.org
* @class GeneralContractor
* @module org.schema
* @extends HomeAndConstructionBusiness
*/
var GeneralContractor = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
HomeAndConstructionBusiness.call(this);
this.context = "http://schema.org/";
this.type = "GeneralContractor";
};
GeneralContractor = stjs.extend(GeneralContractor, HomeAndConstructionBusiness, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BankOrCreditUnion
* Bank or credit union.
*
* @author schema.org
* @class BankOrCreditUnion
* @module org.schema
* @extends FinancialService
*/
var BankOrCreditUnion = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialService.call(this);
this.context = "http://schema.org/";
this.type = "BankOrCreditUnion";
};
BankOrCreditUnion = stjs.extend(BankOrCreditUnion, FinancialService, [], null, {feesAndCommissionsSpecification: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AutomatedTeller
* ATM/cash machine.
*
* @author schema.org
* @class AutomatedTeller
* @module org.schema
* @extends FinancialService
*/
var AutomatedTeller = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialService.call(this);
this.context = "http://schema.org/";
this.type = "AutomatedTeller";
};
AutomatedTeller = stjs.extend(AutomatedTeller, FinancialService, [], null, {feesAndCommissionsSpecification: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AccountingService
* Accountancy business.\n\nAs a [[LocalBusiness]] it can be described as a [[provider]] of one or more [[Service]]\(s).
*
* @author schema.org
* @class AccountingService
* @module org.schema
* @extends FinancialService
*/
var AccountingService = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialService.call(this);
this.context = "http://schema.org/";
this.type = "AccountingService";
};
AccountingService = stjs.extend(AccountingService, FinancialService, [], null, {feesAndCommissionsSpecification: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InsuranceAgency
* An Insurance agency.
*
* @author schema.org
* @class InsuranceAgency
* @module org.schema
* @extends FinancialService
*/
var InsuranceAgency = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
FinancialService.call(this);
this.context = "http://schema.org/";
this.type = "InsuranceAgency";
};
InsuranceAgency = stjs.extend(InsuranceAgency, FinancialService, [], null, {feesAndCommissionsSpecification: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BedAndBreakfast
* Bed and breakfast.
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class BedAndBreakfast
* @module org.schema
* @extends LodgingBusiness
*/
var BedAndBreakfast = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LodgingBusiness.call(this);
this.context = "http://schema.org/";
this.type = "BedAndBreakfast";
};
BedAndBreakfast = stjs.extend(BedAndBreakfast, LodgingBusiness, [], null, {audience: "Audience", amenityFeature: "LocationFeatureSpecification", availableLanguage: "Object", starRating: "Rating", petsAllowed: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Motel
* A motel.
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Motel
* @module org.schema
* @extends LodgingBusiness
*/
var Motel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LodgingBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Motel";
};
Motel = stjs.extend(Motel, LodgingBusiness, [], null, {audience: "Audience", amenityFeature: "LocationFeatureSpecification", availableLanguage: "Object", starRating: "Rating", petsAllowed: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Hotel
* A hotel is an establishment that provides lodging paid on a short-term basis (Source: Wikipedia, the free encyclopedia, see http://en.wikipedia.org/wiki/Hotel).
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Hotel
* @module org.schema
* @extends LodgingBusiness
*/
var Hotel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LodgingBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Hotel";
};
Hotel = stjs.extend(Hotel, LodgingBusiness, [], null, {audience: "Audience", amenityFeature: "LocationFeatureSpecification", availableLanguage: "Object", starRating: "Rating", petsAllowed: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Hostel
* A hostel - cheap accommodation, often in shared dormitories.
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Hostel
* @module org.schema
* @extends LodgingBusiness
*/
var Hostel = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LodgingBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Hostel";
};
Hostel = stjs.extend(Hostel, LodgingBusiness, [], null, {audience: "Audience", amenityFeature: "LocationFeatureSpecification", availableLanguage: "Object", starRating: "Rating", petsAllowed: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/Resort
* A resort is a place used for relaxation or recreation, attracting visitors for holidays or vacations. Resorts are places, towns or sometimes commercial establishment operated by a single company (Source: Wikipedia, the free encyclopedia, see <a href="http://en.wikipedia.org/wiki/Resort">http://en.wikipedia.org/wiki/Resort</a>).
* <br /><br />
* See also the <a href="/docs/hotels.html">dedicated document on the use of schema.org for marking up hotels and other forms of accommodations</a>.
*
* @author schema.org
* @class Resort
* @module org.schema
* @extends LodgingBusiness
*/
var Resort = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
LodgingBusiness.call(this);
this.context = "http://schema.org/";
this.type = "Resort";
};
Resort = stjs.extend(Resort, LodgingBusiness, [], null, {audience: "Audience", amenityFeature: "LocationFeatureSpecification", availableLanguage: "Object", starRating: "Rating", petsAllowed: "Object", branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/GolfCourse
* A golf course.
*
* @author schema.org
* @class GolfCourse
* @module org.schema
* @extends SportsActivityLocation
*/
var GolfCourse = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "GolfCourse";
};
GolfCourse = stjs.extend(GolfCourse, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/BowlingAlley
* A bowling alley.
*
* @author schema.org
* @class BowlingAlley
* @module org.schema
* @extends SportsActivityLocation
*/
var BowlingAlley = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "BowlingAlley";
};
BowlingAlley = stjs.extend(BowlingAlley, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/TennisComplex
* A tennis complex.
*
* @author schema.org
* @class TennisComplex
* @module org.schema
* @extends SportsActivityLocation
*/
var TennisComplex = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "TennisComplex";
};
TennisComplex = stjs.extend(TennisComplex, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SkiResort
* A ski resort.
*
* @author schema.org
* @class SkiResort
* @module org.schema
* @extends SportsActivityLocation
*/
var SkiResort = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "SkiResort";
};
SkiResort = stjs.extend(SkiResort, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ExerciseGym
* A gym.
*
* @author schema.org
* @class ExerciseGym
* @module org.schema
* @extends SportsActivityLocation
*/
var ExerciseGym = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "ExerciseGym";
};
ExerciseGym = stjs.extend(ExerciseGym, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/StadiumOrArena
* A stadium.
*
* @author schema.org
* @class StadiumOrArena
* @module org.schema
* @extends SportsActivityLocation
*/
var StadiumOrArena = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "StadiumOrArena";
};
StadiumOrArena = stjs.extend(StadiumOrArena, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/SportsClub
* A sports club.
*
* @author schema.org
* @class SportsClub
* @module org.schema
* @extends SportsActivityLocation
*/
var SportsClub = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "SportsClub";
};
SportsClub = stjs.extend(SportsClub, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/HealthClub
* A health club.
*
* @author schema.org
* @class HealthClub
* @module org.schema
* @extends SportsActivityLocation
*/
var HealthClub = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "HealthClub";
};
HealthClub = stjs.extend(HealthClub, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PublicSwimmingPool
* A public swimming pool.
*
* @author schema.org
* @class PublicSwimmingPool
* @module org.schema
* @extends SportsActivityLocation
*/
var PublicSwimmingPool = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
SportsActivityLocation.call(this);
this.context = "http://schema.org/";
this.type = "PublicSwimmingPool";
};
PublicSwimmingPool = stjs.extend(PublicSwimmingPool, SportsActivityLocation, [], null, {branchOf: "Organization", reviews: "Review", event: "Event", member: "Object", memberOf: "Object", contactPoints: "ContactPoint", events: "Event", review: "Review", numberOfEmployees: "QuantitativeValue", department: "Organization", brand: "Object", areaServed: "Object", parentOrganization: "Organization", address: "Object", contactPoint: "ContactPoint", funder: "Object", subOrganization: "Organization", alumni: "Person", seeks: "Demand", sponsor: "Object", members: "Object", location: "Object", serviceArea: "Object", hasPOS: "Place", aggregateRating: "AggregateRating", founder: "Person", founders: "Person", employee: "Person", logo: "Object", owns: "Object", employees: "Person", foundingLocation: "Place", hasOfferCatalog: "OfferCatalog", makesOffer: "Offer", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WearAction
* The act of dressing oneself in clothing.
*
* @author schema.org
* @class WearAction
* @module org.schema
* @extends UseAction
*/
var WearAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
UseAction.call(this);
this.context = "http://schema.org/";
this.type = "WearAction";
};
WearAction = stjs.extend(WearAction, UseAction, [], null, {expectsAcceptanceOf: "Offer", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InsertAction
* The act of adding at a specific location in an ordered collection.
*
* @author schema.org
* @class InsertAction
* @module org.schema
* @extends AddAction
*/
var InsertAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AddAction.call(this);
this.context = "http://schema.org/";
this.type = "InsertAction";
};
InsertAction = stjs.extend(InsertAction, AddAction, [], function(constructor, prototype) {
/**
* Schema.org/toLocation
* A sub property of location. The final location of the object or the agent after the action.
*
* @property toLocation
* @type Place
*/
prototype.toLocation = null;
}, {toLocation: "Place", targetCollection: "Thing", collection: "Thing", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CancelAction
* The act of asserting that a future event/action is no longer going to happen.\n\nRelated actions:\n\n* [[ConfirmAction]]: The antonym of CancelAction.
*
* @author schema.org
* @class CancelAction
* @module org.schema
* @extends PlanAction
*/
var CancelAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlanAction.call(this);
this.context = "http://schema.org/";
this.type = "CancelAction";
};
CancelAction = stjs.extend(CancelAction, PlanAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReserveAction
* Reserving a concrete object.\n\nRelated actions:\n\n* [[ScheduleAction]]</a>: Unlike ScheduleAction, ReserveAction reserves concrete objects (e.g. a table, a hotel) towards a time slot / spatial allocation.
*
* @author schema.org
* @class ReserveAction
* @module org.schema
* @extends PlanAction
*/
var ReserveAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlanAction.call(this);
this.context = "http://schema.org/";
this.type = "ReserveAction";
};
ReserveAction = stjs.extend(ReserveAction, PlanAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ScheduleAction
* Scheduling future actions, events, or tasks.\n\nRelated actions:\n\n* [[ReserveAction]]: Unlike ReserveAction, ScheduleAction allocates future actions (e.g. an event, a task, etc) towards a time slot / spatial allocation.
*
* @author schema.org
* @class ScheduleAction
* @module org.schema
* @extends PlanAction
*/
var ScheduleAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PlanAction.call(this);
this.context = "http://schema.org/";
this.type = "ScheduleAction";
};
ScheduleAction = stjs.extend(ScheduleAction, PlanAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RejectAction
* The act of rejecting to/adopting an object.\n\nRelated actions:\n\n* [[AcceptAction]]: The antonym of RejectAction.
*
* @author schema.org
* @class RejectAction
* @module org.schema
* @extends AllocateAction
*/
var RejectAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AllocateAction.call(this);
this.context = "http://schema.org/";
this.type = "RejectAction";
};
RejectAction = stjs.extend(RejectAction, AllocateAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AuthorizeAction
* The act of granting permission to an object.
*
* @author schema.org
* @class AuthorizeAction
* @module org.schema
* @extends AllocateAction
*/
var AuthorizeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AllocateAction.call(this);
this.context = "http://schema.org/";
this.type = "AuthorizeAction";
};
AuthorizeAction = stjs.extend(AuthorizeAction, AllocateAction, [], function(constructor, prototype) {
/**
* Schema.org/recipient
* A sub property of participant. The participant who is at the receiving end of the action.
*
* @property recipient
* @type schema, Organization | schema,Person | schema,Audience
*/
prototype.recipient = null;
}, {recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AcceptAction
* The act of committing to/adopting an object.\n\nRelated actions:\n\n* [[RejectAction]]: The antonym of AcceptAction.
*
* @author schema.org
* @class AcceptAction
* @module org.schema
* @extends AllocateAction
*/
var AcceptAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AllocateAction.call(this);
this.context = "http://schema.org/";
this.type = "AcceptAction";
};
AcceptAction = stjs.extend(AcceptAction, AllocateAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AssignAction
* The act of allocating an action/event/task to some destination (someone or something).
*
* @author schema.org
* @class AssignAction
* @module org.schema
* @extends AllocateAction
*/
var AssignAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
AllocateAction.call(this);
this.context = "http://schema.org/";
this.type = "AssignAction";
};
AssignAction = stjs.extend(AssignAction, AllocateAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/VoteAction
* The act of expressing a preference from a fixed/finite/structured set of choices/options.
*
* @author schema.org
* @class VoteAction
* @module org.schema
* @extends ChooseAction
*/
var VoteAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ChooseAction.call(this);
this.context = "http://schema.org/";
this.type = "VoteAction";
};
VoteAction = stjs.extend(VoteAction, ChooseAction, [], function(constructor, prototype) {
/**
* Schema.org/candidate
* A sub property of object. The candidate subject of this action.
*
* @property candidate
* @type Person
*/
prototype.candidate = null;
}, {candidate: "Person", actionOption: "Object", option: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/WantAction
* The act of expressing a desire about the object. An agent wants an object.
*
* @author schema.org
* @class WantAction
* @module org.schema
* @extends ReactAction
*/
var WantAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ReactAction.call(this);
this.context = "http://schema.org/";
this.type = "WantAction";
};
WantAction = stjs.extend(WantAction, ReactAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AgreeAction
* The act of expressing a consistency of opinion with the object. An agent agrees to/about an object (a proposition, topic or theme) with participants.
*
* @author schema.org
* @class AgreeAction
* @module org.schema
* @extends ReactAction
*/
var AgreeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ReactAction.call(this);
this.context = "http://schema.org/";
this.type = "AgreeAction";
};
AgreeAction = stjs.extend(AgreeAction, ReactAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LikeAction
* The act of expressing a positive sentiment about the object. An agent likes an object (a proposition, topic or theme) with participants.
*
* @author schema.org
* @class LikeAction
* @module org.schema
* @extends ReactAction
*/
var LikeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ReactAction.call(this);
this.context = "http://schema.org/";
this.type = "LikeAction";
};
LikeAction = stjs.extend(LikeAction, ReactAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DislikeAction
* The act of expressing a negative sentiment about the object. An agent dislikes an object (a proposition, topic or theme) with participants.
*
* @author schema.org
* @class DislikeAction
* @module org.schema
* @extends ReactAction
*/
var DislikeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ReactAction.call(this);
this.context = "http://schema.org/";
this.type = "DislikeAction";
};
DislikeAction = stjs.extend(DislikeAction, ReactAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DisagreeAction
* The act of expressing a difference of opinion with the object. An agent disagrees to/about an object (a proposition, topic or theme) with participants.
*
* @author schema.org
* @class DisagreeAction
* @module org.schema
* @extends ReactAction
*/
var DisagreeAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ReactAction.call(this);
this.context = "http://schema.org/";
this.type = "DisagreeAction";
};
DisagreeAction = stjs.extend(DisagreeAction, ReactAction, [], null, {target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/EndorseAction
* An agent approves/certifies/likes/supports/sanction an object.
*
* @author schema.org
* @class EndorseAction
* @module org.schema
* @extends ReactAction
*/
var EndorseAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
ReactAction.call(this);
this.context = "http://schema.org/";
this.type = "EndorseAction";
};
EndorseAction = stjs.extend(EndorseAction, ReactAction, [], function(constructor, prototype) {
/**
* Schema.org/endorsee
* A sub property of participant. The person/organization being supported.
*
* @property endorsee
* @type schema, Organization | schema,Person
*/
prototype.endorsee = null;
}, {endorsee: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AskAction
* The act of posing a question / favor to someone.\n\nRelated actions:\n\n* [[ReplyAction]]: Appears generally as a response to AskAction.
*
* @author schema.org
* @class AskAction
* @module org.schema
* @extends CommunicateAction
*/
var AskAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "AskAction";
};
AskAction = stjs.extend(AskAction, CommunicateAction, [], function(constructor, prototype) {
/**
* Schema.org/question
* A sub property of object. A question.
*
* @property question
* @type Question
*/
prototype.question = null;
}, {question: "Question", language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ShareAction
* The act of distributing content to people for their amusement or edification.
*
* @author schema.org
* @class ShareAction
* @module org.schema
* @extends CommunicateAction
*/
var ShareAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "ShareAction";
};
ShareAction = stjs.extend(ShareAction, CommunicateAction, [], null, {language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InformAction
* The act of notifying someone of information pertinent to them, with no expectation of a response.
*
* @author schema.org
* @class InformAction
* @module org.schema
* @extends CommunicateAction
*/
var InformAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "InformAction";
};
InformAction = stjs.extend(InformAction, CommunicateAction, [], function(constructor, prototype) {
/**
* Schema.org/event
* Upcoming or past event associated with this place, organization, or action.
*
* @property event
* @type Event
*/
prototype.event = null;
}, {event: "Event", language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ReplyAction
* The act of responding to a question/message asked/sent by the object. Related to [[AskAction]]\n\nRelated actions:\n\n* [[AskAction]]: Appears generally as an origin of a ReplyAction.
*
* @author schema.org
* @class ReplyAction
* @module org.schema
* @extends CommunicateAction
*/
var ReplyAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "ReplyAction";
};
ReplyAction = stjs.extend(ReplyAction, CommunicateAction, [], function(constructor, prototype) {
/**
* Schema.org/resultComment
* A sub property of result. The Comment created or sent as a result of this action.
*
* @property resultComment
* @type Comment
*/
prototype.resultComment = null;
}, {resultComment: "Comment", language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CheckInAction
* The act of an agent communicating (service provider, social media, etc) their arrival by registering/confirming for a previously reserved service (e.g. flight check in) or at a place (e.g. hotel), possibly resulting in a result (boarding pass, etc).\n\nRelated actions:\n\n* [[CheckOutAction]]: The antonym of CheckInAction.\n* [[ArriveAction]]: Unlike ArriveAction, CheckInAction implies that the agent is informing/confirming the start of a previously reserved service.\n* [[ConfirmAction]]: Unlike ConfirmAction, CheckInAction implies that the agent is informing/confirming the *start* of a previously reserved service rather than its validity/existence.
*
* @author schema.org
* @class CheckInAction
* @module org.schema
* @extends CommunicateAction
*/
var CheckInAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "CheckInAction";
};
CheckInAction = stjs.extend(CheckInAction, CommunicateAction, [], null, {language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CheckOutAction
* The act of an agent communicating (service provider, social media, etc) their departure of a previously reserved service (e.g. flight check in) or place (e.g. hotel).\n\nRelated actions:\n\n* [[CheckInAction]]: The antonym of CheckOutAction.\n* [[DepartAction]]: Unlike DepartAction, CheckOutAction implies that the agent is informing/confirming the end of a previously reserved service.\n* [[CancelAction]]: Unlike CancelAction, CheckOutAction implies that the agent is informing/confirming the end of a previously reserved service.
*
* @author schema.org
* @class CheckOutAction
* @module org.schema
* @extends CommunicateAction
*/
var CheckOutAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "CheckOutAction";
};
CheckOutAction = stjs.extend(CheckOutAction, CommunicateAction, [], null, {language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/InviteAction
* The act of asking someone to attend an event. Reciprocal of RsvpAction.
*
* @author schema.org
* @class InviteAction
* @module org.schema
* @extends CommunicateAction
*/
var InviteAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "InviteAction";
};
InviteAction = stjs.extend(InviteAction, CommunicateAction, [], function(constructor, prototype) {
/**
* Schema.org/event
* Upcoming or past event associated with this place, organization, or action.
*
* @property event
* @type Event
*/
prototype.event = null;
}, {event: "Event", language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CommentAction
* The act of generating a comment about a subject.
*
* @author schema.org
* @class CommentAction
* @module org.schema
* @extends CommunicateAction
*/
var CommentAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
CommunicateAction.call(this);
this.context = "http://schema.org/";
this.type = "CommentAction";
};
CommentAction = stjs.extend(CommentAction, CommunicateAction, [], function(constructor, prototype) {
/**
* Schema.org/resultComment
* A sub property of result. The Comment created or sent as a result of this action.
*
* @property resultComment
* @type Comment
*/
prototype.resultComment = null;
}, {resultComment: "Comment", language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/CreditCard
* A card payment method of a particular brand or name. Used to mark up a particular payment method and/or the financial product/service that supplies the card account.\n\nCommonly used values:\n\n* http://purl.org/goodrelations/v1#AmericanExpress\n* http://purl.org/goodrelations/v1#DinersClub\n* http://purl.org/goodrelations/v1#Discover\n* http://purl.org/goodrelations/v1#JCB\n* http://purl.org/goodrelations/v1#MasterCard\n* http://purl.org/goodrelations/v1#VISA
*
* @author schema.org
* @class CreditCard
* @module org.schema
* @extends PaymentCard
*/
var CreditCard = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
PaymentCard.call(this);
this.context = "http://schema.org/";
this.type = "CreditCard";
};
CreditCard = stjs.extend(CreditCard, PaymentCard, [], null, {feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/DepositAccount
* A type of Bank Account with a main purpose of depositing funds to gain interest or other benefits.
*
* @author schema.org
* @class DepositAccount
* @module org.schema
* @extends InvestmentOrDeposit
*/
var DepositAccount = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InvestmentOrDeposit.call(this);
this.context = "http://schema.org/";
this.type = "DepositAccount";
};
DepositAccount = stjs.extend(DepositAccount, InvestmentOrDeposit, [], null, {amount: "Object", feesAndCommissionsSpecification: "Object", annualPercentageRate: "Object", interestRate: "Object", audience: "Audience", broker: "Object", isRelatedTo: "Object", offers: "Offer", review: "Review", brand: "Object", areaServed: "Object", hoursAvailable: "OpeningHoursSpecification", produces: "Thing", availableChannel: "ServiceChannel", isSimilarTo: "Object", provider: "Object", serviceArea: "Object", aggregateRating: "AggregateRating", serviceOutput: "Thing", logo: "Object", hasOfferCatalog: "OfferCatalog", serviceAudience: "Audience", category: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/LiveBlogPosting
* A blog post intended to provide a rolling textual coverage of an ongoing event through continuous updates.
*
* @author schema.org
* @class LiveBlogPosting
* @module org.schema
* @extends BlogPosting
*/
var LiveBlogPosting = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
BlogPosting.call(this);
this.context = "http://schema.org/";
this.type = "LiveBlogPosting";
};
LiveBlogPosting = stjs.extend(LiveBlogPosting, BlogPosting, [], function(constructor, prototype) {
/**
* Schema.org/coverageEndTime
* The time when the live blog will stop covering the Event. Note that coverage may continue after the Event concludes.
*
* @property coverageEndTime
* @type DateTime
*/
prototype.coverageEndTime = null;
/**
* Schema.org/coverageStartTime
* The time when the live blog will begin covering the Event. Note that coverage may begin before the Event's start time. The LiveBlogPosting may also be created before coverage begins.
*
* @property coverageStartTime
* @type DateTime
*/
prototype.coverageStartTime = null;
/**
* Schema.org/liveBlogUpdate
* An update to the LiveBlog.
*
* @property liveBlogUpdate
* @type BlogPosting
*/
prototype.liveBlogUpdate = null;
}, {liveBlogUpdate: "BlogPosting", sharedContent: "CreativeWork", pageStart: "Object", pageEnd: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/PrependAction
* The act of inserting at the beginning if an ordered collection.
*
* @author schema.org
* @class PrependAction
* @module org.schema
* @extends InsertAction
*/
var PrependAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InsertAction.call(this);
this.context = "http://schema.org/";
this.type = "PrependAction";
};
PrependAction = stjs.extend(PrependAction, InsertAction, [], null, {toLocation: "Place", targetCollection: "Thing", collection: "Thing", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/AppendAction
* The act of inserting at the end if an ordered collection.
*
* @author schema.org
* @class AppendAction
* @module org.schema
* @extends InsertAction
*/
var AppendAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InsertAction.call(this);
this.context = "http://schema.org/";
this.type = "AppendAction";
};
AppendAction = stjs.extend(AppendAction, InsertAction, [], null, {toLocation: "Place", targetCollection: "Thing", collection: "Thing", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/ConfirmAction
* The act of notifying someone that a future event/action is going to happen as expected.\n\nRelated actions:\n\n* [[CancelAction]]: The antonym of ConfirmAction.
*
* @author schema.org
* @class ConfirmAction
* @module org.schema
* @extends InformAction
*/
var ConfirmAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InformAction.call(this);
this.context = "http://schema.org/";
this.type = "ConfirmAction";
};
ConfirmAction = stjs.extend(ConfirmAction, InformAction, [], null, {event: "Event", language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Schema.org/RsvpAction
* The act of notifying an event organizer as to whether you expect to attend the event.
*
* @author schema.org
* @class RsvpAction
* @module org.schema
* @extends InformAction
*/
var RsvpAction = /**
* Constructor, automatically sets @context and @type.
*
* @constructor
*/
function() {
InformAction.call(this);
this.context = "http://schema.org/";
this.type = "RsvpAction";
};
RsvpAction = stjs.extend(RsvpAction, InformAction, [], function(constructor, prototype) {
/**
* Schema.org/additionalNumberOfGuests
* If responding yes, the number of guests who will attend in addition to the invitee.
*
* @property additionalNumberOfGuests
* @type Number
*/
prototype.additionalNumberOfGuests = null;
/**
* Schema.org/rsvpResponse
* The response (yes, no, maybe) to the RSVP.
*
* @property rsvpResponse
* @type RsvpResponseType
*/
prototype.rsvpResponse = null;
/**
* Schema.org/comment
* Comments, typically from users.
*
* @property comment
* @type Comment
*/
prototype.comment = null;
}, {rsvpResponse: "RsvpResponseType", comment: "Comment", event: "Event", language: "Language", about: "Thing", inLanguage: "Object", recipient: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CredentialingAction
* Action taken by an agent affecting the status of an object entity.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class CredentialingAction
* @module org.credentialengine
* @extends Action
*/
var CredentialingAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Action.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "CredentialingAction";
};
CredentialingAction = stjs.extend(CredentialingAction, Action, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CredentialAlignmentObject
* Entity describing an affiliation or association between an entity such as a credential, learning opportunity or assessment and another entity in a structured framework such as a concept scheme, enumerated list, or competency framework.
* @author credentialengine.org
* @class CredentialAlignmentObject
* @module org.credentialengine
* @extends AlignmentObject
*/
var CredentialAlignmentObject = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
AlignmentObject.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "CredentialAlignmentObject";
};
CredentialAlignmentObject = stjs.extend(CredentialAlignmentObject, AlignmentObject, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/alignmentDate
* The date the alignment was made.
* @property alignmentDate
* @type date
*/
prototype.alignmentDate = null;
/**
* http://purl.org/ctdl/terms/alignmentType
* Type of relationship between two entities.
* In CTDL, the alignment type value is definitively identified by the property for which the AlignmentObject is the rdfs:range; therefore, use of this property is generally redundant.
* @property alignmentType
* @type string
*/
prototype.alignmentType = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/framework
* Credential framework to which the entity is aligned.
* Frameworks may include, but are not limited to, competency frameworks and concept schemes such as industry, occupation, and instructional program codes.
* @property framework
* @type anyURI
*/
prototype.framework = null;
/**
* http://purl.org/ctdl/terms/frameworkName
* Name of the framework.
* @property frameworkName
* @type langString
*/
prototype.frameworkName = null;
/**
* http://purl.org/ctdl/terms/targetNode
* Individual entry in a formally defined framework such as a competency or an industry, instructional program, or occupation code.
* @property targetNode
* @type anyURI
*/
prototype.targetNode = null;
/**
* http://purl.org/ctdl/terms/targetNodeDescription
* Textual description of an individual concept or competency in a formally defined framework.
* @property targetNodeDescription
* @type langString
*/
prototype.targetNodeDescription = null;
/**
* http://purl.org/ctdl/terms/targetNodeName
* Name of an individual concept or competency in a formally defined framework.
* @property targetNodeName
* @type langString
*/
prototype.targetNodeName = null;
/**
* http://purl.org/ctdl/terms/weight
* Measurement of the weight, degree, percent, or strength of a recommendation, requirement, or comparison.
* @property weight
* @type float
*/
prototype.weight = null;
}, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/EarningsProfile
* Entity that describes earning and related statistical information for a given credential.
* @author credentialengine.org
* @class EarningsProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var EarningsProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "EarningsProfile";
};
EarningsProfile = stjs.extend(EarningsProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/highEarnings
* Upper interquartile earnings.
* @property highEarnings
* @type integer
*/
prototype.highEarnings = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/lowEarnings
* Lower interquartile earnings.
* @property lowEarnings
* @type integer
*/
prototype.lowEarnings = null;
/**
* http://purl.org/ctdl/terms/medianEarnings
* Median earnings.
* @property medianEarnings
* @type integer
*/
prototype.medianEarnings = null;
/**
* http://purl.org/ctdl/terms/postReceiptMonths
* Number of months after earning a credential when employment and earnings data is collected.
* Number of months usually range between 3 months (one quarter) to ten years.
* @property postReceiptMonths
* @type integer
*/
prototype.postReceiptMonths = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/source
* Authoritative source of an entity's information.
* Citation or description of an authoritative souce from which information or description has been derived.
* @property source
* @type anyURI
*/
prototype.source = null;
}, {jurisdiction: "JurisdictionProfile", region: "Place", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/AssessmentProfile
* Entity that describes the key characteristics of an assessment for a credential.
* Characteristics described include, but are not limited to, processes for assessment development, maintenance, selection and evaluation as well as assessment examples.
* @author credentialengine.org
* @class AssessmentProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var AssessmentProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "AssessmentProfile";
};
AssessmentProfile = stjs.extend(AssessmentProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/assesses
* Competency evaluated through the assessment.
* @property assesses
* @type Competency | CredentialAlignmentObject
*/
prototype.assesses = null;
/**
* http://purl.org/ctdl/terms/assessmentExample
* Example assessment or assessment item.
* @property assessmentExample
* @type anyURI
*/
prototype.assessmentExample = null;
/**
* http://purl.org/ctdl/terms/assessmentExampleDescription
* Text of an example assessment or assessment item.
* @property assessmentExampleDescription
* @type langString
*/
prototype.assessmentExampleDescription = null;
/**
* http://purl.org/ctdl/terms/assessmentMethodType
* Type of method used to conduct an assessment; select from an existing enumeration of such types.
* @property assessmentMethodType
* @type CredentialAlignmentObject
*/
prototype.assessmentMethodType = null;
/**
* http://purl.org/ctdl/terms/assessmentOutput
* Description of the assessment artifact, performance or examination.
* @property assessmentOutput
* @type langString
*/
prototype.assessmentOutput = null;
/**
* http://purl.org/ctdl/terms/assessmentUseType
* Type of intended use of the assessment; select from an existing enumeration of such types.
* @property assessmentUseType
* @type CredentialAlignmentObject
*/
prototype.assessmentUseType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/creditHourType
* Type of unit of time corresponding to type of credit such as semester hours, quarter hours, clock hours, or hours of participation.
* @property creditHourType
* @type langString
*/
prototype.creditHourType = null;
/**
* http://purl.org/ctdl/terms/creditHourValue
* Number of credit hours awarded for successful completion of a learning opportunity or assessment.
* @property creditHourValue
* @type float
*/
prototype.creditHourValue = null;
/**
* http://purl.org/ctdl/terms/creditUnitType
* Type of credit associated with both degree and non-degree learning opportunities; select from an existing enumeration of such types.
* @property creditUnitType
* @type CredentialAlignmentObject
*/
prototype.creditUnitType = null;
/**
* http://purl.org/ctdl/terms/creditUnitTypeDescription
* Detailed description of credit unit type.
* @property creditUnitTypeDescription
* @type langString
*/
prototype.creditUnitTypeDescription = null;
/**
* http://purl.org/ctdl/terms/creditUnitValue
* Number of either credit units awarded for college credit or continuing education units for successful completion of the learning opportunity or assessment.
* @property creditUnitValue
* @type float
*/
prototype.creditUnitValue = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/deliveryType
* Type of means by which a learning opportunity or assessment is delivered to credential seekers and by which they interact; select from an existing enumeration of such types.
* @property deliveryType
* @type CredentialAlignmentObject
*/
prototype.deliveryType = null;
/**
* http://purl.org/ctdl/terms/deliveryTypeDescription
* Detailed description of the delivery type of an assessment or learning opportunity.
* @property deliveryTypeDescription
* @type langString
*/
prototype.deliveryTypeDescription = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/entryCondition
* Prerequisites for entry into a credentialing program, a learning opportunity or an assessment including transcripts, records of previous experience, and lower-level learning opportunities.
* @property entryCondition
* @type ConditionProfile
*/
prototype.entryCondition = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/externalResearch
* Research that supports or validates one or more aspects of the entity.
* @property externalResearch
* @type anyURI
*/
prototype.externalResearch = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasGroupEvaluation
* Whether or not the assessment activity is scored as a group.
* @property hasGroupEvaluation
* @type boolean
*/
prototype.hasGroupEvaluation = false;
/**
* http://purl.org/ctdl/terms/hasGroupParticipation
* Whether or not two or more participants are required to complete the assessment activity.
* @property hasGroupParticipation
* @type boolean
*/
prototype.hasGroupParticipation = false;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/instructionalProgramType
* Type of instructional program; select from an existing enumeration of such types.
* @property instructionalProgramType
* @type CredentialAlignmentObject
*/
prototype.instructionalProgramType = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isProctored
* Whether or not the assessment is supervised or monitored by an agent.
* Such supervision or proctoring includes: (1) guaranteeing of the identities of the examinees; (2) the conditions of the examination including instructions, time, materials, equipment and completion, and (3) completed without unauthorized assistance.
* @property isProctored
* @type boolean
*/
prototype.isProctored = false;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/scoringMethodDescription
* Textual description of the method used to score the assessment.
* @property scoringMethodDescription
* @type langString
*/
prototype.scoringMethodDescription = null;
/**
* http://purl.org/ctdl/terms/scoringMethodExample
* Webpage or online document providing an example of the method or tool used to score the assessment.
* @property scoringMethodExample
* @type anyURI
*/
prototype.scoringMethodExample = null;
/**
* http://purl.org/ctdl/terms/scoringMethodExampleDescription
* Textual example of the method or tool used to score the assessment.
* @property scoringMethodExampleDescription
* @type langString
*/
prototype.scoringMethodExampleDescription = null;
/**
* http://purl.org/ctdl/terms/scoringMethodType
* Type of method used to score the assessment; select from an existing enumeration of such types.
* @property scoringMethodType
* @type CredentialAlignmentObject
*/
prototype.scoringMethodType = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/targetAssessment
* Assessment that provides direct, indirect, formative or summative evaluation or estimation of the nature, ability, or quality for an entity.
* @property targetAssessment
* @type Assessment | AssessmentProfile
*/
prototype.targetAssessment = null;
/**
* http://purl.org/ctdl/terms/verificationMethodDescription
* Textual description of the methods used to evaluate an assessment, learning opportunity, process or verificaiton service for validity or reliability.
* @property verificationMethodDescription
* @type langString
*/
prototype.verificationMethodDescription = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", approvedBy: "Object", approvedIn: "JurisdictionProfile", assesses: "Object", assessmentMethodType: "CredentialAlignmentObject", assessmentUseType: "CredentialAlignmentObject", availableAt: "Place", commonConditions: "ConditionManifest", commonCosts: "CostManifest", corequisite: "ConditionProfile", creditUnitType: "CredentialAlignmentObject", deliveryType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", entryCondition: "ConditionProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", financialAssistance: "FinancialAlignmentObject", instructionalProgramType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", maintenanceProcess: "ProcessProfile", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", requires: "Object", scoringMethodType: "CredentialAlignmentObject", subject: "CredentialAlignmentObject", targetAssessment: "Object", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ProcessProfile
* Entity describing the type, nature, and other relevant information about a process related to a credential.
* @author credentialengine.org
* @class ProcessProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var ProcessProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "ProcessProfile";
};
ProcessProfile = stjs.extend(ProcessProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/externalInputType
* Types of external stakeholders that provide input to an entity's processes or resources; select from an existing enumeration of such types.
* @property externalInputType
* @type CredentialAlignmentObject
*/
prototype.externalInputType = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/processFrequency
* Interval of process occurence.
* @property processFrequency
* @type langString
*/
prototype.processFrequency = null;
/**
* http://purl.org/ctdl/terms/processingAgent
* Organization or person performing the process.
* @property processingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.processingAgent = null;
/**
* http://purl.org/ctdl/terms/processMethod
* Webpage or online document that describes the process methods.
* @property processMethod
* @type anyURI
*/
prototype.processMethod = null;
/**
* http://purl.org/ctdl/terms/processMethodDescription
* Textual description of the process methods.
* @property processMethodDescription
* @type langString
*/
prototype.processMethodDescription = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/scoringMethodDescription
* Textual description of the method used to score the assessment.
* @property scoringMethodDescription
* @type langString
*/
prototype.scoringMethodDescription = null;
/**
* http://purl.org/ctdl/terms/scoringMethodExample
* Webpage or online document providing an example of the method or tool used to score the assessment.
* @property scoringMethodExample
* @type anyURI
*/
prototype.scoringMethodExample = null;
/**
* http://purl.org/ctdl/terms/scoringMethodExampleDescription
* Textual example of the method or tool used to score the assessment.
* @property scoringMethodExampleDescription
* @type langString
*/
prototype.scoringMethodExampleDescription = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/targetAssessment
* Assessment that provides direct, indirect, formative or summative evaluation or estimation of the nature, ability, or quality for an entity.
* @property targetAssessment
* @type Assessment | AssessmentProfile
*/
prototype.targetAssessment = null;
/**
* http://purl.org/ctdl/terms/targetCompetencyFramework
* Competency framework relevant to the process being described.
* @property targetCompetencyFramework
* @type CompetencyFramework | CredentialAlignmentObject
*/
prototype.targetCompetencyFramework = null;
/**
* http://purl.org/ctdl/terms/targetCredential
* Credential that is a focus or target of the condition, process or verification service.
* @property targetCredential
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.targetCredential = null;
/**
* http://purl.org/ctdl/terms/targetLearningOpportunity
* Learning opportunity that is the focus of a condition, process or another learning opportunity.
* @property targetLearningOpportunity
* @type LearningOpportunity | LearningOpportunityProfile
*/
prototype.targetLearningOpportunity = null;
/**
* http://purl.org/ctdl/terms/verificationMethodDescription
* Textual description of the methods used to evaluate an assessment, learning opportunity, process or verificaiton service for validity or reliability.
* @property verificationMethodDescription
* @type langString
*/
prototype.verificationMethodDescription = null;
}, {externalInputType: "CredentialAlignmentObject", jurisdiction: "JurisdictionProfile", processingAgent: "Object", region: "Place", targetAssessment: "Object", targetCompetencyFramework: "Object", targetCredential: "Object", targetLearningOpportunity: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/LearningResource
* Entity that is used as part of an learning activity (e.g. a textbook) or that describes (e.g. a lesson plan) or records the educational activity (e.g. an audio- or video-recording of a lesson).
* @author credentialengine.org
* @class LearningResource
* @module org.credentialengine
* @extends CreativeWork
*/
var LearningResource = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "LearningResource";
};
LearningResource = stjs.extend(LearningResource, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/JurisdictionProfile
* Geo-political information about applicable geographic areas and their exceptions.
* @author credentialengine.org
* @class JurisdictionProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var JurisdictionProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "JurisdictionProfile";
};
JurisdictionProfile = stjs.extend(JurisdictionProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/assertedBy
* Agent making a statement based on fact or belief.
* @property assertedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.assertedBy = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/globalJurisdiction
* Whether or not the credential is useful, applicable or recognized everywhere.
* Exceptions indicated by the ceterms:jurisdictionException property apply.
* @property globalJurisdiction
* @type boolean
*/
prototype.globalJurisdiction = false;
/**
* http://purl.org/ctdl/terms/jurisdictionException
* Geographic or political region in which the credential is not formally recognized or an organization has no authority to act .
* The ceterms:jurisdictionalException property is used in conjunction with the ceterms:jurisdiction property and expresses any exceptions to a more general statement; e.g., the United states except for Colorado.
* @property jurisdictionException
* @type Place
*/
prototype.jurisdictionException = null;
/**
* http://purl.org/ctdl/terms/mainJurisdiction
* Primary geographic or political region in which the credential is recognized as applicable or in which an organization has recognized authority to act.
* @property mainJurisdiction
* @type Place
*/
prototype.mainJurisdiction = null;
}, {assertedBy: "Object", jurisdictionException: "Place", mainJurisdiction: "Place", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/RevocationProfile
* Entity describing conditions and methods by which a credential can be removed from a holder.
* @author credentialengine.org
* @class RevocationProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var RevocationProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "RevocationProfile";
};
RevocationProfile = stjs.extend(RevocationProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/revocationCriteria
* Webpage or online document that provides information about the removal criteria for an awarded credential.
* @property revocationCriteria
* @type anyURI
*/
prototype.revocationCriteria = null;
/**
* http://purl.org/ctdl/terms/revocationCriteriaDescription
* Textual description providing information about the removal criteria for an awarded credential.
* @property revocationCriteriaDescription
* @type langString
*/
prototype.revocationCriteriaDescription = null;
}, {jurisdiction: "JurisdictionProfile", region: "Place", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Credential
* Qualification, achievement, personal or organizational quality, or aspect of an identity typically used to indicate suitability.
* The ceterms:Credential class is broadly defined to encompass credentials used across domains and communities of practice. The class should be used only when speaking of credentials in general. Subclasses of ceterms:Credential as defined by Credential Engine (or other communities) should be used when referencing specific types of credentials.
* @author credentialengine.org
* @class Credential
* @module org.credentialengine
* @extends CreativeWork
*/
var Credential = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "Credential";
};
Credential = stjs.extend(Credential, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/TaskProfile
* Entity describing the required or recommended tasks to be performed by a holder of, or applicant for, a credential.
* @author credentialengine.org
* @class TaskProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var TaskProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "TaskProfile";
};
TaskProfile = stjs.extend(TaskProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/affiliatedAgent
* Organization or person that plays some role in assigning, performing, assisting with, facilitating, approving of, or otherwise being involved with the task being described.
* @property affiliatedAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.affiliatedAgent = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/taskDetails
* Webpage or online document that provides additional information about the task.
* @property taskDetails
* @type anyURI
*/
prototype.taskDetails = null;
}, {affiliatedAgent: "Object", availableAt: "Place", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", jurisdiction: "JurisdictionProfile", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CostProfile
* Entity that describes direct costs one would incur if one were to pursue a credential, assessment, learning opportunity, or aspects thereof.
* @author credentialengine.org
* @class CostProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var CostProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "CostProfile";
};
CostProfile = stjs.extend(CostProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/audienceType
* Type of credential seeker for whom the particular condition or cost is applicable; select from an existing enumeration of such types.
* @property audienceType
* @type CredentialAlignmentObject
*/
prototype.audienceType = null;
/**
* http://purl.org/ctdl/terms/condition
* Single constraint, prerequisite, entry condition, requirement, or cost.
* @property condition
* @type langString
*/
prototype.condition = null;
/**
* http://purl.org/ctdl/terms/costDetails
* Webpage or online document containing human-readable, in-depth information about costs.
* @property costDetails
* @type anyURI
*/
prototype.costDetails = null;
/**
* http://purl.org/ctdl/terms/currency
* Currency in which the monetary amount is expressed in 3-letter ISO 4217 format such as "USD".
* @property currency
* @type string
*/
prototype.currency = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/directCostType
* Types of direct costs associated with earning or completing a credential, assessment or learning opportunity; select from an existing enumeration of such types.
* @property directCostType
* @type CredentialAlignmentObject
*/
prototype.directCostType = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/paymentPattern
* Applicable pattern for payments such as "per sementer" and "every three months".
* @property paymentPattern
* @type langString
*/
prototype.paymentPattern = null;
/**
* http://purl.org/ctdl/terms/price
* Offer price of a credential, learning resource, assessment, related activity or resource.
* @property price
* @type integer
*/
prototype.price = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/residencyType
* Type of legal residency status of a person; select from an existing enumeration of such types.
* Residency defines the duration of stay required by national, state, provincial or local laws that entitles a person to the legal protection and benefits provided to the applicable type.
* @property residencyType
* @type CredentialAlignmentObject
*/
prototype.residencyType = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {audienceType: "CredentialAlignmentObject", directCostType: "CredentialAlignmentObject", jurisdiction: "JurisdictionProfile", region: "Place", residencyType: "CredentialAlignmentObject", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/LearningOpportunityProfile
* Entity describing a learning opportunity.
* Educational opportunities include required and optional programs, courses of study, and other structured experiences intended to serve as educational or training events.
* @author credentialengine.org
* @class LearningOpportunityProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var LearningOpportunityProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "LearningOpportunityProfile";
};
LearningOpportunityProfile = stjs.extend(LearningOpportunityProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/creditHourType
* Type of unit of time corresponding to type of credit such as semester hours, quarter hours, clock hours, or hours of participation.
* @property creditHourType
* @type langString
*/
prototype.creditHourType = null;
/**
* http://purl.org/ctdl/terms/creditHourValue
* Number of credit hours awarded for successful completion of a learning opportunity or assessment.
* @property creditHourValue
* @type float
*/
prototype.creditHourValue = null;
/**
* http://purl.org/ctdl/terms/creditUnitType
* Type of credit associated with both degree and non-degree learning opportunities; select from an existing enumeration of such types.
* @property creditUnitType
* @type CredentialAlignmentObject
*/
prototype.creditUnitType = null;
/**
* http://purl.org/ctdl/terms/creditUnitTypeDescription
* Detailed description of credit unit type.
* @property creditUnitTypeDescription
* @type langString
*/
prototype.creditUnitTypeDescription = null;
/**
* http://purl.org/ctdl/terms/creditUnitValue
* Number of either credit units awarded for college credit or continuing education units for successful completion of the learning opportunity or assessment.
* @property creditUnitValue
* @type float
*/
prototype.creditUnitValue = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/deliveryType
* Type of means by which a learning opportunity or assessment is delivered to credential seekers and by which they interact; select from an existing enumeration of such types.
* @property deliveryType
* @type CredentialAlignmentObject
*/
prototype.deliveryType = null;
/**
* http://purl.org/ctdl/terms/deliveryTypeDescription
* Detailed description of the delivery type of an assessment or learning opportunity.
* @property deliveryTypeDescription
* @type langString
*/
prototype.deliveryTypeDescription = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/entryCondition
* Prerequisites for entry into a credentialing program, a learning opportunity or an assessment including transcripts, records of previous experience, and lower-level learning opportunities.
* @property entryCondition
* @type ConditionProfile
*/
prototype.entryCondition = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/instructionalProgramType
* Type of instructional program; select from an existing enumeration of such types.
* @property instructionalProgramType
* @type CredentialAlignmentObject
*/
prototype.instructionalProgramType = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/learningMethodType
* Types of methods used to conduct the learning opportunity; select from an existing enumeration of such types.
* @property learningMethodType
* @type CredentialAlignmentObject
*/
prototype.learningMethodType = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/targetAssessment
* Assessment that provides direct, indirect, formative or summative evaluation or estimation of the nature, ability, or quality for an entity.
* @property targetAssessment
* @type Assessment | AssessmentProfile
*/
prototype.targetAssessment = null;
/**
* http://purl.org/ctdl/terms/targetLearningOpportunity
* Learning opportunity that is the focus of a condition, process or another learning opportunity.
* @property targetLearningOpportunity
* @type LearningOpportunity | LearningOpportunityProfile
*/
prototype.targetLearningOpportunity = null;
/**
* http://purl.org/ctdl/terms/targetLearningResource
* Learning object or resource that is used as part of an learning activity.
* Examples include a textbook or lesson plan that describes or records the educational activity (e.g. an audio- or video-recording of a lesson).
* @property targetLearningResource
* @type LearningResource
*/
prototype.targetLearningResource = null;
/**
* http://purl.org/ctdl/terms/teaches
* Competency that the learning opportunity is intended to teach.
* @property teaches
* @type Competency | CredentialAlignmentObject
*/
prototype.teaches = null;
/**
* http://purl.org/ctdl/terms/verificationMethodDescription
* Textual description of the methods used to evaluate an assessment, learning opportunity, process or verificaiton service for validity or reliability.
* @property verificationMethodDescription
* @type langString
*/
prototype.verificationMethodDescription = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", advancedStandingFrom: "Object", approvedBy: "Object", approvedIn: "JurisdictionProfile", availableAt: "Place", commonConditions: "ConditionManifest", commonCosts: "CostManifest", corequisite: "ConditionProfile", creditUnitType: "CredentialAlignmentObject", deliveryType: "CredentialAlignmentObject", entryCondition: "ConditionProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", instructionalProgramType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", learningMethodType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", requires: "Object", subject: "CredentialAlignmentObject", targetAssessment: "Object", targetLearningOpportunity: "Object", targetLearningResource: "LearningResource", teaches: "Object", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ConditionProfile
* Entity describing a constraint, prerequisite, entry condition, or requirement.
* Constraints exist with credentials, learning opportunities, assessments and other entites to which they are subject during their lifecycles.
* @author credentialengine.org
* @class ConditionProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var ConditionProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "ConditionProfile";
};
ConditionProfile = stjs.extend(ConditionProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/additionalCondition
* Additional state of affairs that must exist or be brought about before something else is permitted.
* @property additionalCondition
* @type ConditionProfile
*/
prototype.additionalCondition = null;
/**
* http://purl.org/ctdl/terms/alternativeCondition
* Constraints, prerequisites, entry conditions, or requirementst in a context where more than one alternative condition or path has been defined and from which any one path fulfills the parent condition.
* A set of alternative conditions are not necessarily mutually exclusive paths; for example, a set of alternative concentrations for a degree may allow a person to optionally complete more than one concentration even though only one is required to earn the degree.
* @property alternativeCondition
* @type ConditionProfile
*/
prototype.alternativeCondition = null;
/**
* http://purl.org/ctdl/terms/assertedBy
* Agent making a statement based on fact or belief.
* @property assertedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.assertedBy = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/audienceType
* Type of credential seeker for whom the particular condition or cost is applicable; select from an existing enumeration of such types.
* @property audienceType
* @type CredentialAlignmentObject
*/
prototype.audienceType = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/condition
* Single constraint, prerequisite, entry condition, requirement, or cost.
* @property condition
* @type langString
*/
prototype.condition = null;
/**
* http://purl.org/ctdl/terms/creditHourType
* Type of unit of time corresponding to type of credit such as semester hours, quarter hours, clock hours, or hours of participation.
* @property creditHourType
* @type langString
*/
prototype.creditHourType = null;
/**
* http://purl.org/ctdl/terms/creditHourValue
* Number of credit hours awarded for successful completion of a learning opportunity or assessment.
* @property creditHourValue
* @type float
*/
prototype.creditHourValue = null;
/**
* http://purl.org/ctdl/terms/creditUnitType
* Type of credit associated with both degree and non-degree learning opportunities; select from an existing enumeration of such types.
* @property creditUnitType
* @type CredentialAlignmentObject
*/
prototype.creditUnitType = null;
/**
* http://purl.org/ctdl/terms/creditUnitTypeDescription
* Detailed description of credit unit type.
* @property creditUnitTypeDescription
* @type langString
*/
prototype.creditUnitTypeDescription = null;
/**
* http://purl.org/ctdl/terms/creditUnitValue
* Number of either credit units awarded for college credit or continuing education units for successful completion of the learning opportunity or assessment.
* @property creditUnitValue
* @type float
*/
prototype.creditUnitValue = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/experience
* Amount and nature of required work, experiential learning or other relevant experience.
* @property experience
* @type langString
*/
prototype.experience = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/minimumAge
* Minimum allowed age at which a person is eligible for the credential.
* @property minimumAge
* @type integer
*/
prototype.minimumAge = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/residentOf
* Geographic or political region of which a person must be a legal resident or citizen in order to be eligible for the credential.
* Residency defines the duration of stay required by national, state, provincial or local laws that entitles a person to the legal protection and benefits provided to the applicable type.
* @property residentOf
* @type JurisdictionProfile
*/
prototype.residentOf = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/submissionOf
* Artifact to be submitted such as a transcript, portfolio, or an affidavit.
* @property submissionOf
* @type langString
*/
prototype.submissionOf = null;
/**
* http://purl.org/ctdl/terms/targetAssessment
* Assessment that provides direct, indirect, formative or summative evaluation or estimation of the nature, ability, or quality for an entity.
* @property targetAssessment
* @type Assessment | AssessmentProfile
*/
prototype.targetAssessment = null;
/**
* http://purl.org/ctdl/terms/targetCompetency
* A competency relevant to the condition being described.
* @property targetCompetency
* @type Competency | CredentialAlignmentObject
*/
prototype.targetCompetency = null;
/**
* http://purl.org/ctdl/terms/targetCredential
* Credential that is a focus or target of the condition, process or verification service.
* @property targetCredential
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.targetCredential = null;
/**
* http://purl.org/ctdl/terms/targetLearningOpportunity
* Learning opportunity that is the focus of a condition, process or another learning opportunity.
* @property targetLearningOpportunity
* @type LearningOpportunity | LearningOpportunityProfile
*/
prototype.targetLearningOpportunity = null;
/**
* http://purl.org/ctdl/terms/targetPathway
* Career pathway in which the credential is a potential component.
* @property targetPathway
* @type CareerPathway
*/
prototype.targetPathway = null;
/**
* http://purl.org/ctdl/terms/targetTask
* Task to be completed.
* @property targetTask
* @type TaskProfile
*/
prototype.targetTask = null;
/**
* http://purl.org/ctdl/terms/weight
* Measurement of the weight, degree, percent, or strength of a recommendation, requirement, or comparison.
* @property weight
* @type float
*/
prototype.weight = null;
/**
* http://purl.org/ctdl/terms/yearsOfExperience
* Years of relevant experience.
* @property yearsOfExperience
* @type float
*/
prototype.yearsOfExperience = null;
}, {additionalCondition: "ConditionProfile", alternativeCondition: "ConditionProfile", assertedBy: "Object", audienceLevelType: "CredentialAlignmentObject", audienceType: "CredentialAlignmentObject", commonCosts: "CostManifest", creditUnitType: "CredentialAlignmentObject", estimatedCost: "CostProfile", jurisdiction: "JurisdictionProfile", residentOf: "JurisdictionProfile", targetAssessment: "Object", targetCompetency: "Object", targetCredential: "Object", targetLearningOpportunity: "Object", targetPathway: "CareerPathway", targetTask: "TaskProfile", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/HoldersProfile
* Entity describing the count and related statistical information of holders of a given credential.
* @author credentialengine.org
* @class HoldersProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var HoldersProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "HoldersProfile";
};
HoldersProfile = stjs.extend(HoldersProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/demographicInformation
* Aggregate data or summaries of statistical data relating to the population of credential holders including data about gender, geopolitical regions, age, education levels, and other categories of interest.
* @property demographicInformation
* @type langString
*/
prototype.demographicInformation = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/numberAwarded
* Number of credentials awarded.
* @property numberAwarded
* @type integer
*/
prototype.numberAwarded = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/source
* Authoritative source of an entity's information.
* Citation or description of an authoritative souce from which information or description has been derived.
* @property source
* @type anyURI
*/
prototype.source = null;
}, {jurisdiction: "JurisdictionProfile", region: "Place", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/IdentifierValueSet
* Related set of identifier values.
* @author credentialengine.org
* @class IdentifierValueSet
* @module org.credentialengine
* @extends CreativeWork
*/
var IdentifierValueSet = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "IdentifierValueSet";
};
IdentifierValueSet = stjs.extend(IdentifierValueSet, CreativeWork, [], null, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/EmploymentOutcomeProfile
* Entity that describes employment outcomes and related statistical information for a given credential.
* @author credentialengine.org
* @class EmploymentOutcomeProfile
* @module org.credentialengine
* @extends CreativeWork
*/
var EmploymentOutcomeProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CreativeWork.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "EmploymentOutcomeProfile";
};
EmploymentOutcomeProfile = stjs.extend(EmploymentOutcomeProfile, CreativeWork, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/jobsObtained
* Number of jobs obtained in the region during a given timeframe.
* @property jobsObtained
* @type integer
*/
prototype.jobsObtained = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/source
* Authoritative source of an entity's information.
* Citation or description of an authoritative souce from which information or description has been derived.
* @property source
* @type anyURI
*/
prototype.source = null;
}, {jurisdiction: "JurisdictionProfile", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CredentialFramework
* Class of all structured sets of conceptual entities intentionally designed for use as value vocabulary terms for description and classification in the credentialing context.
* The class includes, but is not limited to, subclasses of specialized concept schemes describing industries, occupations, professions, learning contexts and jobs, as well as specialized subject concept schemes, assessment rubrics, proficiency scales, and competency frameworks.
* @author credentialengine.org
* @class CredentialFramework
* @module org.credentialengine
*/
var CredentialFramework = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "CredentialFramework");
};
CredentialFramework = stjs.extend(CredentialFramework, EcRemoteLinkedData, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ConditionManifest
* Set of constraints, prerequisites, entry conditions, or requirements maintained at the organizational and/or sub-organizational level.
* These conditions are intended to be referenced by external entities such as individual credentials in order to facilitate the process of their description and to reduce unnecessary duplication of data applicable across an array of entities.
* @author credentialengine.org
* @class ConditionManifest
* @module org.credentialengine
*/
var ConditionManifest = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "ConditionManifest");
};
ConditionManifest = stjs.extend(ConditionManifest, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/conditionManifestOf
* Organization maintaining the condition manifest.
* @property conditionManifestOf
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.conditionManifestOf = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/entryCondition
* Prerequisites for entry into a credentialing program, a learning opportunity or an assessment including transcripts, records of previous experience, and lower-level learning opportunities.
* @property entryCondition
* @type ConditionProfile
*/
prototype.entryCondition = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
}, {conditionManifestOf: "Object", corequisite: "ConditionProfile", entryCondition: "ConditionProfile", recommends: "Object", renewal: "ConditionProfile", requires: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* ceasn:ProficiencyScale
* The class of structured profiles describing discrete levels of expertise and performance mastery.
* Proficiency scales define levels of performance (what a person does) as distinct from knowledge of specific information (what a person knows) and outline tasks a person can manage and the skills necessary to progressively accomplish explicit competencies at increasing levels of complexity. Proficiency scales: (1) assist in making judgments about the kinds of tasks related to a competency that a person is able to perform; and (2) to compare the abilities of different persons with regard to achievement of those competencies at different levels.
* @author credentialengine.org
* @class ProficiencyScale
* @module org.credentialengine
* @extends EducationalFramework
*/
var ProficiencyScale = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "ProficiencyScale");
};
ProficiencyScale = stjs.extend(ProficiencyScale, EcRemoteLinkedData, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/IdentifierValue
* Alphanumeric Identifier value.
* @author credentialengine.org
* @class IdentifierValue
* @module org.credentialengine
* @extends identifier
*/
var IdentifierValue = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "IdentifierValue");
};
IdentifierValue = stjs.extend(IdentifierValue, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/identifierType
* Formal name or acronym of the identifier type such as ISBN and ISSN.
* @property identifierType
* @type langString
*/
prototype.identifierType = null;
/**
* http://purl.org/ctdl/terms/identifierValueCode
* Alphanumeric string identifier of the entity.
* Where a formal identification system exists for the identifier, recommended best practice is to use a string conforming to that system.
* @property identifierValueCode
* @type string
*/
prototype.identifierValueCode = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* ceasn:CompetencyFramework
* A description of a competency framework as a whole.
* @author credentialengine.org
* @class CompetencyFramework
* @module org.credentialengine
*/
var CompetencyFramework = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://credreg.net/ctdlasn/schema/context/json?releaseID=20170929", "CompetencyFramework");
};
CompetencyFramework = stjs.extend(CompetencyFramework, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* ceasn:alignFrom
* A competency framework or competency from which this competency framework or competency is aligned.
* An alignment is an assertion of some degree of equivalency between the subject and the object of the assertion.
* @property alignFrom
* @type Competency | CompetencyFramework
*/
prototype.alignFrom = null;
/**
* ceasn:alignTo
* A competency framework or competency to which this competency framework or competency is aligned.
* An alignment is an assertion of some degree of equivalency between the subject and the object of the assertion.
* @property alignTo
* @type Competency | CompetencyFramework
*/
prototype.alignTo = null;
/**
* ceasn:author
* A person or organization chiefly responsible for the intellectual or artistic content of this competency framework or competency.
* @property author
* @type string
*/
prototype.author = null;
/**
* ceasn:conceptKeyword
* A word or phrase used by the promulgating agency to refine and differentiate individual competencies contextually.
* The conceptKeyword property is used in ASN-conforming data solely to denote the significant topicality of the competency using free-text keywords and phrases derived and assigned by the indexer, e.g., "George Washington", "Ayers Rock", etc.
* @property conceptKeyword
* @type langString
*/
prototype.conceptKeyword = null;
/**
* ceasn:conceptTerm
* A term drawn from a controlled vocabulary used by the promulgating agency to refine and differentiate individual competencies contextually.
* The conceptTerm property is used in ASN-conforming data solely to denote the topicality of the competency - e.g., "Pythagorean Theorem", "Trigonometric functions", "Forces and energy", "Scientific method", "Oral history" etc. The value of the conceptTerm property must be drawn from a controlled vocabulary where concepts have all been assigned URI - e.g., terms drawn from the Australia Schools Online Thesaurus (ScOT).
* @property conceptTerm
* @type ConceptScheme
*/
prototype.conceptTerm = null;
/**
* ceasn:creator
* An entity primarily responsible for making this competency framework or competency.
* The creator property is used with non-canonical statements created by a third party.
* @property creator
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.creator = null;
/**
* ceasn:dateCopyrighted
* Date of a statement of copyright for this competency framework, such as ©2017.
* @property dateCopyrighted
* @type string
*/
prototype.dateCopyrighted = null;
/**
* ceasn:dateCreated
* Date of creation of this competency framework or competency.
* The dateCreated property is used for non-canonical statements created by a third party.
* @property dateCreated
* @type date
*/
prototype.dateCreated = null;
/**
* ceasn:dateValidFrom
* Beginning date of validity of this competency framework.
* @property dateValidFrom
* @type date
*/
prototype.dateValidFrom = null;
/**
* ceasn:dateValidUntil
* End date of validity of this competency framework.
* @property dateValidUntil
* @type date
*/
prototype.dateValidUntil = null;
/**
* ceasn:derivedFrom
* The URI of a competency from which this competency has been derived.
* The derivedFrom property is used by 3rd parties only in derived competencies.
* @property derivedFrom
* @type Competency | CompetencyFramework
*/
prototype.derivedFrom = null;
/**
* ceasn:description
* A short description of this competency framework or competency.
* @property description
* @type langString
*/
prototype.description = null;
/**
* ceasn:educationLevelType
* A general statement describing the education or training context. Alternatively, a more specific statement of the location of the audience in terms of its progression through an education or training context.
* Best practice is to use terms from the http://purl.org/ctdl/terms/AudienceLevel concept scheme.
* @property educationLevelType
* @type Concept
*/
prototype.educationLevelType = null;
/**
* ceasn:hasTopChild
* Top-level child competency of a competency framework.
* @property hasTopChild
* @type Competency
*/
prototype.hasTopChild = null;
/**
* ceasn:identifier
* An alternative URI by which this competency framework or competency is identified.
* @property identifier
* @type anyURI
*/
prototype.identifier = null;
/**
* ceasn:inLanguage
* The primary language used in or by this competency framework or competency.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* ceasn:license
* A legal document giving official permission to do something with this competency framework.
* Value must be the URI to a license document (e.g., Creative Commons license or bespoke license).
* @property license
* @type anyURI
*/
prototype.license = null;
/**
* ceasn:localSubject
* The text string denoting the subject of the competency framework or competency as designated by the promulgating agency.
* @property localSubject
* @type langString
*/
prototype.localSubject = null;
/**
* ceasn:name
* The name or title of this competency framework.
* @property name
* @type langString
*/
prototype.name = null;
/**
* ceasn:publicationStatusType
* The publication status of the of this competency framework.
* @property publicationStatusType
* @type Concept
*/
prototype.publicationStatusType = null;
/**
* ceasn:publisher
* An entity responsible for making this competency framework available.
* Also referred to as the promulgating agency of the competency framework.
* @property publisher
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.publisher = null;
/**
* ceasn:repositoryDate
* The date this competency framework was added to the repository.
* @property repositoryDate
* @type date
*/
prototype.repositoryDate = null;
/**
* ceasn:rights
* Information about rights held in and over this competency framework.
* @property rights
* @type anyURI
*/
prototype.rights = null;
/**
* ceasn:rightsHolder
* An agent owning or managing rights over this competency framework.
* @property rightsHolder
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.rightsHolder = null;
/**
* ceasn:source
* The original competency framework which this competency framework is based on or derived from.
* @property source
* @type anyURI
*/
prototype.source = null;
/**
* ceasn:tableOfContents
* A list of sub-units of this competency framework.
* The table of contents is a "manifest", or a hierarchic, ordered, syntactic representation of the competencies that are part of this competency framework.
* @property tableOfContents
* @type langString
*/
prototype.tableOfContents = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
}, {alignFrom: "Object", alignTo: "Object", conceptTerm: "Object", creator: "Object", derivedFrom: "Object", educationLevelType: "Object", hasTopChild: "Competency", publicationStatusType: "Object", publisher: "Object", rightsHolder: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CareerPathway
* Integrated, sequentially ordered collection of credentials, programs, experiences, and services intended to develop technical, academic, and employability skills in a cluster of occupations that share common skills, knowledge, and interests.
* @author credentialengine.org
* @class CareerPathway
* @module org.credentialengine
*/
var CareerPathway = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "CareerPathway");
};
CareerPathway = stjs.extend(CareerPathway, EcRemoteLinkedData, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/DurationProfile
* Entity describing the temporal aspects of a resource.
* Temporal aspects include exact, minimum, and maximum timeframes of an activity.
* @author credentialengine.org
* @class DurationProfile
* @module org.credentialengine
*/
var DurationProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "DurationProfile");
};
DurationProfile = stjs.extend(DurationProfile, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/exactDuration
* Exact period of time of an activity or event.
* @property exactDuration
* @type duration
*/
prototype.exactDuration = null;
/**
* http://purl.org/ctdl/terms/maximumDuration
* Maximum amount of time it will take to complete the activity.
* The value of ceterms:maximumDuration denotes an approximation of duration.
* @property maximumDuration
* @type duration
*/
prototype.maximumDuration = null;
/**
* http://purl.org/ctdl/terms/minimumDuration
* Minimum amount of time it will take to complete the activity.
* The value of ceterms:minimumDuration denotes an approximation of duration.
* @property minimumDuration
* @type duration
*/
prototype.minimumDuration = null;
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ContactPoint
* Means of contacting an organization or its representative.
* For example, a public relations email address or phone number.
* @author credentialengine.org
* @class ContactPoint
* @module org.credentialengine
*/
var ContactPoint = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "ContactPoint");
};
ContactPoint = stjs.extend(ContactPoint, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/contactOption
* Option for a toll-free number or support for hearing-impaired callers.
* @property contactOption
* @type langString
*/
prototype.contactOption = null;
/**
* http://purl.org/ctdl/terms/contactType
* Text identifying the type of service provided by an organizational contact.
* A person or organization may have different contact points for different services. The contact type property provides for adding text to identity the service; e.g., "toll-free number" or "support for hearing-impaired callers".
* @property contactType
* @type langString
*/
prototype.contactType = null;
/**
* http://purl.org/ctdl/terms/email
* Email address of the organization or person.
* @property email
* @type string
*/
prototype.email = null;
/**
* http://purl.org/ctdl/terms/faxNumber
* Fax number.
* @property faxNumber
* @type string
*/
prototype.faxNumber = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/socialMedia
* Social media access point for an agent or an agent's contact point.
* @property socialMedia
* @type anyURI
*/
prototype.socialMedia = null;
/**
* http://purl.org/ctdl/terms/telephone
* Telephone number.
* @property telephone
* @type string
*/
prototype.telephone = null;
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/LearningOpportunity
* Structured and unstructured learning and development opportunities based in direct experience, formal and informal study, observation, and involvement in discourse and practice.
* Examples of learning opportunities include education and training programs and classes, courses of study, apprenticeship or work experience programs, or other structured experiences intended to serve as educational or training events.
* @author credentialengine.org
* @class LearningOpportunity
* @module org.credentialengine
*/
var LearningOpportunity = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "LearningOpportunity");
};
LearningOpportunity = stjs.extend(LearningOpportunity, EcRemoteLinkedData, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Assessment
* Direct, indirect, formative, and summative evaluation or estimation of the nature, ability, or quality of an entity, performance, or outcome of an action.
* @author credentialengine.org
* @class Assessment
* @module org.credentialengine
*/
var Assessment = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "Assessment");
};
Assessment = stjs.extend(Assessment, EcRemoteLinkedData, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Agent
* Organization or person that acts or has the power to act.
* Broad type that includes both organizations and people who play roles in the lifecycle of a credential.
* @author credentialengine.org
* @class Agent
* @module org.credentialengine
*/
var Agent = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "Agent");
};
Agent = stjs.extend(Agent, EcRemoteLinkedData, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* ceasn:Competency
* Description of knowledge, skills, and/or abilities.
* @author credentialengine.org
* @class Competency
* @module org.credentialengine
*/
var Competency = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://credreg.net/ctdlasn/schema/context/json?releaseID=20170929", "Competency");
};
Competency = stjs.extend(Competency, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* ceasn:alignFrom
* A competency framework or competency from which this competency framework or competency is aligned.
* An alignment is an assertion of some degree of equivalency between the subject and the object of the assertion.
* @property alignFrom
* @type Competency | CompetencyFramework
*/
prototype.alignFrom = null;
/**
* ceasn:alignTo
* A competency framework or competency to which this competency framework or competency is aligned.
* An alignment is an assertion of some degree of equivalency between the subject and the object of the assertion.
* @property alignTo
* @type Competency | CompetencyFramework
*/
prototype.alignTo = null;
/**
* ceasn:altCodedNotation
* An alphanumeric notation or ID code identifying this competency in common use among end-users.
* Unlike the codedNotation property, the value for the altCodedNotation property need not be an official identifier created by the promulgating agency. It must be an identifier in common use among end-users of the competency. This property should be seldom used and only with a clear demonstration of need (i.e., in common use). For example, in the Common Core State Standards (Math) in the U.S., the official codedNotation of "CCSS.Math.Content.1.NBT.C.4" is abbreviated in common use by end-users to the unofficial altCodedNotation of "1.NBT.4".
* @property altCodedNotation
* @type string
*/
prototype.altCodedNotation = null;
/**
* ceasn:author
* A person or organization chiefly responsible for the intellectual or artistic content of this competency framework or competency.
* @property author
* @type string
*/
prototype.author = null;
/**
* ceasn:broadAlignment
* The referenced competency covers all of the relevant concepts in this competency as well as relevant concepts not found in this competency.
* @property broadAlignment
* @type Competency
*/
prototype.broadAlignment = null;
/**
* ceasn:codedNotation
* An alphanumeric notation or ID code as defined by the promulgating body to identify this competency.
* This property should be used only for codes created by the promulgating body. For alternative competency notations in common use in the community of practice, but not endorsed by the promulgating body, the altCodedNotation property can be used (sparingly on clear evidence of common use and need).
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* ceasn:comment
* Supplemental text provided by the promulgating body that clarifies the nature, scope or use of this competency.
* Use this property when the text provides useful context for this competency.
* @property comment
* @type langString
*/
prototype.comment = null;
/**
* ceasn:competencyCategory
* The textual label identifying the category of the competency as designated by the promulgating body.
* This property points to a class, not to instances of that class. For example, where two competencies in a competency framework have been identified respectively by the promulgating agency as "Strand: Rennaisance" and "Strand: Social history", the statementLabel for both these competencies is "Strand".
* @property competencyCategory
* @type langString
*/
prototype.competencyCategory = null;
/**
* ceasn:competencyText
* The text of the competency.
* @property competencyText
* @type langString
*/
prototype.competencyText = null;
/**
* ceasn:complexityLevel
* The expected performance level of a learner or professional as defined by a competency.
* @property complexityLevel
* @type ProficiencyScale
*/
prototype.complexityLevel = null;
/**
* ceasn:comprisedOf
* This competency includes, comprehends or encompasses, in whole or in part, the meaning, nature or importance of the referenced competency.
* @property comprisedOf
* @type Competency
*/
prototype.comprisedOf = null;
/**
* ceasn:conceptKeyword
* A word or phrase used by the promulgating agency to refine and differentiate individual competencies contextually.
* The conceptKeyword property is used in ASN-conforming data solely to denote the significant topicality of the competency using free-text keywords and phrases derived and assigned by the indexer, e.g., "George Washington", "Ayers Rock", etc.
* @property conceptKeyword
* @type langString
*/
prototype.conceptKeyword = null;
/**
* ceasn:conceptTerm
* A term drawn from a controlled vocabulary used by the promulgating agency to refine and differentiate individual competencies contextually.
* The conceptTerm property is used in ASN-conforming data solely to denote the topicality of the competency - e.g., "Pythagorean Theorem", "Trigonometric functions", "Forces and energy", "Scientific method", "Oral history" etc. The value of the conceptTerm property must be drawn from a controlled vocabulary where concepts have all been assigned URI - e.g., terms drawn from the Australia Schools Online Thesaurus (ScOT).
* @property conceptTerm
* @type ConceptScheme
*/
prototype.conceptTerm = null;
/**
* ceasn:creator
* An entity primarily responsible for making this competency framework or competency.
* The creator property is used with non-canonical statements created by a third party.
* @property creator
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.creator = null;
/**
* ceasn:crossSubjectReference
* A relationship between this competency and a competency in a separate competency framework.
* An interdisciplinary statement reference.
* @property crossSubjectReference
* @type Competency
*/
prototype.crossSubjectReference = null;
/**
* ceasn:dateCreated
* Date of creation of this competency framework or competency.
* The dateCreated property is used for non-canonical statements created by a third party.
* @property dateCreated
* @type date
*/
prototype.dateCreated = null;
/**
* ceasn:derivedFrom
* The URI of a competency from which this competency has been derived.
* The derivedFrom property is used by 3rd parties only in derived competencies.
* @property derivedFrom
* @type Competency | CompetencyFramework
*/
prototype.derivedFrom = null;
/**
* ceasn:description
* A short description of this competency framework or competency.
* @property description
* @type langString
*/
prototype.description = null;
/**
* ceasn:educationLevelType
* A general statement describing the education or training context. Alternatively, a more specific statement of the location of the audience in terms of its progression through an education or training context.
* Best practice is to use terms from the http://purl.org/ctdl/terms/AudienceLevel concept scheme.
* @property educationLevelType
* @type Concept
*/
prototype.educationLevelType = null;
/**
* ceasn:exactAlignment
* The relevant concepts in this competency and the referenced competency are coextensive.
* @property exactAlignment
* @type Competency
*/
prototype.exactAlignment = null;
/**
* ceasn:hasChild
* The referenced competency is lower in some arbitrary hierarchy than this competency.
* @property hasChild
* @type Competency
*/
prototype.hasChild = null;
/**
* ceasn:identifier
* An alternative URI by which this competency framework or competency is identified.
* @property identifier
* @type anyURI
*/
prototype.identifier = null;
/**
* ceasn:inLanguage
* The primary language used in or by this competency framework or competency.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* ceasn:isChildOf
* The referenced competency is higher in some arbitrary hierarchy than this competency.
* @property isChildOf
* @type Competency
*/
prototype.isChildOf = null;
/**
* ceasn:isPartOf
* Competency framework that this competency is a part of.
* @property isPartOf
* @type CompetencyFramework
*/
prototype.isPartOf = null;
/**
* ceasn:isVersionOf
* A related competency of which this competency is a version, edition, or adaptation.
* Changes in version imply substantive changes in content rather than differences in format.
* @property isVersionOf
* @type Competency
*/
prototype.isVersionOf = null;
/**
* ceasn:listID
* An alphanumeric string indicating this competency's position in a list of competencies at the same level in some arbitrary hierarchy.
* Competencies with lower alphanumeric values for this property come before competencies with higher values.
* @property listID
* @type string
*/
prototype.listID = null;
/**
* ceasn:localSubject
* The text string denoting the subject of the competency framework or competency as designated by the promulgating agency.
* @property localSubject
* @type langString
*/
prototype.localSubject = null;
/**
* ceasn:majorAlignment
* Major overlap of relevant concepts between the this competency and the referenced competency.
* @property majorAlignment
* @type Competency
*/
prototype.majorAlignment = null;
/**
* ceasn:minorAlignment
* Minor overlap of relevant concepts between this competency and the referenced competency.
* @property minorAlignment
* @type Competency
*/
prototype.minorAlignment = null;
/**
* ceasn:narrowAlignment
* This competency covers all of the relevant concepts in the referenced competency as well as relevant concepts not found in the referenced competency.
* @property narrowAlignment
* @type Competency
*/
prototype.narrowAlignment = null;
/**
* ceasn:prerequisiteAlignment
* This competency is a prerequisite to the referenced competency.
* @property prerequisiteAlignment
* @type Competency
*/
prototype.prerequisiteAlignment = null;
/**
* ceasn:shouldIndex
* Indicates whether correlators should or should not assign the competency during correlation.
* @property shouldIndex
* @type boolean
*/
prototype.shouldIndex = false;
/**
* ceasn:skillEmbodied
* Cognitive, affective, and psychomotor skills directly or indirectly embodied in this competency.
* @property skillEmbodied
* @type anyURI
*/
prototype.skillEmbodied = null;
/**
* ceasn:weight
* An asserted measurement of the weight, degree, percent, or strength of a recommendation, requirement, or comparison.
* Best practice is to assigned a decimal value weight between 0 and 1 that indicates the strength of the assertion, with 0 being weakest and 1 being strongest.
* @property weight
* @type float
*/
prototype.weight = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
}, {alignFrom: "Object", alignTo: "Object", broadAlignment: "Competency", complexityLevel: "ProficiencyScale", comprisedOf: "Competency", conceptTerm: "Object", creator: "Object", crossSubjectReference: "Competency", derivedFrom: "Object", educationLevelType: "Object", exactAlignment: "Competency", hasChild: "Competency", isChildOf: "Competency", isPartOf: "CompetencyFramework", isVersionOf: "Competency", majorAlignment: "Competency", minorAlignment: "Competency", narrowAlignment: "Competency", prerequisiteAlignment: "Competency", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Place
* Entity describing a physical location or geospatial area.
* @author credentialengine.org
* @class Place
* @module org.credentialengine
*/
var Place = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "Place");
};
Place = stjs.extend(Place, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/addressCountry
* Nation with its own government and occupying a particular territory identified by the two-letter ISO 3166-1 alpha-2 country code.
* @property addressCountry
* @type langString
*/
prototype.addressCountry = null;
/**
* http://purl.org/ctdl/terms/addressLocality
* Town, city, or village in which a particular location is situtated.
* @property addressLocality
* @type langString
*/
prototype.addressLocality = null;
/**
* http://purl.org/ctdl/terms/addressRegion
* State or province in which a particular location is situtated.
* @property addressRegion
* @type langString
*/
prototype.addressRegion = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/geoURI
* Entity that describes the longitude, latitude and other location details of a place.
* This may define a place at any scale. Examples include a city, state, province, country, or continent.
* @property geoURI
* @type anyURI
*/
prototype.geoURI = null;
/**
* http://purl.org/ctdl/terms/latitude
* Latitude of a location.
* For example 37.42242 (WGS 84)
* @property latitude
* @type float
*/
prototype.latitude = null;
/**
* http://purl.org/ctdl/terms/longitude
* The longitude of a location.
* For example -122.08585 (WGS 84).
* @property longitude
* @type float
*/
prototype.longitude = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/postalCode
* The postal code. For example, 94043.
* @property postalCode
* @type string
*/
prototype.postalCode = null;
/**
* http://purl.org/ctdl/terms/postOfficeBoxNumber
* Post office box number for post office addresses.
* @property postOfficeBoxNumber
* @type string
*/
prototype.postOfficeBoxNumber = null;
/**
* http://purl.org/ctdl/terms/streetAddress
* Street address. e.g. "1600 Amphitheatre Pkwy".
* @property streetAddress
* @type langString
*/
prototype.streetAddress = null;
/**
* http://purl.org/ctdl/terms/targetContactPoint
* Options for contacting the organization or person.
* @property targetContactPoint
* @type ContactPoint
*/
prototype.targetContactPoint = null;
}, {targetContactPoint: "ContactPoint", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CostManifest
* Entity that describes a set of costs maintained at, and applicable across the organizational and/or sub-organizational level.
* Instances of these ceterms:CostManifest entities are intended to be referenced by other entities to augment the process of describing their costs.
* @author credentialengine.org
* @class CostManifest
* @module org.credentialengine
*/
var CostManifest = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "CostManifest");
};
CostManifest = stjs.extend(CostManifest, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/costDetails
* Webpage or online document containing human-readable, in-depth information about costs.
* @property costDetails
* @type anyURI
*/
prototype.costDetails = null;
/**
* http://purl.org/ctdl/terms/costManifestOf
* Organization maintaining the cost manifest.
* @property costManifestOf
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.costManifestOf = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {costManifestOf: "Object", estimatedCost: "CostProfile", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CredentialAssertion
* Representation of a credential awarded to a person.
* @author credentialengine.org
* @class CredentialAssertion
* @module org.credentialengine
*/
var CredentialAssertion = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.eduworks.com/simpleCtdl", "CredentialAssertion");
};
CredentialAssertion = stjs.extend(CredentialAssertion, EcRemoteLinkedData, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/VerificationServiceProfile
* Entity describing the means by which someone can verify whether a credential has been attained.
* Includes, but is not limited to, verification of whether quality assurance credentials have been issued for organizations, learning opportunities, and assessments.
* @author credentialengine.org
* @class VerificationServiceProfile
* @module org.credentialengine
* @extends Intangible
*/
var VerificationServiceProfile = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Intangible.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "VerificationServiceProfile";
};
VerificationServiceProfile = stjs.extend(VerificationServiceProfile, Intangible, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/holderMustAuthorize
* Whether or not the credential holder must authorize the organization to provide the verification service.
* @property holderMustAuthorize
* @type boolean
*/
prototype.holderMustAuthorize = false;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/targetCredential
* Credential that is a focus or target of the condition, process or verification service.
* @property targetCredential
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.targetCredential = null;
/**
* http://purl.org/ctdl/terms/verificationDirectory
* Directory of credential holders and their current statuses.
* @property verificationDirectory
* @type anyURI
*/
prototype.verificationDirectory = null;
/**
* http://purl.org/ctdl/terms/verificationMethodDescription
* Textual description of the methods used to evaluate an assessment, learning opportunity, process or verificaiton service for validity or reliability.
* @property verificationMethodDescription
* @type langString
*/
prototype.verificationMethodDescription = null;
/**
* http://purl.org/ctdl/terms/verificationService
* Direct access to the verification service.
* This property identifies machine-accessible services, such as API endpoints, that provide direct access to the verification service being described.
* @property verificationService
* @type anyURI
*/
prototype.verificationService = null;
/**
* http://purl.org/ctdl/terms/verifiedClaimType
* Type of claim provided through a verification service; select from an existing enumeration of such types.
* @property verifiedClaimType
* @type CredentialAlignmentObject
*/
prototype.verifiedClaimType = null;
}, {estimatedCost: "CostProfile", jurisdiction: "JurisdictionProfile", offeredBy: "Object", offeredIn: "JurisdictionProfile", region: "Place", targetCredential: "Object", verifiedClaimType: "CredentialAlignmentObject", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/GeoCoordinates
* Geographic coordinates of a place or event including latitude and longitude as well as other locational information.
* @author credentialengine.org
* @class GeoCoordinates
* @module org.credentialengine
* @extends StructuredValue
*/
var GeoCoordinates = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
StructuredValue.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "GeoCoordinates";
};
GeoCoordinates = stjs.extend(GeoCoordinates, StructuredValue, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/geoURI
* Entity that describes the longitude, latitude and other location details of a place.
* This may define a place at any scale. Examples include a city, state, province, country, or continent.
* @property geoURI
* @type anyURI
*/
prototype.geoURI = null;
/**
* http://purl.org/ctdl/terms/latitude
* Latitude of a location.
* For example 37.42242 (WGS 84)
* @property latitude
* @type float
*/
prototype.latitude = null;
/**
* http://purl.org/ctdl/terms/longitude
* The longitude of a location.
* For example -122.08585 (WGS 84).
* @property longitude
* @type float
*/
prototype.longitude = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
}, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/RegulateAction
* Action by an independent, neutral, and authoritative agent enforcing the legal requirements of a resource.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class RegulateAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var RegulateAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "RegulateAction";
};
RegulateAction = stjs.extend(RegulateAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ApproveAction
* Action by an independent, neutral, and authoritative agent that pronounces a favorable judgment of a credential.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class ApproveAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var ApproveAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "ApproveAction";
};
ApproveAction = stjs.extend(ApproveAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/RenewAction
* Action by an agent renewing an existing credential assertion.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class RenewAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var RenewAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "RenewAction";
};
RenewAction = stjs.extend(RenewAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/resultingAward
* Awarded credential resulting from an action.
* An awarded credential is of the type ceterms:CredentialAssertion.
* @property resultingAward
* @type CredentialAssertion
*/
prototype.resultingAward = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", resultingAward: "CredentialAssertion", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/RecognizeAction
* Action by an independent, neutral, and authoritative agent acknowledging the validity of a resource.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class RecognizeAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var RecognizeAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "RecognizeAction";
};
RecognizeAction = stjs.extend(RecognizeAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/RightsAction
* Action asserting legal rights by an agent to possess, defend, transfer, license, and grant conditional access to a credential, learning opportunity, or assessment.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class RightsAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var RightsAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "RightsAction";
};
RightsAction = stjs.extend(RightsAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/AccreditAction
* Action by an independent, neutral, and authoritative agent that certifies an entity as meeting a prescribed set of standards.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class AccreditAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var AccreditAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "AccreditAction";
};
AccreditAction = stjs.extend(AccreditAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/resultingAward
* Awarded credential resulting from an action.
* An awarded credential is of the type ceterms:CredentialAssertion.
* @property resultingAward
* @type CredentialAssertion
*/
prototype.resultingAward = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", resultingAward: "CredentialAssertion", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/RevokeAction
* Action by an agent removing an awarded credential (credential assertion) from the credential holder based on violations or failure of the holder to renew.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class RevokeAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var RevokeAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "RevokeAction";
};
RevokeAction = stjs.extend(RevokeAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/AdvancedStandingAction
* Claim by an agent asserting that the object credential of the action provides advanced standing for a credential under the asserting agent's authority.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class AdvancedStandingAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var AdvancedStandingAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "AdvancedStandingAction";
};
AdvancedStandingAction = stjs.extend(AdvancedStandingAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/OfferAction
* Action by an authoritative agent offering access to a entity such as a credential, learning opportunity or assessment.
* Since an instance of ceterms:CredentialingAction is a claim that a certain agent has taken the action being described, creation of such a ceterms:CredentialingAction should be reserved to the agent of that action.
* @author credentialengine.org
* @class OfferAction
* @module org.credentialengine
* @extends CredentialingAction
*/
var OfferAction = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialingAction.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "OfferAction";
};
OfferAction = stjs.extend(OfferAction, CredentialingAction, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/actingAgent
* Organization or person performing an action.
* @property actingAgent
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.actingAgent = null;
/**
* http://purl.org/ctdl/terms/actionStatusType
* Entity describing the current disposition or standing of an action; select from an existing enumeration of such types.
* @property actionStatusType
* @type CredentialAlignmentObject
*/
prototype.actionStatusType = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/endDate
* Date some event or activity ends.
* @property endDate
* @type date
*/
prototype.endDate = null;
/**
* http://purl.org/ctdl/terms/evidenceOfAction
* Entity that proves that the action occured or that the action continues to be valid.
* The evidence verifies the information in the action and is particular to it. It is not a directory of such evidentiary entities or a description of how such verifications might generically be characterized.
* @property evidenceOfAction
* @type anyURI
*/
prototype.evidenceOfAction = null;
/**
* http://purl.org/ctdl/terms/instrument
* Object that helped the agent perform the action. e.g. John wrote a book with a pen.
* A credential or other instrument whose criteria was applied in executing the action.
* @property instrument
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.instrument = null;
/**
* http://purl.org/ctdl/terms/object
* Object upon which the action is carried out, whose state is kept intact or changed.
* @property object
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.object = null;
/**
* http://purl.org/ctdl/terms/participant
* Co-agents that participated in the action indirectly.
* @property participant
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.participant = null;
/**
* http://purl.org/ctdl/terms/startDate
* Date the validity or usefulness of the information in this resource begins.
* @property startDate
* @type date
*/
prototype.startDate = null;
}, {actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", actingAgent: "Object", actionStatusType: "CredentialAlignmentObject", instrument: "Object", object: "Object", participant: "Object", target: "EntryPoint", participant: "Object", instrument: "Thing", agent: "Object", object: "Thing", actionStatus: "ActionStatusType", result: "Thing", location: "Object", error: "Thing", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/FinancialAlignmentObject
* An alignment to a financial framework.
* Examples include, but are not limited to, Free Application for Federal Student Aid (FAFSA) in the U.S.
* @author credentialengine.org
* @class FinancialAlignmentObject
* @module org.credentialengine
* @extends CredentialAlignmentObject
*/
var FinancialAlignmentObject = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialAlignmentObject.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "FinancialAlignmentObject";
};
FinancialAlignmentObject = stjs.extend(FinancialAlignmentObject, CredentialAlignmentObject, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/alignmentDate
* The date the alignment was made.
* @property alignmentDate
* @type date
*/
prototype.alignmentDate = null;
/**
* http://purl.org/ctdl/terms/alignmentType
* Type of relationship between two entities.
* In CTDL, the alignment type value is definitively identified by the property for which the AlignmentObject is the rdfs:range; therefore, use of this property is generally redundant.
* @property alignmentType
* @type string
*/
prototype.alignmentType = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/framework
* Credential framework to which the entity is aligned.
* Frameworks may include, but are not limited to, competency frameworks and concept schemes such as industry, occupation, and instructional program codes.
* @property framework
* @type anyURI
*/
prototype.framework = null;
/**
* http://purl.org/ctdl/terms/frameworkName
* Name of the framework.
* @property frameworkName
* @type langString
*/
prototype.frameworkName = null;
/**
* http://purl.org/ctdl/terms/targetNode
* Individual entry in a formally defined framework such as a competency or an industry, instructional program, or occupation code.
* @property targetNode
* @type anyURI
*/
prototype.targetNode = null;
/**
* http://purl.org/ctdl/terms/targetNodeDescription
* Textual description of an individual concept or competency in a formally defined framework.
* @property targetNodeDescription
* @type langString
*/
prototype.targetNodeDescription = null;
/**
* http://purl.org/ctdl/terms/targetNodeName
* Name of an individual concept or competency in a formally defined framework.
* @property targetNodeName
* @type langString
*/
prototype.targetNodeName = null;
/**
* http://purl.org/ctdl/terms/weight
* Measurement of the weight, degree, percent, or strength of a recommendation, requirement, or comparison.
* @property weight
* @type float
*/
prototype.weight = null;
}, {identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Degree
* Academic credential conferred upon completion of a program or course of study, typically over multiple years at a college or university.
* @author credentialengine.org
* @class Degree
* @module org.credentialengine
* @extends Credential
*/
var Degree = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "Degree";
};
Degree = stjs.extend(Degree, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/degreeConcentration
* Focused plan of study within a college or university degree such as a concentration in Aerospace Engineering within an Engineering degree.
* @property degreeConcentration
* @type CredentialAlignmentObject
*/
prototype.degreeConcentration = null;
/**
* http://purl.org/ctdl/terms/degreeMajor
* Primary field of study of a degree-seeking student.
* @property degreeMajor
* @type CredentialAlignmentObject
*/
prototype.degreeMajor = null;
/**
* http://purl.org/ctdl/terms/degreeMinor
* Optional, secondary field of study of a degree-seeking student.
* @property degreeMinor
* @type CredentialAlignmentObject
*/
prototype.degreeMinor = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Diploma
* Credential awarded by educational institutions for successful completion of a course of study or its equivalent.
* @author credentialengine.org
* @class Diploma
* @module org.credentialengine
* @extends Credential
*/
var Diploma = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "Diploma";
};
Diploma = stjs.extend(Diploma, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Certificate
* Credential that designates requisite knowledge and skills of an occupation, profession, or academic program.
* @author credentialengine.org
* @class Certificate
* @module org.credentialengine
* @extends Credential
*/
var Certificate = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "Certificate";
};
Certificate = stjs.extend(Certificate, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/QualityAssuranceCredential
* Credential assuring that an organization, program, or awarded credential meets prescribed requirements and may include development and administration of qualifying examinations.
* @author credentialengine.org
* @class QualityAssuranceCredential
* @module org.credentialengine
* @extends Credential
*/
var QualityAssuranceCredential = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "QualityAssuranceCredential";
};
QualityAssuranceCredential = stjs.extend(QualityAssuranceCredential, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/License
* Credential awarded by a government agency that constitutes legal authority to do a specific job and/or utilize a specific item, system or infrastructure and are typically earned through some combination of degree or certificate attainment, certifications, assessments, work experience, and/or fees, and are time-limited and must be renewed periodically.
* @author credentialengine.org
* @class License
* @module org.credentialengine
* @extends Credential
*/
var License = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "License";
};
License = stjs.extend(License, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Certification
* Time-limited, renewable credential awarded by an authoritative body to an individual or organization for demonstrating the designated knowledge, skills, and abilities to perform a specific occupation.
* @author credentialengine.org
* @class Certification
* @module org.credentialengine
* @extends Credential
*/
var Certification = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "Certification";
};
Certification = stjs.extend(Certification, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Badge
* Recognition designed to be displayed as a marker of accomplishment, activity, achievement, skill, interest, association, or identity.
* @author credentialengine.org
* @class Badge
* @module org.credentialengine
* @extends Credential
*/
var Badge = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "Badge";
};
Badge = stjs.extend(Badge, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/MicroCredential
* Credential that addresses a subset of field-specific knowledge, skills, or competencies; often developmental with relationships to other micro-credentials and field credentials.
* @author credentialengine.org
* @class MicroCredential
* @module org.credentialengine
* @extends Credential
*/
var MicroCredential = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Credential.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "MicroCredential";
};
MicroCredential = stjs.extend(MicroCredential, Credential, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/IndustryClassification
* Class of of concept schemes defining industries such as NAICS in the U.S. and ESCO in the European Union.
* @author credentialengine.org
* @class IndustryClassification
* @module org.credentialengine
* @extends CredentialFramework
*/
var IndustryClassification = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialFramework.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "IndustryClassification";
};
IndustryClassification = stjs.extend(IndustryClassification, CredentialFramework, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/OccupationClassification
* Class of concept schemes identifying occupations such as the Standard Occupational Classification (SOC) system in the U.S. and the European Skills/Competences, Qualifications and Occupations (ESCO).
* @author credentialengine.org
* @class OccupationClassification
* @module org.credentialengine
* @extends CredentialFramework
*/
var OccupationClassification = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialFramework.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "OccupationClassification";
};
OccupationClassification = stjs.extend(OccupationClassification, CredentialFramework, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/InstructionalProgramClassification
* Class of concept schemes defining instructional program types such as the CIP codes in the U.S.
* @author credentialengine.org
* @class InstructionalProgramClassification
* @module org.credentialengine
* @extends CredentialFramework
*/
var InstructionalProgramClassification = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
CredentialFramework.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "InstructionalProgramClassification";
};
InstructionalProgramClassification = stjs.extend(InstructionalProgramClassification, CredentialFramework, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/PostalAddress
* Entity describing a mailing address.
* @author credentialengine.org
* @class PostalAddress
* @module org.credentialengine
* @extends ContactPoint
*/
var PostalAddress = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
ContactPoint.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "PostalAddress";
};
PostalAddress = stjs.extend(PostalAddress, ContactPoint, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/addressCountry
* Nation with its own government and occupying a particular territory identified by the two-letter ISO 3166-1 alpha-2 country code.
* @property addressCountry
* @type langString
*/
prototype.addressCountry = null;
/**
* http://purl.org/ctdl/terms/addressLocality
* Town, city, or village in which a particular location is situtated.
* @property addressLocality
* @type langString
*/
prototype.addressLocality = null;
/**
* http://purl.org/ctdl/terms/addressRegion
* State or province in which a particular location is situtated.
* @property addressRegion
* @type langString
*/
prototype.addressRegion = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/postalCode
* The postal code. For example, 94043.
* @property postalCode
* @type string
*/
prototype.postalCode = null;
/**
* http://purl.org/ctdl/terms/postOfficeBoxNumber
* Post office box number for post office addresses.
* @property postOfficeBoxNumber
* @type string
*/
prototype.postOfficeBoxNumber = null;
/**
* http://purl.org/ctdl/terms/streetAddress
* Street address. e.g. "1600 Amphitheatre Pkwy".
* @property streetAddress
* @type langString
*/
prototype.streetAddress = null;
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/Course
* Structured sequence of one or more educational activities that aims to develop a prescribed set of knowledge, competence or ability of learners.
* @author credentialengine.org
* @class Course
* @module org.credentialengine
* @extends LearningOpportunity
*/
var Course = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
LearningOpportunity.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "Course";
};
Course = stjs.extend(Course, LearningOpportunity, [], null, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CredentialOrganization
* Organization that plays one or more key roles in the lifecycle of a credential.
* @author credentialengine.org
* @class CredentialOrganization
* @module org.credentialengine
* @extends Agent
*/
var CredentialOrganization = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Agent.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "CredentialOrganization";
};
CredentialOrganization = stjs.extend(CredentialOrganization, Agent, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/address
* Particulars describing the location of the place.
* @property address
* @type Place
*/
prototype.address = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/agentPurpose
* Organization's primary purpose as found on an "about" page of a website.
* @property agentPurpose
* @type anyURI
*/
prototype.agentPurpose = null;
/**
* http://purl.org/ctdl/terms/agentPurposeDescription
* Short, key phrases describing the primary purpose of an organization as might be derived from the "about" page of it's website.
* @property agentPurposeDescription
* @type langString
*/
prototype.agentPurposeDescription = null;
/**
* http://purl.org/ctdl/terms/agentSectorType
* Type of sociological, economic, or political subdivision served by an organization; select from an existing enumeration of such types.
* @property agentSectorType
* @type CredentialAlignmentObject
*/
prototype.agentSectorType = null;
/**
* http://purl.org/ctdl/terms/agentType
* Type of organization such as educational institution, credentialing organization or quality assurance body; select from an existing enumeration of such types.
* @property agentType
* @type CredentialAlignmentObject
*/
prototype.agentType = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/alternativeIdentifier
* Alternative, publicly available and globally unique identifier for an organization issued by an authoritative entity.
* The alternative identifier should be used where no identifier is available for the DUNS, FEIN, NAICS or IPEDS ID properties.
* @property alternativeIdentifier
* @type IdentifierValue
*/
prototype.alternativeIdentifier = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/approves
* Credential, assessment, learning opportunity, or organization for which this organization pronounces favorable judgment.
* @property approves
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.approves = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/credentialingAction
* Indicates a past or potential credentialing action in which the resource being described plays an 'object' role.
* @property credentialingAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.credentialingAction = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/department
* Department of the organization.
* @property department
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.department = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/duns
* Dun & Bradstreet DUNS number for identifying an organization or business person.
* @property duns
* @type string
*/
prototype.duns = null;
/**
* http://purl.org/ctdl/terms/email
* Email address of the organization or person.
* @property email
* @type string
*/
prototype.email = null;
/**
* http://purl.org/ctdl/terms/employee
* Person employed for wages or salary by the organization.
* @property employee
* @type CredentialPerson
*/
prototype.employee = null;
/**
* http://purl.org/ctdl/terms/fein
* Federal Employer Identification Number (FEIN) identifying organizations, persons, states, government agencies, corporations, and companies.
* @property fein
* @type string
*/
prototype.fein = null;
/**
* http://purl.org/ctdl/terms/foundingDate
* Date the organization was founded.
* @property foundingDate
* @type string
*/
prototype.foundingDate = null;
/**
* http://purl.org/ctdl/terms/hasConditionManifest
* Entity that describes a set of constraints, prerequisites, entry conditions, or requirements applicable across the organization, sub-organization or sets of credentials or acitivites.
* @property hasConditionManifest
* @type ConditionManifest
*/
prototype.hasConditionManifest = null;
/**
* http://purl.org/ctdl/terms/hasCostManifest
* Entity that describes a set of cost data applicable across the organization, sub-organization or sets of credentials or acitivites.
* @property hasCostManifest
* @type CostManifest
*/
prototype.hasCostManifest = null;
/**
* http://purl.org/ctdl/terms/hasVerificationService
* Entity describing available systems provided by the agent to verify credential holders.
* Systems in place to verify credential holders and communicate the current credentialing status of all credential holders to employers and other labor market participants, as well as to education and workforce development funders and regulators.
* @property hasVerificationService
* @type VerificationServiceProfile
*/
prototype.hasVerificationService = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/ipedsID
* Unique six digit identifier assigned to all U.S. institutions that have submitted data to the Integrated Postsecondary Education Data System (IPEDS).
* @property ipedsID
* @type string
*/
prototype.ipedsID = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/missionAndGoalsStatement
* Webpage or online document that defines or explains the mission and goals of the organization.
* @property missionAndGoalsStatement
* @type anyURI
*/
prototype.missionAndGoalsStatement = null;
/**
* http://purl.org/ctdl/terms/missionAndGoalsStatementDescription
* Textual statement of the mission and goals of the organization.
* @property missionAndGoalsStatementDescription
* @type langString
*/
prototype.missionAndGoalsStatementDescription = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/offers
* Credential, learning opportunity or assessment offered or conferred by the organization or person.
* @property offers
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.offers = null;
/**
* http://purl.org/ctdl/terms/opeID
* OPE ID number (U.S. Office of Postsecondary Education Identification), sometimes referred to as the Federal School Code.
* Identification number used by the U.S. Department of Education's Office of Postsecondary Education (OPE) to identify schools that have Program Participation Agreements (PPA) so that its students are eligible to participate in Federal Student Financial Assistance (FAFSA) programs under Title IV regulations. This is a 6-digit number followed by a 2-digit suffix used to identify branches, additional locations, and other entities that are part of the eligible institution.
* @property opeID
* @type string
*/
prototype.opeID = null;
/**
* http://purl.org/ctdl/terms/owns
* Credential, learning opportunity or assesment over which the organization or person claims legal title.
* Generally, the value of the property should be one of the subclasses of ceterms:Credential.
* @property owns
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.owns = null;
/**
* http://purl.org/ctdl/terms/parentOrganization
* Larger organization exercising authority over the organization being described.
* @property parentOrganization
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.parentOrganization = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recognizes
* Credential, learning opportunity or assessment that the agent recommends, endorses, indicates preference for, or otherwise provides a positive judgment.
* @property recognizes
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recognizes = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/renews
* Credential type that has its validity extended by the organization or person.
* The value of ceterms:renews should be one of the specific subclasses of ceterms:Credential.
* @property renews
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.renews = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokes
* Credential type that can be invalidated or retracted by the awarding agent.
* The value of ceterms:revokes should be one of the specific subclasses of ceterms:Credential.
* @property revokes
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.revokes = null;
/**
* http://purl.org/ctdl/terms/sameAs
* Another entity that unambiguously indicates the identity of the entity being described.
* Entities that may indicate identity include, but are not limited to, descriptions of entities in open databases such as DBpedia and Wikidata or social media accounts such as FaceBook and LinkedIn.
* @property sameAs
* @type anyURI
*/
prototype.sameAs = null;
/**
* http://purl.org/ctdl/terms/serviceType
* Type of service offered by the agent being described; select from an existing enumeration of such terms.
* @property serviceType
* @type CredentialAlignmentObject
*/
prototype.serviceType = null;
/**
* http://purl.org/ctdl/terms/socialMedia
* Social media access point for an agent or an agent's contact point.
* @property socialMedia
* @type anyURI
*/
prototype.socialMedia = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/subOrganization
* Organization in a subordinate or lower position than a parent organization.
* @property subOrganization
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.subOrganization = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", address: "Place", administrationProcess: "ProcessProfile", agentSectorType: "CredentialAlignmentObject", agentType: "CredentialAlignmentObject", alternativeIdentifier: "IdentifierValue", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", approves: "Object", complaintProcess: "ProcessProfile", credentialingAction: "Object", department: "Object", developmentProcess: "ProcessProfile", employee: "CredentialPerson", hasConditionManifest: "ConditionManifest", hasCostManifest: "CostManifest", hasVerificationService: "VerificationServiceProfile", industryType: "CredentialAlignmentObject", jurisdiction: "JurisdictionProfile", maintenanceProcess: "ProcessProfile", offers: "Object", owns: "Object", parentOrganization: "Object", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recognizes: "Object", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", renews: "Object", reviewProcess: "ProcessProfile", revocationProcess: "ProcessProfile", revokes: "Object", serviceType: "CredentialAlignmentObject", subOrganization: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/CredentialPerson
* Person who plays a role as primary agent in a credentialing action.
* The ceterms:CredentialPerson class should be used to describe persons directly engaged as primary agent in credentialing actions such as approving, offering, recognizing, renewing and revoking credentials and should not include persons merely affiliated with, or employed by organizations that perform such actions.
* @author credentialengine.org
* @class CredentialPerson
* @module org.credentialengine
* @extends Agent
*/
var CredentialPerson = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Agent.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "CredentialPerson";
};
CredentialPerson = stjs.extend(CredentialPerson, Agent, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/affiliation
* Organization to which a person is formally related through work, sudy, or social engagement.
* @property affiliation
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.affiliation = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/approves
* Credential, assessment, learning opportunity, or organization for which this organization pronounces favorable judgment.
* @property approves
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.approves = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/email
* Email address of the organization or person.
* @property email
* @type string
*/
prototype.email = null;
/**
* http://purl.org/ctdl/terms/familyName
* Family name such as the last name of a person in the U.S..
* The ceterms:familyName property can be used along with givenName instead of the ceterms:name property.
* @property familyName
* @type langString
*/
prototype.familyName = null;
/**
* http://purl.org/ctdl/terms/givenName
* First name of a person.
* @property givenName
* @type langString
*/
prototype.givenName = null;
/**
* http://purl.org/ctdl/terms/honorificSuffix
* Honorific suffix preceding a person's name such as M.D. , PhD, or MSCSW.
* @property honorificSuffix
* @type langString
*/
prototype.honorificSuffix = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/offers
* Credential, learning opportunity or assessment offered or conferred by the organization or person.
* @property offers
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.offers = null;
/**
* http://purl.org/ctdl/terms/owns
* Credential, learning opportunity or assesment over which the organization or person claims legal title.
* Generally, the value of the property should be one of the subclasses of ceterms:Credential.
* @property owns
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.owns = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recognizes
* Credential, learning opportunity or assessment that the agent recommends, endorses, indicates preference for, or otherwise provides a positive judgment.
* @property recognizes
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recognizes = null;
/**
* http://purl.org/ctdl/terms/renews
* Credential type that has its validity extended by the organization or person.
* The value of ceterms:renews should be one of the specific subclasses of ceterms:Credential.
* @property renews
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.renews = null;
/**
* http://purl.org/ctdl/terms/revokes
* Credential type that can be invalidated or retracted by the awarding agent.
* The value of ceterms:revokes should be one of the specific subclasses of ceterms:Credential.
* @property revokes
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.revokes = null;
/**
* http://purl.org/ctdl/terms/sameAs
* Another entity that unambiguously indicates the identity of the entity being described.
* Entities that may indicate identity include, but are not limited to, descriptions of entities in open databases such as DBpedia and Wikidata or social media accounts such as FaceBook and LinkedIn.
* @property sameAs
* @type anyURI
*/
prototype.sameAs = null;
/**
* http://purl.org/ctdl/terms/serviceType
* Type of service offered by the agent being described; select from an existing enumeration of such terms.
* @property serviceType
* @type CredentialAlignmentObject
*/
prototype.serviceType = null;
/**
* http://purl.org/ctdl/terms/socialMedia
* Social media access point for an agent or an agent's contact point.
* @property socialMedia
* @type anyURI
*/
prototype.socialMedia = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/targetContactPoint
* Options for contacting the organization or person.
* @property targetContactPoint
* @type ContactPoint
*/
prototype.targetContactPoint = null;
/**
* http://purl.org/ctdl/terms/worksFor
* Person's place of employment.
* @property worksFor
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.worksFor = null;
}, {affiliation: "Object", approvedBy: "Object", approvedIn: "JurisdictionProfile", approves: "Object", offers: "Object", owns: "Object", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recognizes: "Object", renews: "Object", revokes: "Object", serviceType: "CredentialAlignmentObject", targetContactPoint: "ContactPoint", worksFor: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/QACredentialOrganization
* Quality assurance organization that plays one or more key roles in the lifecycle of a credential, learning program, or assessment.
* @author credentialengine.org
* @class QACredentialOrganization
* @module org.credentialengine
* @extends Agent
*/
var QACredentialOrganization = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Agent.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "QACredentialOrganization";
};
QACredentialOrganization = stjs.extend(QACredentialOrganization, Agent, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/accredits
* Credential, assessment, organization, or learning opportunity for which this organization provides official authorization or approval based on prescribed standards or criteria.
* @property accredits
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.accredits = null;
/**
* http://purl.org/ctdl/terms/address
* Particulars describing the location of the place.
* @property address
* @type Place
*/
prototype.address = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/agentPurpose
* Organization's primary purpose as found on an "about" page of a website.
* @property agentPurpose
* @type anyURI
*/
prototype.agentPurpose = null;
/**
* http://purl.org/ctdl/terms/agentPurposeDescription
* Short, key phrases describing the primary purpose of an organization as might be derived from the "about" page of it's website.
* @property agentPurposeDescription
* @type langString
*/
prototype.agentPurposeDescription = null;
/**
* http://purl.org/ctdl/terms/agentSectorType
* Type of sociological, economic, or political subdivision served by an organization; select from an existing enumeration of such types.
* @property agentSectorType
* @type CredentialAlignmentObject
*/
prototype.agentSectorType = null;
/**
* http://purl.org/ctdl/terms/agentType
* Type of organization such as educational institution, credentialing organization or quality assurance body; select from an existing enumeration of such types.
* @property agentType
* @type CredentialAlignmentObject
*/
prototype.agentType = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/alternativeIdentifier
* Alternative, publicly available and globally unique identifier for an organization issued by an authoritative entity.
* The alternative identifier should be used where no identifier is available for the DUNS, FEIN, NAICS or IPEDS ID properties.
* @property alternativeIdentifier
* @type IdentifierValue
*/
prototype.alternativeIdentifier = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/approves
* Credential, assessment, learning opportunity, or organization for which this organization pronounces favorable judgment.
* @property approves
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.approves = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/credentialingAction
* Indicates a past or potential credentialing action in which the resource being described plays an 'object' role.
* @property credentialingAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.credentialingAction = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/department
* Department of the organization.
* @property department
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.department = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/duns
* Dun & Bradstreet DUNS number for identifying an organization or business person.
* @property duns
* @type string
*/
prototype.duns = null;
/**
* http://purl.org/ctdl/terms/email
* Email address of the organization or person.
* @property email
* @type string
*/
prototype.email = null;
/**
* http://purl.org/ctdl/terms/employee
* Person employed for wages or salary by the organization.
* @property employee
* @type CredentialPerson
*/
prototype.employee = null;
/**
* http://purl.org/ctdl/terms/fein
* Federal Employer Identification Number (FEIN) identifying organizations, persons, states, government agencies, corporations, and companies.
* @property fein
* @type string
*/
prototype.fein = null;
/**
* http://purl.org/ctdl/terms/foundingDate
* Date the organization was founded.
* @property foundingDate
* @type string
*/
prototype.foundingDate = null;
/**
* http://purl.org/ctdl/terms/hasConditionManifest
* Entity that describes a set of constraints, prerequisites, entry conditions, or requirements applicable across the organization, sub-organization or sets of credentials or acitivites.
* @property hasConditionManifest
* @type ConditionManifest
*/
prototype.hasConditionManifest = null;
/**
* http://purl.org/ctdl/terms/hasCostManifest
* Entity that describes a set of cost data applicable across the organization, sub-organization or sets of credentials or acitivites.
* @property hasCostManifest
* @type CostManifest
*/
prototype.hasCostManifest = null;
/**
* http://purl.org/ctdl/terms/hasVerificationService
* Entity describing available systems provided by the agent to verify credential holders.
* Systems in place to verify credential holders and communicate the current credentialing status of all credential holders to employers and other labor market participants, as well as to education and workforce development funders and regulators.
* @property hasVerificationService
* @type VerificationServiceProfile
*/
prototype.hasVerificationService = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/ipedsID
* Unique six digit identifier assigned to all U.S. institutions that have submitted data to the Integrated Postsecondary Education Data System (IPEDS).
* @property ipedsID
* @type string
*/
prototype.ipedsID = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/missionAndGoalsStatement
* Webpage or online document that defines or explains the mission and goals of the organization.
* @property missionAndGoalsStatement
* @type anyURI
*/
prototype.missionAndGoalsStatement = null;
/**
* http://purl.org/ctdl/terms/missionAndGoalsStatementDescription
* Textual statement of the mission and goals of the organization.
* @property missionAndGoalsStatementDescription
* @type langString
*/
prototype.missionAndGoalsStatementDescription = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/offers
* Credential, learning opportunity or assessment offered or conferred by the organization or person.
* @property offers
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.offers = null;
/**
* http://purl.org/ctdl/terms/opeID
* OPE ID number (U.S. Office of Postsecondary Education Identification), sometimes referred to as the Federal School Code.
* Identification number used by the U.S. Department of Education's Office of Postsecondary Education (OPE) to identify schools that have Program Participation Agreements (PPA) so that its students are eligible to participate in Federal Student Financial Assistance (FAFSA) programs under Title IV regulations. This is a 6-digit number followed by a 2-digit suffix used to identify branches, additional locations, and other entities that are part of the eligible institution.
* @property opeID
* @type string
*/
prototype.opeID = null;
/**
* http://purl.org/ctdl/terms/owns
* Credential, learning opportunity or assesment over which the organization or person claims legal title.
* Generally, the value of the property should be one of the subclasses of ceterms:Credential.
* @property owns
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.owns = null;
/**
* http://purl.org/ctdl/terms/parentOrganization
* Larger organization exercising authority over the organization being described.
* @property parentOrganization
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.parentOrganization = null;
/**
* http://purl.org/ctdl/terms/qualityAssuranceTargetType
* Types of entities that the agent accredits, endorses, approves, or recognizes; select from an existing enumeration of such types.
* @property qualityAssuranceTargetType
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.qualityAssuranceTargetType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recognizes
* Credential, learning opportunity or assessment that the agent recommends, endorses, indicates preference for, or otherwise provides a positive judgment.
* @property recognizes
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | CredentialPerson | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recognizes = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/regulates
* Credential, learning opportunity, assessment or organization that this quality assurance organization monitors, including enforcement of applicable legal requirements or standards.
* Regulation of organizations includes authorization to act or operate.
* @property regulates
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | CompetencyFramework | Credential | CredentialOrganization | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QACredentialOrganization | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.regulates = null;
/**
* http://purl.org/ctdl/terms/renews
* Credential type that has its validity extended by the organization or person.
* The value of ceterms:renews should be one of the specific subclasses of ceterms:Credential.
* @property renews
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.renews = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokes
* Credential type that can be invalidated or retracted by the awarding agent.
* The value of ceterms:revokes should be one of the specific subclasses of ceterms:Credential.
* @property revokes
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.revokes = null;
/**
* http://purl.org/ctdl/terms/sameAs
* Another entity that unambiguously indicates the identity of the entity being described.
* Entities that may indicate identity include, but are not limited to, descriptions of entities in open databases such as DBpedia and Wikidata or social media accounts such as FaceBook and LinkedIn.
* @property sameAs
* @type anyURI
*/
prototype.sameAs = null;
/**
* http://purl.org/ctdl/terms/serviceType
* Type of service offered by the agent being described; select from an existing enumeration of such terms.
* @property serviceType
* @type CredentialAlignmentObject
*/
prototype.serviceType = null;
/**
* http://purl.org/ctdl/terms/socialMedia
* Social media access point for an agent or an agent's contact point.
* @property socialMedia
* @type anyURI
*/
prototype.socialMedia = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/subOrganization
* Organization in a subordinate or lower position than a parent organization.
* @property subOrganization
* @type CredentialOrganization | QACredentialOrganization
*/
prototype.subOrganization = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", accredits: "Object", address: "Place", administrationProcess: "ProcessProfile", agentSectorType: "CredentialAlignmentObject", agentType: "CredentialAlignmentObject", alternativeIdentifier: "IdentifierValue", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", approves: "Object", complaintProcess: "ProcessProfile", credentialingAction: "Object", department: "Object", developmentProcess: "ProcessProfile", employee: "CredentialPerson", hasConditionManifest: "ConditionManifest", hasCostManifest: "CostManifest", hasVerificationService: "VerificationServiceProfile", industryType: "CredentialAlignmentObject", jurisdiction: "JurisdictionProfile", maintenanceProcess: "ProcessProfile", offers: "Object", owns: "Object", parentOrganization: "Object", qualityAssuranceTargetType: "Object", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recognizes: "Object", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", regulates: "Object", renews: "Object", reviewProcess: "ProcessProfile", revocationProcess: "ProcessProfile", revokes: "Object", serviceType: "CredentialAlignmentObject", subOrganization: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/MasterDegree
* Credential awarded for a graduate level course of study where course work and activities advance skills beyond those of the bachelor's degree or its equivalent.
* Equivalent to an award at UNESCO ISCED 2011, Level 7.
* @author credentialengine.org
* @class MasterDegree
* @module org.credentialengine
* @extends Degree
*/
var MasterDegree = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Degree.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "MasterDegree";
};
MasterDegree = stjs.extend(MasterDegree, Degree, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/degreeConcentration
* Focused plan of study within a college or university degree such as a concentration in Aerospace Engineering within an Engineering degree.
* @property degreeConcentration
* @type CredentialAlignmentObject
*/
prototype.degreeConcentration = null;
/**
* http://purl.org/ctdl/terms/degreeMajor
* Primary field of study of a degree-seeking student.
* @property degreeMajor
* @type CredentialAlignmentObject
*/
prototype.degreeMajor = null;
/**
* http://purl.org/ctdl/terms/degreeMinor
* Optional, secondary field of study of a degree-seeking student.
* @property degreeMinor
* @type CredentialAlignmentObject
*/
prototype.degreeMinor = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/BachelorDegree
* College/university award for students typically completing three to five years of education where course work and activities advance skills beyond those of the first one to two years of college/university study.
* Equivalent to an award at UNESCO ISCED 2011, Level 6.
* @author credentialengine.org
* @class BachelorDegree
* @module org.credentialengine
* @extends Degree
*/
var BachelorDegree = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Degree.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "BachelorDegree";
};
BachelorDegree = stjs.extend(BachelorDegree, Degree, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/degreeConcentration
* Focused plan of study within a college or university degree such as a concentration in Aerospace Engineering within an Engineering degree.
* @property degreeConcentration
* @type CredentialAlignmentObject
*/
prototype.degreeConcentration = null;
/**
* http://purl.org/ctdl/terms/degreeMajor
* Primary field of study of a degree-seeking student.
* @property degreeMajor
* @type CredentialAlignmentObject
*/
prototype.degreeMajor = null;
/**
* http://purl.org/ctdl/terms/degreeMinor
* Optional, secondary field of study of a degree-seeking student.
* @property degreeMinor
* @type CredentialAlignmentObject
*/
prototype.degreeMinor = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/AssociateDegree
* College/university award for students typically completing the first one to two years of post secondary school education.
* Equivalent to an award at UNESCO ISCED 2011, Level 5.
* @author credentialengine.org
* @class AssociateDegree
* @module org.credentialengine
* @extends Degree
*/
var AssociateDegree = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Degree.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "AssociateDegree";
};
AssociateDegree = stjs.extend(AssociateDegree, Degree, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/degreeConcentration
* Focused plan of study within a college or university degree such as a concentration in Aerospace Engineering within an Engineering degree.
* @property degreeConcentration
* @type CredentialAlignmentObject
*/
prototype.degreeConcentration = null;
/**
* http://purl.org/ctdl/terms/degreeMajor
* Primary field of study of a degree-seeking student.
* @property degreeMajor
* @type CredentialAlignmentObject
*/
prototype.degreeMajor = null;
/**
* http://purl.org/ctdl/terms/degreeMinor
* Optional, secondary field of study of a degree-seeking student.
* @property degreeMinor
* @type CredentialAlignmentObject
*/
prototype.degreeMinor = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/DoctoralDegree
* Highest credential award for students who have completed both a bachelor's degree and a master's degree or their equivalent as well as independent research and/or a significant project or paper.
* Equivalent to UNESCO ISCED, Level 8.
* @author credentialengine.org
* @class DoctoralDegree
* @module org.credentialengine
* @extends Degree
*/
var DoctoralDegree = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Degree.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "DoctoralDegree";
};
DoctoralDegree = stjs.extend(DoctoralDegree, Degree, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/degreeConcentration
* Focused plan of study within a college or university degree such as a concentration in Aerospace Engineering within an Engineering degree.
* @property degreeConcentration
* @type CredentialAlignmentObject
*/
prototype.degreeConcentration = null;
/**
* http://purl.org/ctdl/terms/degreeMajor
* Primary field of study of a degree-seeking student.
* @property degreeMajor
* @type CredentialAlignmentObject
*/
prototype.degreeMajor = null;
/**
* http://purl.org/ctdl/terms/degreeMinor
* Optional, secondary field of study of a degree-seeking student.
* @property degreeMinor
* @type CredentialAlignmentObject
*/
prototype.degreeMinor = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/SecondarySchoolDiploma
* Diploma awarded by secondary education institutions for successful completion of a secondary school program of study.
* Equivalent to an award at UNESCO ISCED 2011 Levels 2 or 3.
* @author credentialengine.org
* @class SecondarySchoolDiploma
* @module org.credentialengine
* @extends Diploma
*/
var SecondarySchoolDiploma = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Diploma.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "SecondarySchoolDiploma";
};
SecondarySchoolDiploma = stjs.extend(SecondarySchoolDiploma, Diploma, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/GeneralEducationDevelopment
* Credential awarded by examination that demonstrates that an individual has acquired secondary school-level academic skills.
* @author credentialengine.org
* @class GeneralEducationDevelopment
* @module org.credentialengine
* @extends Diploma
*/
var GeneralEducationDevelopment = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Diploma.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "GeneralEducationDevelopment";
};
GeneralEducationDevelopment = stjs.extend(GeneralEducationDevelopment, Diploma, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ApprenticeshipCertificate
* Credential earned through work-based learning and earn-and-learn models that meet standards and are applicable to industry trades and professions.
* @author credentialengine.org
* @class ApprenticeshipCertificate
* @module org.credentialengine
* @extends Certificate
*/
var ApprenticeshipCertificate = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Certificate.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "ApprenticeshipCertificate";
};
ApprenticeshipCertificate = stjs.extend(ApprenticeshipCertificate, Certificate, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/DigitalBadge
* Badge offered in digital form.
* @author credentialengine.org
* @class DigitalBadge
* @module org.credentialengine
* @extends Badge
*/
var DigitalBadge = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Badge.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "DigitalBadge";
};
DigitalBadge = stjs.extend(DigitalBadge, Badge, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/OpenBadge
* Visual symbol containing verifiable claims in accordance with the Open Badges specification and delivered digitally.
* @author credentialengine.org
* @class OpenBadge
* @module org.credentialengine
* @extends Badge
*/
var OpenBadge = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Badge.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "OpenBadge";
};
OpenBadge = stjs.extend(OpenBadge, Badge, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ProfessionalDoctorate
* Doctoral degree conferred upon completion of a program providing the knowledge and skills for the recognition, credential, or license required for professional practice.
* Equivalent to an award at UNESCO ISCED 2011, Level 8.
* @author credentialengine.org
* @class ProfessionalDoctorate
* @module org.credentialengine
* @extends DoctoralDegree
*/
var ProfessionalDoctorate = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
DoctoralDegree.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "ProfessionalDoctorate";
};
ProfessionalDoctorate = stjs.extend(ProfessionalDoctorate, DoctoralDegree, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/ResearchDoctorate
* Doctoral degree conferred for advanced work beyond the master level, including the preparation and defense of a thesis or dissertation based on original research, or the planning and execution of an original project demonstrating substantial artistic or scholarly achievement.
* Equivalent to an award at UNESCO ISCED 2011, Level 8.
* @author credentialengine.org
* @class ResearchDoctorate
* @module org.credentialengine
* @extends DoctoralDegree
*/
var ResearchDoctorate = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
DoctoralDegree.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "ResearchDoctorate";
};
ResearchDoctorate = stjs.extend(ResearchDoctorate, DoctoralDegree, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", degreeConcentration: "CredentialAlignmentObject", degreeMajor: "CredentialAlignmentObject", degreeMinor: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/JourneymanCertificate
* Credential awarded to skilled workers on successful completion of an apprenticeship in industry trades and professions.
* @author credentialengine.org
* @class JourneymanCertificate
* @module org.credentialengine
* @extends ApprenticeshipCertificate
*/
var JourneymanCertificate = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
ApprenticeshipCertificate.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "JourneymanCertificate";
};
JourneymanCertificate = stjs.extend(JourneymanCertificate, ApprenticeshipCertificate, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* credentialengine.org/MasterCertificate
* Credential awarded upon demonstration through apprenticeship of the highest level of skills and performance in industry trades and professions.
* @author credentialengine.org
* @class MasterCertificate
* @module org.credentialengine
* @extends ApprenticeshipCertificate
*/
var MasterCertificate = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
ApprenticeshipCertificate.call(this);
this.context = "http://schema.eduworks.com/simpleCtdl";
this.type = "MasterCertificate";
};
MasterCertificate = stjs.extend(MasterCertificate, ApprenticeshipCertificate, [], function(constructor, prototype) {
/**
* http://purl.org/ctdl/terms/accreditedBy
* Quality assurance organization that provides official authorization to, or approval of, a credential, organization, assessment, or learning opportunity.
* @property accreditedBy
* @type QACredentialOrganization
*/
prototype.accreditedBy = null;
/**
* http://purl.org/ctdl/terms/accreditedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or assessment is accredited.
* @property accreditedIn
* @type JurisdictionProfile
*/
prototype.accreditedIn = null;
/**
* http://purl.org/ctdl/terms/administrationProcess
* Entity describing the process by which a credential, assessment, organization, or aspects of it, are administered.
* Processes described include the execution of events and the development of resources in the lifecycle of a credential or organization, such as the process for the proctoring of assessments.
* @property administrationProcess
* @type ProcessProfile
*/
prototype.administrationProcess = null;
/**
* http://purl.org/ctdl/terms/advancedStandingFrom
* Credential that has its time or cost reduced by another credential, assessment or learning opportunity.
* @property advancedStandingFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.advancedStandingFrom = null;
/**
* http://purl.org/ctdl/terms/alternateName
* Alias for a credential including acronyms, alpha-numeric notations, and other forms of name abbreviations in common use such as PhD, MA, and BA.
* @property alternateName
* @type langString
*/
prototype.alternateName = null;
/**
* http://purl.org/ctdl/terms/appealProcess
* Formal process for objecting to decisions of the organization regarding credentials, assessments or processes.
* @property appealProcess
* @type ProcessProfile
*/
prototype.appealProcess = null;
/**
* http://purl.org/ctdl/terms/approvedBy
* Organization that pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.approvedBy = null;
/**
* http://purl.org/ctdl/terms/approvedIn
* Region or political jurisdiction such as a state, province or locale in which an organization pronounces favorable judgment for this credential, assessment, learning opportunity, or organization.
* @property approvedIn
* @type JurisdictionProfile
*/
prototype.approvedIn = null;
/**
* http://purl.org/ctdl/terms/audienceLevelType
* Type of level indicating a point in a progression through an educational or training context, for which the credential is intended; select from an existing enumeration of such types.
* @property audienceLevelType
* @type CredentialAlignmentObject
*/
prototype.audienceLevelType = null;
/**
* http://purl.org/ctdl/terms/availabilityListing
* Listing of online and/or physical locations where a credential can be pursued.
* @property availabilityListing
* @type anyURI
*/
prototype.availabilityListing = null;
/**
* http://purl.org/ctdl/terms/availableAt
* Physical location where the credential, assessment, or learning opportunity can be pursued.
* @property availableAt
* @type Place
*/
prototype.availableAt = null;
/**
* http://purl.org/ctdl/terms/availableOnlineAt
* Online location where the credential, assessment, or learning opportunity can be pursued.
* @property availableOnlineAt
* @type anyURI
*/
prototype.availableOnlineAt = null;
/**
* http://purl.org/ctdl/terms/broadAlignment
* Item that covers all of the relevant concepts in the item being described as well as additional relevant concepts.
* @property broadAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.broadAlignment = null;
/**
* http://purl.org/ctdl/terms/codedNotation
* Set of alpha-numeric symbols that uniquely identifies an item and supports its discovery and use.
* Examples include the alpha-numeric code "CCSS.MATH.CONTENT.HSA.CED.A.2" identifying a node in the U.S. Common Core State Standards on creating equations in algebra, or, the code "8021" in the U.S. Standard Industrial Classification (SIC) for identifying the occupational context for "Offices and Clinics of Dentists".
* @property codedNotation
* @type string
*/
prototype.codedNotation = null;
/**
* http://purl.org/ctdl/terms/commonConditions
* Set constraints, prerequisites, entry conditions, or requirements that are shared across an organization, organizational subdivision, set of credentials, or category of entities and activities.
* @property commonConditions
* @type ConditionManifest
*/
prototype.commonConditions = null;
/**
* http://purl.org/ctdl/terms/commonCosts
* Set of costs maintained at an organizational or sub-organizational level, which apply to this credential, assessment, or learning opportunity.
* @property commonCosts
* @type CostManifest
*/
prototype.commonCosts = null;
/**
* http://purl.org/ctdl/terms/complaintProcess
* Process for handling complaints about a credential, or aspects of it including related learning opportunities and assessments.
* @property complaintProcess
* @type ProcessProfile
*/
prototype.complaintProcess = null;
/**
* http://purl.org/ctdl/terms/copyrightHolder
* Person or organization holding the rights in copyright to entities such as credentials, learning opportunities, assessments, competencies or concept schemes.
* @property copyrightHolder
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.copyrightHolder = null;
/**
* http://purl.org/ctdl/terms/corequisite
* Credentials that must be pursued concurrently.
* Includes dual (double) degrees that cannot be earned independently of each other.
* @property corequisite
* @type ConditionProfile
*/
prototype.corequisite = null;
/**
* http://purl.org/ctdl/terms/credentialId
* Globally unique identifier by which the creator, owner or provider of a credential recognizes that credential in transactions with the external environment (e.g., in verifiable claims involving the credential).
* The identifier may take the form of a URN, UUID, ARK, DOI, INFO or any other publicly recognized, globally unique identifier scheme.
* @property credentialId
* @type string
*/
prototype.credentialId = null;
/**
* http://purl.org/ctdl/terms/credentialStatusType
* Type of official status of the credential; select from an enumeration of such types.
* @property credentialStatusType
* @type CredentialAlignmentObject
*/
prototype.credentialStatusType = null;
/**
* http://purl.org/ctdl/terms/ctid
* Globally unique Credential Transparency Identifier (CTID) by which the creator, owner or provider of a credential, learning opportunity competency, or assessment recognizes the entity in transactions with the external environment (e.g., in verifiable claims involving a credential).
* The CTID is the equivalent of a version identifier for the resource. Different versions of a resource are considered distinct expressions and each must be assigned its own CTID. Each version of a resource can have only one CTID assigned. However, a single version of a resource may have distinct identifier values for both the ctid property and the credentialId property. In such a case both identifiers will be recognized by the resource creator/owner/provider in transactions with the external environment.
* @property ctid
* @type string
*/
prototype.ctid = null;
/**
* http://purl.org/ctdl/terms/dateEffective
* Effective date of the content of a credential, assessment or learning opportunity.
* @property dateEffective
* @type date
*/
prototype.dateEffective = null;
/**
* http://purl.org/ctdl/terms/description
* Statememnt, characterization or account of the entity.
* @property description
* @type langString
*/
prototype.description = null;
/**
* http://purl.org/ctdl/terms/developmentProcess
* Entity describing the process by which a credential, or aspects of it, were created.
* @property developmentProcess
* @type ProcessProfile
*/
prototype.developmentProcess = null;
/**
* http://purl.org/ctdl/terms/earnings
* Entity describing aggregate credential holder earnings data.
* @property earnings
* @type EarningsProfile
*/
prototype.earnings = null;
/**
* http://purl.org/ctdl/terms/employmentOutcome
* Entity describing aggregate data on jobs obtained with the credential by occupation and industry for a given period of time in a specific region.
* @property employmentOutcome
* @type EmploymentOutcomeProfile
*/
prototype.employmentOutcome = null;
/**
* http://purl.org/ctdl/terms/estimatedCost
* Estimated cost of a credential, learning opportunity or assessment.
* @property estimatedCost
* @type CostProfile
*/
prototype.estimatedCost = null;
/**
* http://purl.org/ctdl/terms/estimatedDuration
* Estimated time it will take to complete a credential, learning opportunity or assessment.
* @property estimatedDuration
* @type DurationProfile
*/
prototype.estimatedDuration = null;
/**
* http://purl.org/ctdl/terms/exactAlignment
* Relevant concepts in two entities being compared are coextensive.
* @property exactAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.exactAlignment = null;
/**
* http://purl.org/ctdl/terms/financialAssistance
* Entity that describes financial assistance for which this credential, assessment, or learning opportunity qualifies.
* Whether the financial aid in question is associated with a credential, an assessment, or a learning opportunity is dependent on context.
* @property financialAssistance
* @type FinancialAlignmentObject
*/
prototype.financialAssistance = null;
/**
* http://purl.org/ctdl/terms/hasPart
* Indicates a separately identifiable and independently useful component of the entity.
* Such partitive components can frequently be used in more than one context.
* @property hasPart
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.hasPart = null;
/**
* http://purl.org/ctdl/terms/holders
* Entity describing the number and characteristics of credentialed individuals and their geographic location.
* @property holders
* @type HoldersProfile
*/
prototype.holders = null;
/**
* http://purl.org/ctdl/terms/image
* Image, icon or logo that represents the entity including registered trade or service marks.
* @property image
* @type anyURI
*/
prototype.image = null;
/**
* http://purl.org/ctdl/terms/industryType
* Type of industry; select from an existing enumeration of such types such as the SIC, NAICS, and ISIC classifications.
* @property industryType
* @type CredentialAlignmentObject
*/
prototype.industryType = null;
/**
* http://purl.org/ctdl/terms/inLanguage
* Primary language of the credential, learning opportunity or assessment.
* This is the primary language the entity, even if the it makes use of other languages. For example, a course that teaches Spanish to English-speaking students may primarily be in English, because that is the language used to convey the material.
* @property inLanguage
* @type language
*/
prototype.inLanguage = null;
/**
* http://purl.org/ctdl/terms/isAdvancedStandingFor
* This credential, assessment, or learning opportunity reduces the time or cost required to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isAdvancedStandingFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isAdvancedStandingFor = null;
/**
* http://purl.org/ctdl/terms/isPartOf
* Indicates another entity of which this entity is a component.
* Covers partitive notions such as "embedded".
* @property isPartOf
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPartOf = null;
/**
* http://purl.org/ctdl/terms/isPreparationFor
* This credential, assessment, or learning opportunity provides preparation for the credential, assessment, or learning opportunity being referenced.
* @property isPreparationFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isPreparationFor = null;
/**
* http://purl.org/ctdl/terms/isRecommendedFor
* It is recommended to earn or complete this credential, assessment, or learning opportunity before attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRecommendedFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRecommendedFor = null;
/**
* http://purl.org/ctdl/terms/isRequiredFor
* This credential, assessment, or learning opportunity must be earned or completed prior to attempting to earn or complete the referenced credential, assessment, or learning opportunity.
* @property isRequiredFor
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.isRequiredFor = null;
/**
* http://purl.org/ctdl/terms/jurisdiction
* Geographic or political region in which the credential is formally applicable or an organization has authority to act.
* @property jurisdiction
* @type JurisdictionProfile
*/
prototype.jurisdiction = null;
/**
* http://purl.org/ctdl/terms/keyword
* Keyword or key phrase describing relevant aspects of an entity.
* @property keyword
* @type langString
*/
prototype.keyword = null;
/**
* http://purl.org/ctdl/terms/latestVersion
* Latest version of the credential.
* @property latestVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.latestVersion = null;
/**
* http://purl.org/ctdl/terms/maintenanceProcess
* Entity describing the process by which the credential is maintained including review and updating.
* Such maintenance does not include renewal of a credential by an individual holder.
* @property maintenanceProcess
* @type ProcessProfile
*/
prototype.maintenanceProcess = null;
/**
* http://purl.org/ctdl/terms/majorAlignment
* Major overlap of relevant concepts between the two resources being compared.
* @property majorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.majorAlignment = null;
/**
* http://purl.org/ctdl/terms/minorAlignment
* Minor overlap of relevant concepts between the two credentials being compared.
* @property minorAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.minorAlignment = null;
/**
* http://purl.org/ctdl/terms/naics
* North American Industry Classification System (NAICS) code of an organization or business person.
* @property naics
* @type string
*/
prototype.naics = null;
/**
* http://purl.org/ctdl/terms/name
* Name or title of the entity.
* @property name
* @type langString
*/
prototype.name = null;
/**
* http://purl.org/ctdl/terms/narrowAlignment
* Credential covers all of the relevant concepts in another credential as well as relevant concepts not found in the other credential.
* @property narrowAlignment
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.narrowAlignment = null;
/**
* http://purl.org/ctdl/terms/occupationType
* Type of occupation; select from an existing enumeration of such types.
* @property occupationType
* @type CredentialAlignmentObject
*/
prototype.occupationType = null;
/**
* http://purl.org/ctdl/terms/offeredBy
* Agent that offers the credential, learning opportunity or assessment.
* @property offeredBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.offeredBy = null;
/**
* http://purl.org/ctdl/terms/offeredIn
* Region or political jurisdiction such as a state, province or locale where the credential, learning resource or assessment is offered.
* @property offeredIn
* @type JurisdictionProfile
*/
prototype.offeredIn = null;
/**
* http://purl.org/ctdl/terms/ownedBy
* Organization or person with an enforceable claim or legal title to the credential, assessment or learning opportunity.
* Agent includes credentialing organizations, quality assurance organizations and persons. It does not not include credential holders.
* @property ownedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.ownedBy = null;
/**
* http://purl.org/ctdl/terms/preparationFrom
* Another credential, learning opportunity or assessment that provides preparation for this credential, learning opportunity or assessment.
* @property preparationFrom
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | ConditionProfile | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.preparationFrom = null;
/**
* http://purl.org/ctdl/terms/previousVersion
* Version of the credential that immediately precedes this credential.
* @property previousVersion
* @type ApprenticeshipCertificate | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Credential | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.previousVersion = null;
/**
* http://purl.org/ctdl/terms/processStandards
* Webpage or online document that describes the criteria, standards, and/or requirements used with a process.
* @property processStandards
* @type anyURI
*/
prototype.processStandards = null;
/**
* http://purl.org/ctdl/terms/processStandardsDescription
* Textual description of the criteria, standards, and/or requirements used with a process.
* @property processStandardsDescription
* @type langString
*/
prototype.processStandardsDescription = null;
/**
* http://purl.org/ctdl/terms/purposeType
* Type of intended application of the credential by the holder; select from an existing enumeration of such types.
* @property purposeType
* @type CredentialAlignmentObject
*/
prototype.purposeType = null;
/**
* http://purl.org/ctdl/terms/recognizedBy
* Agent that acknowledges the validity of the credential, learning opportunity of assessment.
* @property recognizedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.recognizedBy = null;
/**
* http://purl.org/ctdl/terms/recognizedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning resource, or assessment has been publicly recommended, acknowledged or endorsed.
* @property recognizedIn
* @type JurisdictionProfile
*/
prototype.recognizedIn = null;
/**
* http://purl.org/ctdl/terms/recommends
* Recommended credential, learning opportunity or assessment.
* @property recommends
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.recommends = null;
/**
* http://purl.org/ctdl/terms/region
* Entity that describes the longitude, latitude and other location details of an area.
* @property region
* @type Place
*/
prototype.region = null;
/**
* http://purl.org/ctdl/terms/regulatedBy
* Quality assurance organization that enforces the legal requirements of the credential, learning resource or assessment.
* @property regulatedBy
* @type QACredentialOrganization
*/
prototype.regulatedBy = null;
/**
* http://purl.org/ctdl/terms/regulatedIn
* Region or political jurisdiction such as a state, province or locale in which the credential, learning opportunity or resource is regulated.
* @property regulatedIn
* @type JurisdictionProfile
*/
prototype.regulatedIn = null;
/**
* http://purl.org/ctdl/terms/relatedAction
* Action related to the credential.
* @property relatedAction
* @type AccreditAction | AdvancedStandingAction | ApproveAction | CredentialingAction | OfferAction | RecognizeAction | RegulateAction | RenewAction | RevokeAction | RightsAction
*/
prototype.relatedAction = null;
/**
* http://purl.org/ctdl/terms/renewal
* Entity describing the constraints, prerequisites, entry conditions, or requirements necessary to maintenance and renewal of an awarded credential.
* Generally, renewal applies to certifications and licenses; however, it may occasionally apply to other types of credentials.
* @property renewal
* @type ConditionProfile
*/
prototype.renewal = null;
/**
* http://purl.org/ctdl/terms/renewalFrequency
* Frequency with which the credential needs to be renewed.
* @property renewalFrequency
* @type duration
*/
prototype.renewalFrequency = null;
/**
* http://purl.org/ctdl/terms/renewedBy
* Organization or person that handles the renewal of the credential.
* @property renewedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.renewedBy = null;
/**
* http://purl.org/ctdl/terms/renewedIn
* Region or political jurisdiction such as a state, province or locale in which the credential is renewable.
* @property renewedIn
* @type JurisdictionProfile
*/
prototype.renewedIn = null;
/**
* http://purl.org/ctdl/terms/requires
* Requirement or set of requirements for this credential, learning opportunity, or assessment.
* @property requires
* @type ApprenticeshipCertificate | AssessmentProfile | AssociateDegree | BachelorDegree | Badge | Certificate | Certification | Competency | ConditionProfile | Credential | CredentialAlignmentObject | Degree | DigitalBadge | Diploma | DoctoralDegree | GeneralEducationDevelopment | JourneymanCertificate | LearningOpportunityProfile | License | MasterCertificate | MasterDegree | MicroCredential | OpenBadge | ProfessionalDoctorate | QualityAssuranceCredential | ResearchDoctorate | SecondarySchoolDiploma
*/
prototype.requires = null;
/**
* http://purl.org/ctdl/terms/reviewProcess
* Entity that describes the process by which the credential, or aspects of it, are reviewed.
* @property reviewProcess
* @type ProcessProfile
*/
prototype.reviewProcess = null;
/**
* http://purl.org/ctdl/terms/revocation
* Entity that describes the processes and criteria for ending (revoking) the validity or operation of an awarded credential.
* Generally, revocation applies to certifications and licenses; however, it may also apply to other types of credential under extraordinary circumstances.
* @property revocation
* @type RevocationProfile
*/
prototype.revocation = null;
/**
* http://purl.org/ctdl/terms/revocationProcess
* Entity describing the process by which the credential is revoked.
* @property revocationProcess
* @type ProcessProfile
*/
prototype.revocationProcess = null;
/**
* http://purl.org/ctdl/terms/revokedBy
* Organization or person that handles revocation of an awarded credential due to violations or failure to renew.
* @property revokedBy
* @type CredentialOrganization | CredentialPerson | QACredentialOrganization
*/
prototype.revokedBy = null;
/**
* http://purl.org/ctdl/terms/revokedIn
* Region or political jurisdiction such as a state, province or locale in which the credential can be revoked.
* @property revokedIn
* @type JurisdictionProfile
*/
prototype.revokedIn = null;
/**
* http://purl.org/ctdl/terms/subject
* Words or brief phrases describing the topicality of the entity; select subject terms from an existing enumeration of such terms.
* @property subject
* @type CredentialAlignmentObject
*/
prototype.subject = null;
/**
* http://purl.org/ctdl/terms/subjectWebpage
* The webpage that describes this entity.
* The web page being referenced describes the entity. The value of subjectWebpage is an authoritative location for information about the subject but should not assumed to be a persistent identifier of the subject.
* @property subjectWebpage
* @type anyURI
*/
prototype.subjectWebpage = null;
/**
* http://purl.org/ctdl/terms/versionIdentifier
* Alphanumeric identifier of the version of the credential that is unique within the organizational context of its owner.
* The credential version captured here is any local identifier used by the credential owner to identify the version of the credential in the its local system.
* @property versionIdentifier
* @type IdentifierValue
*/
prototype.versionIdentifier = null;
}, {accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", accreditedBy: "QACredentialOrganization", accreditedIn: "JurisdictionProfile", administrationProcess: "ProcessProfile", advancedStandingFrom: "Object", appealProcess: "ProcessProfile", approvedBy: "Object", approvedIn: "JurisdictionProfile", audienceLevelType: "CredentialAlignmentObject", availableAt: "Place", broadAlignment: "Object", commonConditions: "ConditionManifest", commonCosts: "CostManifest", complaintProcess: "ProcessProfile", copyrightHolder: "Object", corequisite: "ConditionProfile", credentialStatusType: "CredentialAlignmentObject", developmentProcess: "ProcessProfile", earnings: "EarningsProfile", employmentOutcome: "EmploymentOutcomeProfile", estimatedCost: "CostProfile", estimatedDuration: "DurationProfile", exactAlignment: "Object", financialAssistance: "FinancialAlignmentObject", hasPart: "Object", holders: "HoldersProfile", industryType: "CredentialAlignmentObject", isAdvancedStandingFor: "Object", isPartOf: "Object", isPreparationFor: "Object", isRecommendedFor: "Object", isRequiredFor: "Object", jurisdiction: "JurisdictionProfile", latestVersion: "Object", maintenanceProcess: "ProcessProfile", majorAlignment: "Object", minorAlignment: "Object", narrowAlignment: "Object", occupationType: "CredentialAlignmentObject", offeredBy: "Object", offeredIn: "JurisdictionProfile", ownedBy: "Object", preparationFrom: "Object", previousVersion: "Object", purposeType: "CredentialAlignmentObject", recognizedBy: "Object", recognizedIn: "JurisdictionProfile", recommends: "Object", region: "Place", regulatedBy: "QACredentialOrganization", regulatedIn: "JurisdictionProfile", relatedAction: "Object", renewal: "ConditionProfile", renewedBy: "Object", renewedIn: "JurisdictionProfile", requires: "Object", reviewProcess: "ProcessProfile", revocation: "RevocationProfile", revocationProcess: "ProcessProfile", revokedBy: "Object", revokedIn: "JurisdictionProfile", subject: "CredentialAlignmentObject", versionIdentifier: "IdentifierValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* www.w3.org/2004/02/skos/core/Collection
* A meaningful collection of concepts.
* Labelled collections can be used where you would like a set of concepts to be displayed under a 'node label' in the hierarchy.
* @author w3.org
* @class Collection
* @module org.w3.skos
*/
var Collection = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.cassproject.org/0.3/skos/", "Collection");
};
Collection = stjs.extend(Collection, EcRemoteLinkedData, [], function(constructor, prototype) {
/**
* www.w3.org/2004/02/skos/core/member
* Relates a collection to one of its members.
* @property member
* @type N0e403dc85fe548d1b3d2f3d1ded36d20
*/
prototype.member = null;
}, {member: {name: "Array", arguments: ["Object"]}, owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* www.w3.org/2004/02/skos/core/Concept
* An idea or notion; a unit of thought.
* @author w3.org
* @class Concept
* @module org.w3.skos
*/
var Concept = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.cassproject.org/0.3/skos/", "Concept");
};
Concept = stjs.extend(Concept, EcRemoteLinkedData, [], function(constructor, prototype) {
constructor.myType = "http://schema.cassproject.org/0.3/skos/Concept";
/**
* www.w3.org/2004/02/skos/core/topConceptOf
* Relates a concept to the concept scheme that it is a top level concept of.
* @property topConceptOf
* @type ConceptScheme
*/
prototype.topConceptOf = null;
/**
* www.w3.org/2004/02/skos/core/semanticRelation
* Links a concept to a concept related by meaning.
* @property semanticRelation
* @type Concept
*/
prototype.semanticRelation = null;
}, {topConceptOf: "ConceptScheme", semanticRelation: "Concept", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* www.w3.org/2004/02/skos/core/ConceptScheme
* A set of concepts, optionally including statements about semantic relationships between those concepts.
* A concept scheme may be defined to include concepts from different sources.
* @author w3.org
* @class ConceptScheme
* @module org.w3.skos
*/
var ConceptScheme = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
EcRemoteLinkedData.call(this, "http://schema.cassproject.org/0.3/skos/", "ConceptScheme");
};
ConceptScheme = stjs.extend(ConceptScheme, EcRemoteLinkedData, [], function(constructor, prototype) {
constructor.myType = "http://schema.cassproject.org/0.3/skos/ConceptScheme";
/**
* www.w3.org/2004/02/skos/core/hasTopConcept
* Relates, by convention, a concept scheme to a concept which is topmost in the broader/narrower concept hierarchies for that scheme, providing an entry point to these hierarchies.
* @property hasTopConcept
* @type Concept
*/
prototype.hasTopConcept = null;
}, {hasTopConcept: "Concept", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* www.w3.org/2004/02/skos/core/OrderedCollection
* An ordered collection of concepts, where both the grouping and the ordering are meaningful.
* Ordered collections can be used where you would like a set of concepts to be displayed in a specific order, and optionally under a 'node label'.
* @author w3.org
* @class OrderedCollection
* @module org.w3.skos
* @extends Collection
*/
var OrderedCollection = /**
* Constructor, automatically sets @context and @type.
* @constructor
*/
function() {
Collection.call(this);
this.context = "http://schema.cassproject.org/0.3/skos/";
this.type = "OrderedCollection";
};
OrderedCollection = stjs.extend(OrderedCollection, Collection, [], function(constructor, prototype) {
/**
* www.w3.org/2004/02/skos/core/memberList
* Relates an ordered collection to the RDF list containing its members.
* @property memberList
* @type List
*/
prototype.memberList = null;
}, {memberList: {name: "Array", arguments: ["Object"]}, member: {name: "Array", arguments: ["Object"]}, owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* AES encrypted private key and display name. Contains Initialization Vectors,
* but not secrets. Used to encrypt private identities for storage on remote
* systems.
*
* @author fritz.ray@eduworks.com
* @class EbacCredential
* @module org.cassproject
*/
var EbacCredential = function() {
EcLinkedData.call(this, Ebac.context, EbacCredential.TYPE_0_3);
};
EbacCredential = stjs.extend(EbacCredential, EcLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/credential";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/credential";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/Credential";
/**
* AES Initialization Vector used to decode PPK. Base64 encoded.
*
* @property iv
* @type string
*/
prototype.iv = null;
/**
* AES encrypted Private Key in PEM form.
*
* @property ppk
* @type string
*/
prototype.ppk = null;
/**
* AES Initialization Vector used to decode displayName. Base64 encoded.
*
* @property displayNameIv
* @type string
*/
prototype.displayNameIv = null;
/**
* AES encrypted display name for identity.
*
* @property displayName
* @type string
*/
prototype.displayName = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacCredential.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacCredential.TYPE_0_2);
}
if (EbacCredential.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Ebac.context_0_3, EbacCredential.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacCredential.TYPE_0_3);
a.push(EbacCredential.TYPE_0_2);
a.push(EbacCredential.TYPE_0_1);
return a;
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Message used to retrieve credentials from a remote system.
* <p>
* TODO: Vulnerable to replay attacks.
*
* @author fritz.ray@eduworks.com
* @class EbacCredentialRequest
* @module org.cassproject
*/
var EbacCredentialRequest = function() {
EcLinkedData.call(this, Ebac.context, EbacCredentialRequest.TYPE_0_3);
};
EbacCredentialRequest = stjs.extend(EbacCredentialRequest, EcLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/credentialRequest";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/credentialRequest";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/CredentialRequest";
/**
* Hashed username.
*
* @property username
* @type string
*/
prototype.username = null;
/**
* Hashed password to authorize request.
*
* @property password
* @type string
*/
prototype.password = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacCredentialRequest.TYPE_0_1 == this.type) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacCredentialRequest.TYPE_0_2);
}
if (EbacCredentialRequest.TYPE_0_2 == this.getFullType()) {
this.setContextAndType(Ebac.context_0_3, EbacCredentialRequest.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacCredentialRequest.TYPE_0_3);
a.push(EbacCredentialRequest.TYPE_0_2);
a.push(EbacCredentialRequest.TYPE_0_1);
return a;
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Credential list along with one time pad and session-based token for use in
* commit actions.
*
* @author fritz.ray@eduworks.com
* @class EbacCredentials
* @module org.cassproject
*/
var EbacCredentials = function() {
EcLinkedData.call(this, Ebac.context, EbacCredentials.TYPE_0_3);
};
EbacCredentials = stjs.extend(EbacCredentials, EcLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/credentials";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/credentials";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/Credentials";
/**
* One time pad that may be used in password recovery. Base64 encoded.
*
* @property pad
* @type string
*/
prototype.pad = null;
/**
* Token provided by server to use in commit actions.
*
* @property token
* @type string
*/
prototype.token = null;
/**
* Credential array.
*
* @property credentials
* @type EbacCredential[]
*/
prototype.credentials = null;
/**
* Contact array.
*
* @property contacts
* @type EbacContact[]
*/
prototype.contacts = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacCredentials.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacCredentials.TYPE_0_2);
}
if (EbacCredentials.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Ebac.context_0_3, EbacCredentials.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacCredentials.TYPE_0_3);
a.push(EbacCredentials.TYPE_0_2);
a.push(EbacCredentials.TYPE_0_1);
return a;
};
}, {credentials: {name: "Array", arguments: ["EbacCredential"]}, contacts: {name: "Array", arguments: ["EbacContact"]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* AES encrypted public key and display name. Contains Initialization Vectors,
* but not secrets. Used to encrypt public identities for storage on remote
* systems.
*
* @author fritz.ray@eduworks.com
* @class EbacContact
* @module org.cassproject
*/
var EbacContact = function() {
EcLinkedData.call(this, Ebac.context, EbacContact.TYPE_0_3);
};
EbacContact = stjs.extend(EbacContact, EcLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.2/contact";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/contact";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/Contact";
/**
* AES Initialization Vector used to decode PPK. Base64 encoded.
*
* @property iv
* @type string
*/
prototype.iv = null;
/**
* AES encrypted Private Key in PEM format.
*
* @property pk
* @type string
*/
prototype.pk = null;
/**
* AES Initialization Vector used to decode displayName. Base64 encoded.
*
* @property displayNameIv
* @type string
*/
prototype.displayNameIv = null;
/**
* AES encrypted display name for identity.
*
* @property displayName
* @type string
*/
prototype.displayName = null;
/**
* AES Initialization Vector of the home server of the contact. Base64 encoded.
*
* @property sourceIv
* @type string
*/
prototype.sourceIv = null;
/**
* URL to the home server of the contact.
*
* @property source
* @type string
*/
prototype.source = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacContact.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacContact.TYPE_0_2);
}
if (EbacContact.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Ebac.context_0_3, EbacContact.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacContact.TYPE_0_3);
a.push(EbacContact.TYPE_0_2);
a.push(EbacContact.TYPE_0_1);
return a;
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Component of EbacEncryptedValue that contains data needed to decrypt
* encrypted payload. Is, itself, encrypted.
* <p>
* Also contains data used to verify that encrypted-data substitution attacks
* were not performed on the data.
* <p>
* Must be encryptable by RSA-2048, therefore, serialized form must less than 256
* bytes.
*
* @author fritz.ray@eduworks.com
* @class EbacEncryptedSecret
* @module org.cassproject
*/
var EbacEncryptedSecret = function() {
EcLinkedData.call(this, Ebac.context, EbacEncryptedSecret.TYPE_0_3);
};
EbacEncryptedSecret = stjs.extend(EbacEncryptedSecret, EcLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/encryptedSecret";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/encryptedSecret";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/EncryptedSecret";
/**
* IV used to encrypt/decrypt payload. Base64 encoded.
*
* @property iv
* @type string
*/
prototype.iv = null;
/**
* Hashed and Base64 encoded ID of the parent (if any) object.
* Used to verify the data has not been copied from elsewhere.
*
* @property id
* @type string
*/
prototype.id = null;
/**
* Secret used to encrypt/decrypt payload.
*
* @property secret
* @type string
*/
prototype.secret = null;
/**
* Dot and Bracket notated index of the field in the parent-most object (if
* any). Used to verify the field has not been copied from elsewhere.
*
* @property field
* @type string
*/
prototype.field = null;
/**
* Deserializes the field from a compact form used in RSA encryption.
*
* @param {JSONObject} obj Object to deserialize from.
* @return {EbacEncryptedSecret} Secret in object form.
* @method fromEncryptableJson
* @static
*/
constructor.fromEncryptableJson = function(obj) {
var secret = new EbacEncryptedSecret();
var o = (obj);
secret.iv = o["v"];
if (o["d"] != null)
secret.id = o["d"];
secret.secret = o["s"];
if (o["f"] != null)
secret.field = o["f"];
return secret;
};
/**
* Serializes the field into a compact form for RSA encryption.
*
* @return {string} string
* @method toEncryptableJson
*/
prototype.toEncryptableJson = function() {
var o = (new Object());
o["v"] = this.iv;
if (this.id != null)
o["d"] = this.id;
o["s"] = this.secret;
if (this.field != null)
o["f"] = this.field;
return JSON.stringify(o);
};
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacEncryptedSecret.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacEncryptedSecret.TYPE_0_2);
}
if (EbacEncryptedSecret.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Ebac.context_0_3, EbacEncryptedSecret.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacEncryptedSecret.TYPE_0_3);
a.push(EbacEncryptedSecret.TYPE_0_2);
a.push(EbacEncryptedSecret.TYPE_0_1);
return a;
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Signature used to authorize movement of data on behalf of a private-key
* holding owner.
*
* @author fritz.ray@eduworks.com
* @class EbacSignature
* @module org.cassproject
*/
var EbacSignature = function() {
EcLinkedData.call(this, Ebac.context, EbacSignature.TYPE_0_3);
};
EbacSignature = stjs.extend(EbacSignature, EcLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/timeLimitedSignature";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/timeLimitedSignature";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/TimeLimitedSignature";
/**
* The public key of the authorizing party in PEM format.
*
* @property owner
* @type string
*/
prototype.owner = null;
/**
* The time in number of milliseconds since midnight of January 1, 1970
* 00:00:00 UTC that this signature is authorized to move data.
*
* @property expiry
* @type long
*/
prototype.expiry = 0.0;
/**
* The signature of this object, having signed the object, having been
* encoded in JSON with no space or tabs in ASCII sort order, having no
* value for the signature at the time of signing.
*
* @property signature
* @type string
*/
prototype.signature = null;
/**
* The server authorized to move data. If this is empty, the signature may
* be used by a server to ask for data from other servers.
*
* @property server
* @type string
*/
prototype.server = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacSignature.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacSignature.TYPE_0_2);
}
if (EbacSignature.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Ebac.context_0_3, EbacSignature.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacSignature.TYPE_0_3);
a.push(EbacSignature.TYPE_0_2);
a.push(EbacSignature.TYPE_0_1);
return a;
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Encrypted JSON-LD object or string.
*
* @author fritz.ray@eduworks.com
* @class EbacEncryptedValue
* @module org.cassproject
*/
var EbacEncryptedValue = function() {
EcRemoteLinkedData.call(this, Ebac.context, EbacEncryptedValue.myType);
};
EbacEncryptedValue = stjs.extend(EbacEncryptedValue, EcRemoteLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/encryptedValue";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/encryptedValue";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/EncryptedValue";
constructor.myType = EbacEncryptedValue.TYPE_0_3;
/**
* Optional Hint used to aid in search.
* Displays the type of the encrypted object.
*
* @property encryptedType
* @type string
*/
prototype.encryptedType = null;
/**
* Base-64 encoded, AES encrypted form of the encrypted object (or string).
*
* @property payload
* @type string
*/
prototype.payload = null;
/**
* Optional Hint used to aid in search and display.
* Name of the inner encrypted object.
*
* @property name
* @type string
*/
prototype.name = null;
/**
* Array of EbacEncryptedSecret objects encoded in Base-64, encrypted using
* RSA public keys of owners, readers, or other parties to allow them
* access to the payload.
*
* @property secret
* @type string[]
*/
prototype.secret = null;
prototype.copyFrom = function(that) {
var me = (this);
for (var key in me)
delete me[key];
var you = (that);
for (var key in you) {
if (me[key] == null)
me[key.replace("@", "")] = you[key];
}
if (!this.isAny(this.getTypes()))
throw new RuntimeException("Incompatible type: " + this.getFullType());
};
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacEncryptedValue.TYPE_0_1 == this.type) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacEncryptedValue.TYPE_0_2);
}
if (EbacEncryptedValue.TYPE_0_2 == this.getFullType()) {
this.setContextAndType(Ebac.context_0_3, EbacEncryptedValue.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacEncryptedValue.TYPE_0_3);
a.push(EbacEncryptedValue.TYPE_0_2);
a.push(EbacEncryptedValue.TYPE_0_1);
return a;
};
}, {secret: {name: "Array", arguments: [null]}, owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* AES encrypted public key and display name message.
* Used to grant access to a contact.
* Contains Initialization Vectors, but not secrets.
* Used to encrypt public identities for storage on remote systems.
*
* @author fritz.ray@eduworks.com
* @class EbacContactGrant
* @module org.cassproject
*/
var EbacContactGrant = function() {
EcRemoteLinkedData.call(this, Ebac.context, EbacContactGrant.TYPE_0_3);
};
EbacContactGrant = stjs.extend(EbacContactGrant, EcRemoteLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/contactGrant";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/contactGrant";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/ContactGrant";
/**
* Public key being granted to the owner of this message.
*
* @property pk
* @type string(pem)
*/
prototype.pk = null;
/**
* Display name of the contact.
*
* @property displayName
* @type string
*/
prototype.displayName = null;
/**
* Source server of the contact.
*
* @property source
* @type string
*/
prototype.source = null;
/**
* Response token used to validate that this grant is in response to a contact request you sent.
*
* @property responseToken
* @type string
*/
prototype.responseToken = null;
/**
* Signature (Base64 encoded) of the response token to verify against your own public key
* to ensure that this grant is in response to a contact request you sent.
*
* @property responseSignature
* @type string
*/
prototype.responseSignature = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacContactGrant.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacContactGrant.TYPE_0_2);
}
if (EbacContactGrant.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Ebac.context_0_3, EbacContactGrant.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacContactGrant.TYPE_0_3);
a.push(EbacContactGrant.TYPE_0_2);
a.push(EbacContactGrant.TYPE_0_1);
return a;
};
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Message used to commit credentials to a remote login server.
* <p>
* TODO: Vulnerable to replay attacks. Token field prevents some replay
* attacks.
*
* @author fritz.ray@eduworks.com
* @class EbacCredentialCommit
* @module org.cassproject
*/
var EbacCredentialCommit = function() {
EcLinkedData.call(this, Ebac.context, EbacCredentialCommit.TYPE_0_3);
this.credentials = new EbacCredentials();
};
EbacCredentialCommit = stjs.extend(EbacCredentialCommit, EcLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/ebac/0.1/credentialCommit";
constructor.TYPE_0_2 = "http://schema.eduworks.com/ebac/0.2/credentialCommit";
constructor.TYPE_0_3 = "http://schema.cassproject.org/kbac/0.2/CredentialCommit";
/**
* Hashed username.
*
* @property username
* @type string
*/
prototype.username = null;
/**
* Hashed password to authorize commit.
*
* @property password
* @type string
*/
prototype.password = null;
/**
* Token provided to client when previously executed Request was done. May
* be empty if this is used as part of Create action.
*
* @property token
* @type string
*/
prototype.token = null;
/**
* List of credentials to commit to the login server storage.
*
* @property credentials
* @type EbacCredentials
*/
prototype.credentials = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (EbacCredentialCommit.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Ebac.context_0_2, EbacCredentialCommit.TYPE_0_2);
}
if (EbacCredentialCommit.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Ebac.context_0_3, EbacCredentialCommit.TYPE_0_3);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(EbacCredentialCommit.TYPE_0_3);
a.push(EbacCredentialCommit.TYPE_0_2);
a.push(EbacCredentialCommit.TYPE_0_1);
return a;
};
}, {credentials: "EbacCredentials", atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Class used to hold namespace data.
*
* @author fray
* @class Cass
* @module org.cassproject
*/
var Cass = function() {};
Cass = stjs.extend(Cass, null, [], function(constructor, prototype) {
constructor.context_0_1 = "http://schema.eduworks.com/cass/0.1";
constructor.context_0_2 = "http://schema.eduworks.com/cass/0.2";
constructor.context_0_3 = "http://schema.cassproject.org/0.2";
constructor.context_0_4 = "http://schema.cassproject.org/0.3";
constructor.context = Cass.context_0_4;
}, {}, {});
/**
* Competencies include skills, knowledge, abilities, traits, and combinations thereof that are needed to perform a task or job. In CASS, competencies are identified and located using a globally unique ID. Competencies can be further described using titles, descriptions, levels, indicators (coming soon), roll-up rules, and relationships to other competencies.
*
* @author fritz.ray@eduworks.com
* @class Competency
* @module org.cassproject
* @extends CreativeWork
*/
var Competency = function() {
CreativeWork.call(this);
this.setContextAndType(Cass.context, Competency.myType);
};
Competency = stjs.extend(Competency, CreativeWork, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/cass/0.1/competency";
constructor.TYPE_0_2 = "http://schema.eduworks.com/cass/0.2/competency";
constructor.TYPE_0_3 = "http://schema.cassproject.org/0.2/Competency";
constructor.TYPE_0_4 = "http://schema.cassproject.org/0.3/Competency";
constructor.myType = Competency.TYPE_0_4;
/**
* Scope in which the competency may be applied. e.g. Underwater.
*
* @property scope
* @type string
*/
prototype.scope = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (Competency.TYPE_0_1.equals(this.type)) {
if (this.url != null && this.sameAs == null) {
this.sameAs = this.url;
this.url = null;
}
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Cass.context_0_2, Competency.TYPE_0_2);
}
if (Competency.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_3, Competency.TYPE_0_3);
}
if (Competency.TYPE_0_3.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_4, Competency.TYPE_0_4);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(Competency.TYPE_0_4);
a.push(Competency.TYPE_0_3);
a.push(Competency.TYPE_0_2);
a.push(Competency.TYPE_0_1);
return a;
};
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* When an individual's performance in a competency can be measured, a level specifies milestones that an individual can reach, creating fine-grained distinction between the proficient and the adept.
*
* @author fritz.ray@eduworks.com
* @class Level
* @module org.cassproject
* @extends CreativeWork
*/
var Level = function() {
CreativeWork.call(this);
this.setContextAndType(Cass.context, Level.myType);
};
Level = stjs.extend(Level, CreativeWork, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/cass/0.1/level";
constructor.TYPE_0_2 = "http://schema.eduworks.com/cass/0.2/level";
constructor.TYPE_0_3 = "http://schema.cassproject.org/0.2/Level";
constructor.TYPE_0_4 = "http://schema.cassproject.org/0.3/Level";
constructor.myType = Level.TYPE_0_4;
/**
* Specifies the URL of the competency this level relates to.
*
* @property competency
* @type string(URL)
*/
prototype.competency = null;
/**
* The title that one who holds this performance level may assume.
*
* @property title
* @type string
*/
prototype.title = null;
/**
* The performance characteristics required by this level in text form.
* FR - Represented by description.
*
* @property performance
* @type string
*/
prototype.performance = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (Level.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Cass.context_0_2, Level.TYPE_0_2);
}
if (Level.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_3, Level.TYPE_0_3);
}
if (Level.TYPE_0_3.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_4, Level.TYPE_0_4);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(Level.TYPE_0_4);
a.push(Level.TYPE_0_3);
a.push(Level.TYPE_0_2);
a.push(Level.TYPE_0_1);
return a;
};
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* A segment of script that defines in a domain specific language how competence is transferred from one competency to another.
*
* @author fritz.ray@eduworks.com
* @class RollupRule
* @module org.cassproject
* @extends CreativeWork
*/
var RollupRule = function() {
CreativeWork.call(this);
this.setContextAndType(Cass.context, RollupRule.myType);
};
RollupRule = stjs.extend(RollupRule, CreativeWork, [], function(constructor, prototype) {
constructor.TYPE_0_2 = "http://schema.eduworks.com/cass/0.2/rollupRule";
constructor.TYPE_0_3 = "http://schema.cassproject.org/0.2/RollupRule";
constructor.TYPE_0_4 = "http://schema.cassproject.org/0.3/RollupRule";
constructor.myType = RollupRule.TYPE_0_4;
/**
* The rollup rule encoded as source code that is understandable to the assertion processor.
*
* @property rule
* @type string
*/
prototype.rule = null;
/**
* Specifies the URL of the competency that the rollup rule pertains to.
*
* @property competency
* @type string
*/
prototype.competency = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (RollupRule.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_3, RollupRule.TYPE_0_3);
}
if (RollupRule.TYPE_0_3.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_4, RollupRule.TYPE_0_4);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(RollupRule.TYPE_0_4);
a.push(RollupRule.TYPE_0_3);
a.push(RollupRule.TYPE_0_2);
return a;
};
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* A Competency Framework or simply Framework is a collection of competencies and relations between competencies in the framework and potentially between competencies in the framework and competencies in other frameworks. In practice, a Framework represents competencies related to a specific job, task, organization, career, knowledge domain, etc.
*
* @author fritz.ray@eduworks.com
* @class Framework
* @module org.cassproject
* @extends CreativeWork
*/
var Framework = function() {
CreativeWork.call(this);
this.setContextAndType(Cass.context, Framework.myType);
};
Framework = stjs.extend(Framework, CreativeWork, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/cass/0.1/framework";
constructor.TYPE_0_2 = "http://schema.eduworks.com/cass/0.2/framework";
constructor.TYPE_0_3 = "http://schema.cassproject.org/0.2/Framework";
constructor.TYPE_0_4 = "http://schema.cassproject.org/0.3/Framework";
constructor.myType = Framework.TYPE_0_4;
/**
* URLs of competencies included in this framework.
*
* @property competency
* @type string[]
*/
prototype.competency = null;
/**
* URLs of relations included in this framework.
*
* @property relation
* @type string[]
*/
prototype.relation = null;
/**
* URLs of levels included in this framework.
*
* @property level
* @type string[]
*/
prototype.level = null;
/**
* URLs of RollupRules included in this framework.
*
* @property rollupRule
* @type string[]
*/
prototype.rollupRule = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (Framework.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Cass.context_0_2, Framework.TYPE_0_2);
}
if (Framework.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_3, Framework.TYPE_0_3);
}
if (Framework.TYPE_0_3.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_4, Framework.TYPE_0_4);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(Framework.TYPE_0_4);
a.push(Framework.TYPE_0_3);
a.push(Framework.TYPE_0_2);
a.push(Framework.TYPE_0_1);
return a;
};
}, {competency: {name: "Array", arguments: [null]}, relation: {name: "Array", arguments: [null]}, level: {name: "Array", arguments: [null]}, rollupRule: {name: "Array", arguments: [null]}, contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* A relation between two objects.
*
* @author fritz.ray@eduworks.com
* @class Relation
* @module org.cassproject
* @extends CreativeWork
*/
var Relation = function() {
CreativeWork.call(this);
this.setContextAndType(Cass.context, Relation.myType);
};
Relation = stjs.extend(Relation, CreativeWork, [], function(constructor, prototype) {
/**
* Relation type when one object enables the capability to obtain another.
* Enabling relations do not imply a requirement, but makes the acquisition of the source much easier.
*
* @property IS_ENABLED_BY
* @static
* @type string
*/
constructor.IS_ENABLED_BY = "isEnabledBy";
/**
* Relation type when one object requires another.
* Requiring relations are strict.
*
* @property REQUIRES
* @static
* @type string
*/
constructor.REQUIRES = "requires";
/**
* Relation type when one object desires another.
* Desire relations improve the range of applicability or improve performance of the source.
*
* @property DESIRES
* @static
* @type string
*/
constructor.DESIRES = "desires";
/**
* Relation type when one object is a subset of another.
* Narrows relations are strict, and represent a super/sub relation.
*
* @property NARROWS
* @static
* @type string
*/
constructor.NARROWS = "narrows";
/**
* Relation type when one object is related to another.
* Related relations provide linkages that do not necessarily carry information.
* Related relations are bidirectional.
*
* @property IS_RELATED_TO
* @static
* @type string
*/
constructor.IS_RELATED_TO = "isRelatedTo";
/**
* Relation type when one object is equivalent to another.
* Equivalent relations define two objects that are effectively equivalent.
* Equivalent relations are bidirectional.
*
* @property IS_RELATED_TO
* @static
* @type string
*/
constructor.IS_EQUIVALENT_TO = "isEquivalentTo";
constructor.TYPE_0_1 = "http://schema.eduworks.com/cass/0.1/relation";
constructor.TYPE_0_2 = "http://schema.eduworks.com/cass/0.2/relation";
constructor.TYPE_0_3 = "http://schema.cassproject.org/0.2/Relation";
constructor.TYPE_0_4 = "http://schema.cassproject.org/0.3/Relation";
constructor.myType = Relation.TYPE_0_4;
/**
* URL of the object at the beginning of the relation.
* A <relation> B, this is A.
*
* @property source
* @type string(url)
*/
prototype.source = null;
/**
* URL of the object at the end of the relation.
* A <relation> B, this is B.
*
* @property target
* @type string(url)
*/
prototype.target = null;
/**
* URL or controlled vocabulary of the relation.
* A <relation> B, this is <relation>.
*
* @property relationType
* @type string | URL
*/
prototype.relationType = null;
/**
* Date time in ISO 8601 format at which the relation may be observed.
*
* @property validFrom
* @type string
*/
prototype.validFrom = null;
/**
* Date time in ISO 8601 format at which the relation may no longer be observed.
*
* @property validThrough
* @type string
*/
prototype.validThrough = null;
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if ("isEquivalenTo" == this.relationType)
this.relationType = Relation.IS_EQUIVALENT_TO;
if (Relation.TYPE_0_1 == this.type) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Cass.context_0_2, Relation.TYPE_0_2);
}
if (Relation.TYPE_0_2 == this.getFullType()) {
this.setContextAndType(Cass.context_0_3, Relation.TYPE_0_3);
}
if (Relation.TYPE_0_3 == this.getFullType()) {
this.setContextAndType(Cass.context_0_4, Relation.TYPE_0_4);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(Relation.TYPE_0_4);
a.push(Relation.TYPE_0_3);
a.push(Relation.TYPE_0_2);
a.push(Relation.TYPE_0_1);
return a;
};
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* A claim of competence in CASS is called an Assertion. It states with some confidence that an individual has mastered a competency at a given level, provides evidence of such mastery, and records data such as the time of assertion and the party making the assertion.
*
* @author fritz.ray@eduworks.com
* @class Assertion
* @module org.cassproject
* @extends CreativeWork
*/
var Assertion = function() {
CreativeWork.call(this);
this.setContextAndType(Cass.context, Assertion.myType);
};
Assertion = stjs.extend(Assertion, CreativeWork, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/cass/0.1/assertion";
constructor.TYPE_0_2 = "http://schema.eduworks.com/cass/0.2/assertion";
constructor.TYPE_0_3 = "http://schema.cassproject.org/0.2/Assertion";
constructor.TYPE_0_4 = "http://schema.cassproject.org/0.3/Assertion";
constructor.myType = Assertion.TYPE_0_4;
/**
* URL of the competency.
*
* @property competency
* @type string(URL)
*/
prototype.competency = null;
/**
* URL of the framework within which the assertion is restricted.
*
* @property framework
* @type string(URL)
*/
prototype.framework = null;
/**
* URL of the level, or null if 'held with no performance expectations'.
*
* @property level
* @type string
*/
prototype.level = null;
/**
* Confidence with which the assertion was made.
* Confidence has many interpretations, one possibility is the probability that the individual could demonstrate the competency again.
*
* @property confidence
* @type float [0,1]
*/
prototype.confidence = null;
/**
* Public Key in PEM format of the recipient of the assertion.
*
* @property subject
* @type EcEncryptedValue<Public Key PEM>
*/
prototype.subject = null;
/**
* Public Key in PEM format of the identity making the assertion.
*
* @property agent
* @type EcEncryptedValue<Public Key PEM>
*/
prototype.agent = null;
/**
* Encrypted evidence. May be a string, URL or schema.org/Thing.
*
* @property evidence
* @type EcEncryptedValue<string | URL | Thing>[]
*/
prototype.evidence = null;
/**
* Time that the assertion was made in milliseconds since the Unix Epoch.
*
* @property assertionDate
* @type EcEncryptedValue<long>
*/
prototype.assertionDate = null;
/**
* Time that the assertion expires, specified in milliseconds since the Unix Epoch.
*
* @property expirationDate
* @type EcEncryptedValue<long>
*/
prototype.expirationDate = null;
/**
* Describes the slope of the line from the initial confidence at the assertion date and the expiration date. t is a number between [0,1] representing the percentage of time that has elapsed. Examples include t^2 and ln(t).
*
* @property decayFunction
* @type EcEncryptedValue<string>
*/
prototype.decayFunction = null;
/**
* True if the assertion is a claim that the subject cannot demonstrate the competency.
*
* @property negative
* @type EcEncryptedValue<boolean>
*/
prototype.negative = null;
prototype.getSubject = function() {
return EcPk.fromPem(this.subject);
};
/**
* Sets the subject of an assertion. Makes a few assumptions: Owners of the
* object should be able to see and change the encrypted value. Owners and
* readers of the object should be persisted.
*
* @param pk
*/
prototype.setSubject = function(pk) {
var owners = new Array();
var readers = this.reader;
if (readers == null)
readers = new Array();
if (this.subject != null) {
if (this.subject.owner != null)
owners.concat(this.subject.owner);
if (this.subject.reader != null)
readers.concat(this.subject.reader);
}
if (this.owner != null)
owners = owners.concat(this.owner);
readers.push(pk.toPem());
this.subject = pk.toPem();
};
prototype.getSubjectAsync = function(success, failure) {
success(EcPk.fromPem(this.subject));
};
prototype.getAgent = function() {
return EcPk.fromPem(this.agent);
};
prototype.setAgent = function(pk) {
this.agent = pk.toPem();
};
prototype.getAgentAsync = function(success, failure) {
success(EcPk.fromPem(this.agent));
};
prototype.getSubjectName = function() {
if (this.subject == null)
return "Nobody";
var subjectPk = this.getSubject();
var identity = EcIdentityManager.getIdentity(subjectPk);
if (identity != null && identity.displayName != null)
return identity.displayName + " (You)";
var contact = EcIdentityManager.getContact(subjectPk);
if (contact == null || contact.displayName == null)
return "Unknown Subject";
return contact.displayName;
};
prototype.getSubjectNameAsync = function(success, failure) {
if (this.subject == null) {
success("Nobody");
return;
}
this.getSubjectAsync(function(subjectPk) {
var identity = EcIdentityManager.getIdentity(subjectPk);
if (identity != null && identity.displayName != null) {
success(identity.displayName + " (You)");
return;
}
var contact = EcIdentityManager.getContact(subjectPk);
if (contact == null || contact.displayName == null) {
success("Unknown Subject");
return;
}
success(contact.displayName);
}, failure);
};
prototype.getAgentName = function() {
if (this.agent == null)
return "Nobody";
var agentPk = this.getAgent();
var identity = EcIdentityManager.getIdentity(agentPk);
if (identity != null && identity.displayName != null)
return identity.displayName + " (You)";
var contact = EcIdentityManager.getContact(agentPk);
if (contact == null || contact.displayName == null)
return "Unknown Agent";
return contact.displayName;
};
prototype.getAgentNameAsync = function(success, failure) {
if (this.subject == null) {
success("Nobody");
return;
}
this.getAgentAsync(function(subjectPk) {
var identity = EcIdentityManager.getIdentity(subjectPk);
if (identity != null && identity.displayName != null) {
success(identity.displayName + " (You)");
return;
}
var contact = EcIdentityManager.getContact(subjectPk);
if (contact == null || contact.displayName == null) {
success("Unknown Agent");
return;
}
success(contact.displayName);
}, failure);
};
prototype.getAssertionDate = function() {
return this.assertionDate;
};
prototype.setAssertionDate = function(assertionDateMs) {
this.assertionDate = assertionDateMs;
};
prototype.getAssertionDateAsync = function(success, failure) {
success(this.assertionDate);
};
prototype.getExpirationDate = function() {
return this.expirationDate;
};
prototype.setExpirationDate = function(expirationDateMs) {
this.expirationDate = expirationDateMs;
};
prototype.getExpirationDateAsync = function(success, failure) {
success(this.expirationDate);
};
prototype.getEvidenceCount = function() {
if (this.evidence == null)
return 0;
return this.evidence.length;
};
prototype.getEvidence = function(index) {
return this.evidence[index];
};
prototype.getEvidenceAsync = function(index, success, failure) {
success(this.evidence[index]);
};
prototype.getDecayFunction = function() {
return this.decayFunction;
};
prototype.setDecayFunction = function(decayFunctionText) {
this.decayFunction = decayFunctionText;
};
prototype.getDecayFunctionAsync = function(success, failure) {
success(this.decayFunction);
};
prototype.getNegative = function() {
return "true".equals(this.negative);
};
prototype.setNegative = function(negativeB) {
this.negative = negativeB;
};
prototype.getNegativeAsync = function(success, failure) {
success("true".equals(this.negative));
};
prototype.setCompetency = function(competencyUrl) {
this.competency = competencyUrl;
};
prototype.setLevel = function(levelUrl) {
this.level = levelUrl;
};
prototype.setConfidence = function(confidenceZeroToOne) {
this.confidence = confidenceZeroToOne;
};
prototype.setEvidence = function(evidences) {
this.evidence = evidences;
};
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (Assertion.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(Cass.context_0_2, Assertion.TYPE_0_2);
}
if (Assertion.TYPE_0_2.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_3, Assertion.TYPE_0_3);
}
if (Assertion.TYPE_0_3.equals(this.getFullType())) {
this.setContextAndType(Cass.context_0_4, Assertion.TYPE_0_4);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(Assertion.TYPE_0_4);
a.push(Assertion.TYPE_0_3);
a.push(Assertion.TYPE_0_2);
a.push(Assertion.TYPE_0_1);
return a;
};
}, {subject: "EcEncryptedValue", agent: "EcEncryptedValue", evidence: {name: "Array", arguments: ["EcEncryptedValue"]}, assertionDate: "EcEncryptedValue", expirationDate: "EcEncryptedValue", decayFunction: "EcEncryptedValue", negative: "EcEncryptedValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
var RemoteIdentityManagerInterface = function() {};
RemoteIdentityManagerInterface = stjs.extend(RemoteIdentityManagerInterface, null, [], function(constructor, prototype) {
prototype.configure = function(usernameSalt, usernameIterations, usernameWidth, passwordSalt, passwordIterations, passwordWidth, secretSalt, secretIterations) {};
prototype.configureFromServer = function(success, failure) {};
prototype.isGlobal = function() {};
prototype.clear = function() {};
prototype.setDefaultIdentityManagementServer = function(server) {};
prototype.startLogin = function(username, password) {};
prototype.changePassword = function(username, oldPassword, newPassword) {};
prototype.fetch = function(success, failure) {};
prototype.commit = function(success, failure) {};
prototype.create = function(success, failure) {};
}, {}, {});
/**
* A contact is an identity that we do not own. Using the public key we may: 1.
* Send them information (by encrypting data with their public key) 2. Verify a
* signed message that was sent (by using the verify function of the public key)
* 3. Distinguish between this identity and other identities through the
* displayName.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcContact
* @constructor
*/
var EcContact = function() {};
EcContact = stjs.extend(EcContact, null, [], function(constructor, prototype) {
/**
* Public Key of the contact
*
* @property pk
* @type EcPk
*/
prototype.pk = null;
/**
* Display Name of the contact
*
* @property displayName
* @type String
*/
prototype.displayName = null;
/**
* URL to the home server of the contact
*
* @property source
* @type String
*/
prototype.source = null;
/**
* Helper function to decrypt an encrypted contact (storable version of an contact)
* into an contact
*
* @param {EbacContact} contact
* Contact to decrypt.
* @param {String} secret
* AES secret used to decrypt the credential.
* @param {String} source
* Source of the credential, used to track where a contact
* came from.
* @return {EcContact}
* Decrypted identity object, ready for use.
* @memberOf EcContact
* @method fromEncryptedContact
* @static
*/
constructor.fromEncryptedContact = function(contact, secret, source) {
var i = new EcContact();
i.pk = EcPk.fromPem(EcAesCtr.decrypt(contact.pk, secret, contact.iv));
i.source = source;
if (contact.displayName != null && contact.displayNameIv != null)
i.displayName = EcAesCtr.decrypt(contact.displayName, secret, contact.iv);
return i;
};
/**
* Comparison method that checks if the key is the same as another EcContact
*
* @param {Object} obj
* Contact to compare if same key
* @return {boolean}
* true if the key is the same, false if not
* @memberOf EcContact
* @method equals
*/
prototype.equals = function(obj) {
if (stjs.isInstanceOf(obj.constructor, EcContact))
return this.pk == (obj).pk;
return Object.prototype.equals.call(this, obj);
};
/**
* Returns the URL to generic image that should be displayed for the contact
*
* @return {String}
* URL of generic image file
* @memberOf EcContact
* @method getImageUrl
*/
prototype.getImageUrl = function() {
return "https://upload.wikimedia.org/wikipedia/commons/thumb/1/12/User_icon_2.svg/48px-User_icon_2.svg.png";
};
/**
* Helper function to encrypt a contact into an encrypted contact (storable
* version of a contact)
*
* @param {String} secret
* AES secret used to encrypt the contact.
* @return {EbacContact}
* Encrypted contact object.
* @memberOf EcContact
* @method toEncryptedContact
*/
prototype.toEncryptedContact = function(secret) {
var c = new EbacContact();
c.iv = EcAes.newIv(32);
c.pk = EcAesCtr.encrypt(this.pk.toPem(), secret, c.iv);
c.displayNameIv = EcAes.newIv(16);
c.displayName = EcAesCtr.encrypt(this.displayName, secret, c.iv);
c.sourceIv = EcAes.newIv(16);
c.source = EcAesCtr.encrypt(this.source, secret, c.iv);
return c;
};
}, {pk: "EcPk"}, {});
/**
* An identity is an alias that a person or system may own. It consists of a
* private key and a display name. Using the private key we may: 1. Perform all
* operations of a EcContact. 2. Decrypt messages using our private key. 3. Sign
* messages, ensuring the recipient knows that we sent the message and it was
* not altered.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcIdentity
* @constructor
*/
var EcIdentity = function() {
this.displayName = "Alias " + EcIdentity.identityCounter++;
};
EcIdentity = stjs.extend(EcIdentity, null, [], function(constructor, prototype) {
constructor.identityCounter = 1;
/**
* Private Key of this identity
*
* @property ppk
* @type EcPpk
*/
prototype.ppk = null;
/**
* Display name of this identity
*
* @property displayName
* @type String
*/
prototype.displayName = null;
/**
* String identifying where this identity came from
*
* @property displayName
* @type String
*/
prototype.source = null;
/**
* Helper function to decrypt a credential (storable version of an identity)
* into an identity)
*
* @param {EbacCredential} credential
* Credential to decrypt.
* @param {String} secret
* AES secret used to decrypt the credential.
* @param {String} source
* Source of the credential, used to track where a credential
* came from.
* @return {EcIdentity}
* Decrypted identity object, ready for use.
* @memberOf EcIdentity
* @method fromCredential
* @static
*/
constructor.fromCredential = function(credential, secret, source) {
var i = new EcIdentity();
i.ppk = EcPpk.fromPem(EcAesCtr.decrypt(credential.ppk, secret, credential.iv));
i.source = source;
if (credential.displayName != null && credential.displayNameIv != null)
i.displayName = EcAesCtr.decrypt(credential.displayName, secret, credential.iv);
return i;
};
prototype.equals = function(obj) {
if (stjs.isInstanceOf(obj.constructor, EcIdentity))
return this.ppk.toPem().equals((obj).ppk.toPem());
return Object.prototype.equals.call(this, obj);
};
/**
* Helper function to encrypt an identity into a credential (storable
* version of an identity)
*
* @param {String} secret
* AES secret used to encrypt the credential.
* @return {EbacCredential}
* Encrypted credential object.
* @memberOf EcIdentity
* @method toCredential
*/
prototype.toCredential = function(secret) {
var c = new EbacCredential();
c.iv = EcAes.newIv(16);
c.ppk = EcAesCtr.encrypt(this.ppk.toPem(), secret, c.iv);
c.displayNameIv = EcAes.newIv(16);
c.displayName = EcAesCtr.encrypt(this.displayName, secret, c.iv);
return c;
};
/**
* Converts an identity to a contact.
*
* @return {EcContact}
* Contact object.
* @memberOf EcIdentity
* @method toContact
*/
prototype.toContact = function() {
var c = new EcContact();
c.displayName = this.displayName;
c.pk = this.ppk.toPk();
c.source = this.source;
return c;
};
}, {ppk: "EcPpk"}, {});
/**
* Manages identities and contacts, provides hooks to respond to identity and
* contact events, and builds signatures and signature sheets for authorizing
* movement of data. Also provides helper functions for identity management and
* reads the users contacts on application start with a static constructor that
* pulls them out of any temporary storage
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcIdentityManager
* @static
*/
var EcIdentityManager = function() {};
EcIdentityManager = stjs.extend(EcIdentityManager, null, [], function(constructor, prototype) {
/**
* The current user's owned identities (keys+displayName)
*
* @property ids
* @type EcIdentity[]
* @static
*/
constructor.ids = new Array();
/**
* Contacts (Keys that we do not own)
*
* @property contacts
* @type EcContact[]
* @static
*/
constructor.contacts = new Array();
/**
* Identity change hook.
*
* @property onIdentityChanged
* @type Callback1<EcIdentity>
* @static
*/
constructor.onIdentityChanged = null;
/**
* Contacts change hook.
*
* @property onContactChanged
* @type Callback1<EcIdentity>
* @static
*/
constructor.onContactChanged = null;
constructor.signatureSheetCaching = false;
constructor.signatureSheetCache = new Object();
constructor.async = true;
constructor.main = function(args) {
EcIdentityManager.readContacts();
};
/**
* Trigger for the onIdentityChanged hook
*
* @param {EcIdentity} identity Identity that has changed
* @memberOf EcIdentityManager
* @method identityChanged
* @static
*/
constructor.identityChanged = function(identity) {
if (EcIdentityManager.onIdentityChanged != null) {
EcIdentityManager.onIdentityChanged(identity);
}
};
/**
* Trigger for the onContactChanged hook
*
* @param {EcContact} contact Contact that has changed
* @memberOf EcIdentityManager
* @method contactChanged
* @static
*/
constructor.contactChanged = function(contact) {
if (EcIdentityManager.onContactChanged != null) {
EcIdentityManager.onContactChanged(contact);
}
EcIdentityManager.saveContacts();
};
/**
* Reads contact data from localstorage.
*
* @memberOf EcIdentityManager
* @method readContacts
* @static
*/
constructor.readContacts = function() {
var localStore = localStorage["contacts"];
if (localStore == null) {
return;
}
var c = JSON.parse(localStore);
for (var i = 0; i < c.length; i++) {
var contact = new EcContact();
var o = c[i];
var props = (o);
contact.displayName = props["displayName"];
contact.pk = EcPk.fromPem(props["pk"]);
contact.source = props["source"];
var cont = false;
for (var j = 0; j < EcIdentityManager.contacts.length; j++) {
if (EcIdentityManager.contacts[j].pk.toPem() == contact.pk.toPem()) {
cont = true;
}
}
if (cont) {
continue;
}
EcIdentityManager.contacts.push(contact);
}
};
/**
* Writes contact data to localstorage.
*
* @memberOf EcIdentityManager
* @method saveContacts
* @static
*/
constructor.saveContacts = function() {
var c = new Array();
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
var o = new Object();
var props = (o);
var contact = EcIdentityManager.contacts[i];
props["displayName"] = contact.displayName;
props["pk"] = contact.pk.toPem();
props["source"] = contact.source;
c.push(o);
}
localStorage["contacts"] = JSON.stringify(c);
};
/**
* Reads contact data from localstorage.
*
* @memberOf EcIdentityManager
* @method readIdentities
* @static
*/
constructor.readIdentities = function() {
var localStore = localStorage["identities"];
if (localStore == null) {
return;
}
var c = JSON.parse(localStore);
for (var i = 0; i < c.length; i++) {
var identity = new EcIdentity();
var o = c[i];
var props = (o);
identity.displayName = props["displayName"];
identity.ppk = EcPpk.fromPem(props["ppk"]);
identity.source = props["source"];
var cont = false;
for (var j = 0; j < EcIdentityManager.ids.length; j++) {
if (EcIdentityManager.ids[j].ppk.toPem() == identity.ppk.toPem()) {
cont = true;
}
}
if (cont) {
continue;
}
EcIdentityManager.ids.push(identity);
}
};
/**
* Writes contact data to localstorage.
*
* @memberOf EcIdentityManager
* @method saveIdentities
* @static
*/
constructor.saveIdentities = function() {
var c = new Array();
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
var o = new Object();
var props = (o);
var identity = EcIdentityManager.ids[i];
props["displayName"] = identity.displayName;
props["ppk"] = identity.ppk.toPem();
props["source"] = identity.source;
c.push(o);
}
localStorage["identities"] = JSON.stringify(c);
};
/**
* Clears contacts from the local storage
*
* @memberOf EcIdentityManager
* @method clearContacts
* @static
*/
constructor.clearContacts = function() {
delete localStorage["contacts"];
EcIdentityManager.contacts = new Array();
};
/**
* Clears identities from the local storage
*
* @memberOf EcIdentityManager
* @method clearIdentities
* @static
*/
constructor.clearIdentities = function() {
delete localStorage["identities"];
EcIdentityManager.ids = new Array();
};
/**
* Adds an identity to the identity manager. Checks for duplicates. Triggers
* events.
*
* @param {EcIdentity} identity Identity to add.
* @memberOf EcIdentityManager
* @method addIdentity
* @static
*/
constructor.addIdentity = function(identity) {
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (EcIdentityManager.ids[i].equals(identity)) {
return;
}
}
EcIdentityManager.ids.push(identity);
EcIdentityManager.identityChanged(identity);
};
/**
* Adds an identity to the identity manager. Checks for duplicates. Does not trigger
* events.
*
* @param {EcIdentity} identity Identity to add.
* @memberOf EcIdentityManager
* @method addIdentityQuietly
* @static
*/
constructor.addIdentityQuietly = function(identity) {
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (EcIdentityManager.ids[i].equals(identity)) {
return;
}
}
EcIdentityManager.ids.push(identity);
};
/**
* Adds a contact to the identity manager. Checks for duplicates. Triggers
* events.
*
* @param {EcContact} contact Contact to add.
* @memberOf EcIdentityManager
* @method addContact
* @static
*/
constructor.addContact = function(contact) {
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (EcIdentityManager.ids[i].ppk.toPk().toPem().equals(contact.pk.toPem())) {
EcIdentityManager.ids[i].displayName = contact.displayName;
EcIdentityManager.identityChanged(EcIdentityManager.ids[i]);
}
}
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
if (EcIdentityManager.contacts[i].pk.toPem().equals(contact.pk.toPem())) {
EcIdentityManager.contacts[i].displayName = contact.displayName;
EcIdentityManager.contactChanged(EcIdentityManager.contacts[i]);
}
}
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
if (EcIdentityManager.contacts[i].equals(contact)) {
return;
}
}
EcIdentityManager.contacts.push(contact);
EcIdentityManager.contactChanged(contact);
};
/**
* Adds a contact to the identity manager. Checks for duplicates. Does not trigger
* events.
*
* @param {EcContact} contact Contact to add.
* @memberOf EcIdentityManager
* @method addContactQuietly
* @static
*/
constructor.addContactQuietly = function(contact) {
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (EcIdentityManager.ids[i].ppk.toPk().toPem().equals(contact.pk.toPem())) {
EcIdentityManager.ids[i].displayName = contact.displayName;
}
}
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
if (EcIdentityManager.contacts[i].pk.toPem().equals(contact.pk.toPem())) {
EcIdentityManager.contacts[i].displayName = contact.displayName;
}
}
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
if (EcIdentityManager.contacts[i].equals(contact)) {
return;
}
}
EcIdentityManager.contacts.push(contact);
};
/**
* Create a signature sheet, authorizing movement of data outside of our
* control.
*
* @param {String[]} identityPksinPem Which identities to create signatures
* for.
* @param {long} duration Length of time in milliseconds to authorize
* control.
* @param {String} server Server that we are authorizing.
* @return {String} JSON Array containing signatures.
* @memberOf EcIdentityManager
* @method signatureSheetFor
* @static
*/
constructor.signatureSheetFor = function(identityPksinPem, duration, server) {
var signatures = new Array();
for (var j = 0; j < EcIdentityManager.ids.length; j++) {
var ppk = EcIdentityManager.ids[j].ppk;
var pk = ppk.toPk();
if (identityPksinPem != null) {
for (var i = 0; i < identityPksinPem.length; i++) {
var ownerPpk = EcPk.fromPem(identityPksinPem[i].trim());
if (pk.equals(ownerPpk)) {
signatures.push(EcIdentityManager.createSignature(duration, server, ppk).atIfy());
}
}
}
}
return JSON.stringify(signatures);
};
/**
* Asynchronous version of creating a signature sheet for a list of
* identities
*
* @param {String[]} identityPksinPem Which identities to create signatures
* for.
* @param {long} duration Length of time in milliseconds to authorize
* control.
* @param {String} server Server that we are authorizing.
* @param {Callback1<String>} success Callback triggered once the signature
* sheet has been created, returns the signature sheet
* @memberOf EcIdentityManager
* @method signatureSheetForAsync
* @static
*/
constructor.signatureSheetForAsync = function(identityPksinPem, duration, server, success, failure) {
var signatures = new Array();
new EcAsyncHelper().each(EcIdentityManager.ids, function(p1, incrementalSuccess) {
var ppk = p1.ppk;
var pk = ppk.toPk();
var found = false;
if (identityPksinPem != null) {
for (var j = 0; j < identityPksinPem.length; j++) {
var ownerPpk = EcPk.fromPem(identityPksinPem[j].trim());
if (pk.equals(ownerPpk)) {
found = true;
EcIdentityManager.createSignatureAsync(duration, server, ppk, function(p1) {
signatures.push(p1.atIfy());
incrementalSuccess();
}, failure);
}
}
}
if (!found) {
incrementalSuccess();
}
}, function(pks) {
success(JSON.stringify(signatures));
});
};
/**
* Create a signature sheet for all identities, authorizing movement of data
* outside of our control.
*
* @param {long} duration Length of time in milliseconds to authorize
* control.
* @param {String} server Server that we are authorizing.
* @return {String} JSON Array containing signatures.
* @memberOf EcIdentityManager
* @method signatureSheet
* @static
*/
constructor.signatureSheet = function(duration, server) {
var cache = null;
if (EcIdentityManager.signatureSheetCaching) {
cache = (EcIdentityManager.signatureSheetCache)[server];
if (cache != null) {
if (cache[0] > new Date().getTime() + duration) {
return cache[1];
}
}
duration += 20000;
}
var signatures = new Array();
for (var j = 0; j < EcIdentityManager.ids.length; j++) {
var ppk = EcIdentityManager.ids[j].ppk;
signatures.push(EcIdentityManager.createSignature(duration, server, ppk).atIfy());
}
var stringified = JSON.stringify(signatures);
if (EcIdentityManager.signatureSheetCaching) {
cache = new Array();
cache[0] = new Date().getTime() + duration;
cache[1] = stringified;
(EcIdentityManager.signatureSheetCache)[server] = cache;
}
return stringified;
};
/**
* Asynchronous version of creating a signature sheet for all identities
*
* @param {long} duration Length of time in milliseconds to authorize
* control.
* @param {String} server Server that we are authorizing.
* @param {Callback<String>} success Callback triggered once the signature
* sheet has been created, returns the signature sheet
* @memberOf EcIdentityManager
* @method signatureSheetAsync
* @static
*/
constructor.signatureSheetAsync = function(duration, server, success, failure) {
if (!EcIdentityManager.async) {
var sheet = EcIdentityManager.signatureSheet(duration, server);
if (success != null)
success(sheet);
return;
}
var signatures = new Array();
var cache = null;
if (EcIdentityManager.signatureSheetCaching) {
cache = (EcIdentityManager.signatureSheetCache)[server];
if (cache != null) {
if (cache[0] > new Date().getTime() + duration) {
success(cache[1]);
return;
}
}
duration += 20000;
}
var finalDuration = duration;
new EcAsyncHelper().each(EcIdentityManager.ids, function(p1, incrementalSuccess) {
var ppk = p1.ppk;
EcIdentityManager.createSignatureAsync(finalDuration, server, ppk, function(p1) {
signatures.push(p1.atIfy());
incrementalSuccess();
}, failure);
}, function(pks) {
var cache = null;
var stringified = JSON.stringify(signatures);
if (EcIdentityManager.signatureSheetCaching) {
cache = new Array();
cache[0] = new Date().getTime() + finalDuration;
cache[1] = stringified;
(EcIdentityManager.signatureSheetCache)[server] = cache;
}
success(stringified);
});
};
/**
* Create a signature for a specific identity, authorizing movement of data
* outside of our control.
*
* @param {long} duration Length of time in milliseconds to authorize
* control.
* @param {String} server Server that we are authorizing.
* @param {EcPpk} ppk Key of the identity to create a signature for
* @return {Ebac Signature} Signature created
* @memberOf EcIdentityManager
* @method createSignature
* @static
*/
constructor.createSignature = function(duration, server, ppk) {
var s = new EbacSignature();
s.owner = ppk.toPk().toPem();
s.expiry = new Date().getTime() + duration;
s.server = server;
s.signature = EcRsaOaep.sign(ppk, s.toJson());
return s;
};
/**
* Asynchronously create a signature for a specific identity
*
* @param {long} duration Length of time in milliseconds to authorize
* control.
* @param {String} server Server that we are authorizing.
* @param {EcPpk} ppk Key of the identity to create a signature for
* @param success Callback triggered once the signature sheet has been
* created, returns the signature
* @memberOf EcIdentityManager
* @method createSignatureAsync
* @static
*/
constructor.createSignatureAsync = function(duration, server, ppk, success, failure) {
var s = new EbacSignature();
s.owner = ppk.toPk().toPem();
s.expiry = new Date().getTime() + duration;
s.server = server;
EcRsaOaepAsync.sign(ppk, s.toJson(), function(p1) {
s.signature = p1;
success(s);
}, failure);
};
/**
* Get PPK from PK (if we have it)
*
* @param {EcPk} fromPem PK to use to look up PPK
* @return {EcPpk} PPK or null.
* @memberOf EcIdentityManager
* @method getPpk
* @static
*/
constructor.getPpk = function(fromPem) {
var pem = fromPem.toPem();
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (pem.equals(EcIdentityManager.ids[i].ppk.toPk().toPem())) {
return EcIdentityManager.ids[i].ppk;
}
}
return null;
};
/**
* Get Contact from PK (if we have it)
*
* @param {EcPk} pk PK to use to look up PPK
* @return {EcPpk} PPK or null.
* @memberOf EcIdentityManager
* @method getContact
* @static
*/
constructor.getContact = function(pk) {
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
if (pk.equals(EcIdentityManager.contacts[i].pk)) {
return EcIdentityManager.contacts[i];
}
}
return null;
};
/**
* Get Identity from PK (if we have it)
*
* @param {EcPk} pk PK to use to look up PPK
* @return {EcIdentity} identity or null.
* @memberOf EcIdentityManager
* @method getIdentity
* @static
*/
constructor.getIdentity = function(pk) {
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (pk.equals(EcIdentityManager.ids[i].ppk.toPk())) {
return EcIdentityManager.ids[i];
}
}
return null;
};
/**
* Sign a piece of data with all available keys that own that data.
*
* @param {EcRemoteLinkedData} d Data to sign.
* @memberOf EcIdentityManager
* @method sign
* @static
*/
constructor.sign = function(d) {
if (d.signature != null) {
for (var i = 0; i < d.signature.length; ) {
var works = false;
var signature = d.signature[i];
if (d.owner != null) {
for (var j = 0; j < d.owner.length; j++) {
var owner = d.owner[j];
var pk = EcPk.fromPem(owner);
try {
if (EcRsaOaep.verify(pk, d.toSignableJson(), signature)) {
works = true;
break;
}
}catch (ex) {}
}
}
if (!works) {
d.signature.splice(i, 1);
} else {
i++;
}
}
}
if (d.owner != null) {
for (var i = 0; i < d.owner.length; i++) {
var attempt = EcIdentityManager.getPpk(EcPk.fromPem(d.owner[i]));
if (attempt != null) {
d.signWith(attempt);
}
}
}
if (d.signature != null && d.signature.length == 0) {
delete (d)["signature"];
}
};
constructor.myIdentitiesSearchString = function() {
var searchString = "";
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (i > 0) {
searchString += " OR ";
}
searchString += "@reader:\"" + EcIdentityManager.ids[i].ppk.toPk().toPem() + "\"";
searchString += " OR ";
searchString += "@owner:\"" + EcIdentityManager.ids[i].ppk.toPk().toPem() + "\"";
}
return searchString;
};
constructor.getMyPks = function() {
var pks = new Array();
if (EcIdentityManager.ids == null)
return pks;
for (var i = 0; i < EcIdentityManager.ids.length; i++)
pks.push(EcIdentityManager.ids[i].ppk.toPk());
return pks;
};
}, {ids: {name: "Array", arguments: ["EcIdentity"]}, contacts: {name: "Array", arguments: ["EcContact"]}, onIdentityChanged: {name: "Callback1", arguments: ["EcIdentity"]}, onContactChanged: {name: "Callback1", arguments: ["EcContact"]}, signatureSheetCache: "Object"}, {});
if (!stjs.mainCallDisabled)
EcIdentityManager.main();
/**
* Created by fray on 5/9/17.
*/
var OAuth2FileBasedRemoteIdentityManager = /**
* Reads the remote OAuth2 endpoint file.
*
* @param {Callback0} Method to call when initialization is complete.
* @memberOf OAuth2FileBasedRemoteIdentityManager
* @constructor
*/
function(initialized) {
var me = this;
EcRemote.getExpectingObject("", "hello.json", function(o) {
try {
me.configuration = JSON.parse(JSON.stringify(o));
hello.init(o);
me.constructor.oauthEnabled = true;
initialized();
}catch (ex) {
me.constructor.oauthEnabled = false;
}
}, function(s) {
me.constructor.oauthEnabled = false;
});
};
OAuth2FileBasedRemoteIdentityManager = stjs.extend(OAuth2FileBasedRemoteIdentityManager, null, [RemoteIdentityManagerInterface], function(constructor, prototype) {
constructor.oauthEnabled = false;
prototype.server = null;
prototype.configuration = null;
prototype.oauthLoginResponse = null;
prototype.network = null;
prototype.global = null;
/**
* Returns true if the identity manager is global. Returns false if the identity manager is local to the server.
*
* @return {Boolean} true if the identity manager is global.
* @memberOf OAuth2FileBasedRemoteIdentityManager
* @method isGlobal
*/
prototype.isGlobal = function() {
if (this.global == null)
return true;
return this.global;
};
prototype.configure = function(usernameSalt, usernameIterations, usernameWidth, passwordSalt, passwordIterations, passwordWidth, secretSalt, secretIterations) {};
prototype.configureFromServer = function(success, failure) {
success(null);
};
/**
* Wipes login data and logs you out.
*
* @memberOf OAuth2FileBasedRemoteIdentityManager
* @method clear
*/
prototype.clear = function() {
OAuth2FileBasedRemoteIdentityManager.oauthEnabled = false;
if (this.server != null)
hello.logout(this.server, null);
};
/**
* Configure compatible remote identity management server.
*
* @param {String} server
* Name of the remote identity management server.
* @memberOf OAuth2FileBasedRemoteIdentityManager
* @method setDefaultIdentityManagementServer
*/
prototype.setDefaultIdentityManagementServer = function(server) {
this.server = server;
};
prototype.startLogin = function(username, password) {};
prototype.changePassword = function(username, oldPassword, newPassword) {
return false;
};
/**
* Fetch credentials from server, invoking events based on login success or
* failure.
* <p>
* Automatically populates EcIdentityManager.
* <p>
* Does not require startLogin().
*
* @param {Callback1<Object>} success
* @param {Callback1<String>} failure
* @memberOf OAuth2FileBasedRemoteIdentityManager
* @method fetch
*/
prototype.fetch = function(success, failure) {
var o = new Object();
(o)["scope"] = (this.configuration)[this.server + "Scope"];
(o)["display"] = "page";
var me = this;
hello.on("auth.login", function(o) {
me.oauthLoginResponse = o;
me.network = (me.oauthLoginResponse)["network"];
hello.api(me.network + "/me/folders", "get", new Object()).then(function(folderResponse) {
var folders = (folderResponse)["data"];
var foundIdentities = false;
var foundContacts = false;
for (var i = 0; i < folders.length; i++) {
var d = folders[i];
var name = (d)["name"];
var id = (d)["id"];
if (name == "CASS Identities") {
foundIdentities = true;
me.hookIdentityManagerIdentities(id);
me.readIdentityFiles(id, success, failure);
}
if (name == "CASS Contacts") {
foundContacts = true;
me.hookIdentityManagerContacts(id);
me.readContactFiles(id, success, failure);
}
}
if (!foundIdentities) {
me.createIdentityFolder(success);
}
if (!foundContacts) {
me.createContactFolder();
}
}).fail(failure);
});
hello.login(this.server, o).fail(failure);
};
prototype.createContactFolder = function() {
var me = this;
var o = new Object();
(o)["name"] = "CASS Contacts";
hello.api(me.network + "/me/folders", "post", o).then(function(r) {
me.hookIdentityManagerContacts((r)["id"]);
});
};
prototype.createIdentityFolder = function(success) {
var me = this;
var o = new Object();
(o)["name"] = "CASS Identities";
hello.api(me.network + "/me/folders", "post", o).then(function(r) {
me.hookIdentityManagerIdentities((r)["id"]);
success(r);
});
};
prototype.writeIdentityFiles = function(folderId, success) {
var me = this;
var helper = new EcAsyncHelper();
helper.each(EcIdentityManager.ids, function(identity, callback0) {
me.writeIdentityFile(folderId, identity, callback0);
}, function(strings) {
success(strings);
});
};
prototype.writeIdentityFile = function(folderId, identity, finished) {
var file = stringToFile(identity.ppk.toPem(), identity.displayName + ".pem", "text/plain");
var o = new Object();
(o)["id"] = (identity)["id"];
if ((o)["id"] == undefined)
(o)["parent"] = folderId;
(o)["name"] = file.name;
var files = new Array();
files.push(file);
(o)["file"] = files;
hello.api(this.network + "/me/files", (identity)["id"] == undefined ? "post" : "put", o).then(function(r) {
(identity)["id"] = (r)["id"];
if (finished != null)
finished();
});
};
prototype.writeContactFiles = function(folderId) {
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
this.writeContactFile(folderId, EcIdentityManager.contacts[i]);
}
};
prototype.writeContactFile = function(folderId, contact) {
var file = stringToFile(contact.pk.toPem(), contact.displayName + ".pem", "text/plain");
var o = new Object();
(o)["id"] = (contact)["id"];
if ((o)["id"] == undefined)
(o)["parent"] = folderId;
(o)["name"] = file.name;
var files = new Array();
files.push(file);
(o)["file"] = files;
hello.api(this.network + "/me/files", (contact)["id"] == undefined ? "post" : "put", o).then(function(r) {
(contact)["id"] = (r)["id"];
});
};
prototype.readIdentityFiles = function(folderId, success, failure) {
var me = this;
var o = new Object();
(o)["parent"] = folderId;
hello.api(this.network + "/me/files", "get", o).then(function(folderResponse) {
var files = (folderResponse)["data"];
var h = new EcAsyncHelper();
h.each(files, function(d, callback0) {
var name = ((d)["name"]).replace("\\.pem", "");
var id = (d)["id"];
var directLink = (d)["downloadUrl"];
EcRemote.getExpectingString("", directLink + "&access_token=" + (hello.getAuthResponse(me.network))["access_token"], function(s) {
var identity = new EcIdentity();
identity.displayName = name.replace(".pem", "");
identity.ppk = EcPpk.fromPem(s);
identity.source = "google";
(identity)["id"] = id;
EcIdentityManager.addIdentityQuietly(identity);
callback0();
}, failure);
}, function(strings) {
success(null);
});
});
};
prototype.readContactFiles = function(folderId, success, failure) {
var me = this;
var o = new Object();
(o)["parent"] = folderId;
hello.api(this.network + "/me/files", "get", o).then(function(folderResponse) {
var files = (folderResponse)["data"];
var h = new EcAsyncHelper();
h.each(files, function(d, callback0) {
var name = ((d)["name"]).replace("\\.pem", "");
var id = (d)["id"];
var directLink = (d)["downloadUrl"];
EcRemote.getExpectingString("", directLink + "&access_token=" + (hello.getAuthResponse(me.network))["access_token"], function(s) {
var contact = new EcContact();
contact.displayName = name.replace(".pem", "");
contact.pk = EcPk.fromPem(s);
contact.source = "google";
(contact)["id"] = id;
EcIdentityManager.addContactQuietly(contact);
callback0();
}, failure);
}, function(strings) {
success(null);
});
});
};
prototype.hookIdentityManagerIdentities = function(folderId) {
var me = this;
EcIdentityManager.onIdentityChanged = function(identity) {
me.writeIdentityFile(folderId, identity, null);
};
};
prototype.hookIdentityManagerContacts = function(folderId) {
var me = this;
EcIdentityManager.onContactChanged = function(contact) {
me.writeContactFile(folderId, contact);
};
};
/**
* Commits credentials in EcIdentityManager to remote server.
*
* @param {Callback1<String>} success
* @param {Callback1<String>} failure
* @memberOf OAuth2FileBasedRemoteIdentityManager
* @method commit
*/
prototype.commit = function(success, failure) {
var me = this;
var apio = new Object();
(apio)["network"] = this.network;
if (hello.getAuthResponse(this.server))
hello.api(me.network + "/me/folders", "get", apio).then(function(folderResponse) {
var folders = (folderResponse)["data"];
for (var i = 0; i < folders.length; i++) {
var d = folders[i];
var name = (d)["name"];
var id = (d)["id"];
if (name == "CASS Identities") {
me.writeIdentityFiles(id, success);
}
if (name == "CASS Contacts") {
me.writeContactFiles(id);
}
}
}).fail(failure);
else
failure("Please login again.");
};
prototype.create = function(success, failure) {
var o = new Object();
(o)["scope"] = (this.configuration)[this.server + "Scope"];
var me = this;
hello.on("auth.login", function(o) {
me.oauthLoginResponse = o;
me.network = (me.oauthLoginResponse)["network"];
hello.api(me.network + "/me/folders", "get", new Object()).then(function(folderResponse) {
var folders = (folderResponse)["data"];
var foundIdentities = false;
var foundContacts = false;
for (var i = 0; i < folders.length; i++) {
var d = folders[i];
var name = (d)["name"];
var id = (d)["id"];
if (name == "CASS Identities") {
foundIdentities = true;
me.hookIdentityManagerIdentities(id);
me.readIdentityFiles(id, success, failure);
}
if (name == "CASS Contacts") {
foundContacts = true;
me.hookIdentityManagerContacts(id);
me.readContactFiles(id, success, failure);
}
}
if (!foundIdentities) {
me.createIdentityFolder(success);
}
if (!foundContacts) {
me.createContactFolder();
}
}).fail(failure);
});
hello.login(this.server, o).fail(failure);
};
}, {configuration: "Object", oauthLoginResponse: "Object"}, {});
/**
* Contact Grant that is used to share your public key with another user
*
* @author fritz.ray@eduworks.com
* @author devlin.junker@eduworks.com
* @module com.eduworks.ec
* @class EcContact
* @extends EbacContactGrant
* @constructor
*/
var EcContactGrant = function() {
EbacContactGrant.call(this);
};
EcContactGrant = stjs.extend(EcContactGrant, EbacContactGrant, [], function(constructor, prototype) {
/**
* Verifies that the contact grant is valid
*
* @return {boolean}
* true if valid, false if not
*/
prototype.valid = function() {
if (!this.verify())
return false;
if (this.invalid())
return false;
var found = false;
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (EcRsaOaep.verify(EcIdentityManager.ids[i].ppk.toPk(), this.responseToken, this.responseSignature))
found = true;
}
return found;
};
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Logs into and stores/retrieves credentials from a compatible remote server.
* Performs anonymization of the user.
* <p>
* Requires initialization with server specific salts. Server specific salts
* prevent co-occurrence attacks, should credentials on one server be
* compromised (intercepted in transit).
* <p>
* Transmits hashed username, hashed password, and encrypts credentials using
* the hashed combination of the username and password. This prevents the system
* storing the credentials from having any knowledge of the user.
* <p>
* Password recovery is done by, when the password changes, creating a
* cryptographic pad (or perfect cipher) where one half is stored on the server,
* and the other half is stored with the user. Should the user lose this pad and
* forget their password, they are not able to recover or reset their password,
* and their data should be considered lost.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcRemoteIdentityManager
*/
var EcRemoteIdentityManager = function() {};
EcRemoteIdentityManager = stjs.extend(EcRemoteIdentityManager, null, [RemoteIdentityManagerInterface], function(constructor, prototype) {
prototype.server = null;
prototype.global = null;
prototype.usernameWithSalt = null;
prototype.passwordWithSalt = null;
prototype.secretWithSalt = null;
prototype.pad = null;
prototype.token = null;
prototype.usernameSalt = null;
prototype.usernameIterations = 0;
prototype.usernameWidth = 0;
prototype.passwordSalt = null;
prototype.passwordIterations = 0;
prototype.passwordWidth = 0;
prototype.secretSalt = null;
prototype.secretIterations = 0;
prototype.configured = false;
/**
* Returns true if the identity manager is global. Returns false if the identity manager is local to the server.
*
* @return {Boolean} true if the identity manager is global.
* @memberOf EcRemoteIdentityManager
*/
prototype.isGlobal = function() {
if (this.global == null)
return false;
return this.global;
};
/**
* Configure parameters of the remote login storage.
*
* @param {String} usernameSalt
* Salt used in hashing the username.
* @param {int} usernameIterations
* Number of times to hash the username.
* @param {int} usernameWidth
* Resultant width of username in bytes.
* @param {String} passwordSalt
* Salt used to hash password.
* @param {int} passwordIterations
* Number of times to hash password.
* @param {int} passwordWidth
* Resultant width of password in bytes.
* @param {String} secretSalt
* Salt used to hash secret (composed of username + password)
* @param {int} secretIterations
* Number of times to hash secret.
* @memberOf EcRemoteIdentityManager
* @method configure
*/
prototype.configure = function(usernameSalt, usernameIterations, usernameWidth, passwordSalt, passwordIterations, passwordWidth, secretSalt, secretIterations) {
this.usernameSalt = usernameSalt;
this.usernameIterations = usernameIterations;
this.usernameWidth = usernameWidth;
this.passwordSalt = passwordSalt;
this.passwordIterations = passwordIterations;
this.passwordWidth = passwordWidth;
this.secretSalt = secretSalt;
this.secretIterations = secretIterations;
this.configured = true;
};
/**
* Configures parameters of the remote server by accessing configuration details via webservice
*
* @param {Callback1<Object>} success
* Callback triggered after successfully configured
* @param {Callback1<String>} failure
* Callback triggered if an error during failure
* @memberOf EcRemoteIdentityManager
* @method configureFromServer
*/
prototype.configureFromServer = function(success, failure) {
var me = this;
EcRemote.getExpectingObject(this.server, "sky/id/salts", function(p1) {
me.usernameSalt = (p1)["usernameSalt"];
if (me.usernameSalt.length < 16) {
failure("Insufficient length on Username Salt");
return;
}
me.usernameIterations = stjs.trunc((p1)["usernameIterations"]);
if (me.usernameIterations < 1000) {
failure("Insufficient iterations on Username Hash");
return;
}
me.usernameWidth = stjs.trunc((p1)["usernameLength"]);
if (me.usernameWidth != 64) {
failure("Username Hash required to be length 64.");
return;
}
me.passwordSalt = (p1)["passwordSalt"];
if (me.passwordSalt.length < 16) {
failure("Insufficient length on Password Salt");
return;
}
me.passwordIterations = stjs.trunc((p1)["passwordIterations"]);
if (me.passwordIterations < 1000) {
failure("Insufficient iterations on Password Hash");
return;
}
me.passwordWidth = stjs.trunc((p1)["passwordLength"]);
if (me.passwordWidth != 64) {
failure("Password Hash required to be length 64.");
return;
}
me.secretSalt = (p1)["secretSalt"];
if (me.secretSalt.length < 16) {
failure("Insufficient length on Secret Salt");
return;
}
me.secretIterations = stjs.trunc((p1)["secretIterations"]);
if (me.secretIterations < 1000) {
failure("Insufficient iterations on Secret Hash");
return;
}
me.configured = true;
if (success != null)
success(p1);
}, function(p1) {
me.configured = false;
if (failure != null)
failure(p1);
else
console.error(p1);
});
};
/**
* Wipes login data.
*
* @memberOf EcRemoteIdentityManager
* @method clear
*/
prototype.clear = function() {
this.usernameWithSalt = null;
this.passwordWithSalt = null;
this.secretWithSalt = null;
this.pad = null;
this.token = null;
};
/**
* Configure compatible remote identity management server.
*
* @param {String} server
* URL to remote identity management server.
* @memberOf EcRemoteIdentityManager
* @method setDefaultIdentityManagementServer
*/
prototype.setDefaultIdentityManagementServer = function(server) {
this.server = server;
};
/**
* "Log Into" system, generating credentials. Does not actually remotely
* access any machine.
* <p>
* Please clear username and password fields after this function is called.
*
* @param {String} username
* Username to login with
* @param {String} password
* Password to authenticate username with
* @memberOf EcRemoteIdentityManager
* @method startLogin
*/
prototype.startLogin = function(username, password) {
if (!this.configured) {
alert("Remote Identity not configured.");
return;
}
this.usernameWithSalt = forge.util.encode64(forge.pkcs5.pbkdf2(username, this.usernameSalt, this.usernameIterations, this.usernameWidth));
this.passwordWithSalt = forge.util.encode64(forge.pkcs5.pbkdf2(password, this.passwordSalt, this.passwordIterations, this.passwordWidth));
var arys = new Array();
arys.push(username, password);
var secret = this.splicePasswords(arys);
this.secretWithSalt = forge.util.encode64(forge.pkcs5.pbkdf2(secret, this.secretSalt, this.secretIterations, 32));
};
/**
* Change password of user in memory. Does not automatically commit new credentials.
* <p>
* Please clear username and password fields after this function is called.
*
* @param {String} username
* Username
* @param {String} oldPassword
* Current password
* @param {String} newPassword
* Desired password
* @return {boolean}
* Valid password change request.
* @memberOf EcRemoteIdentityManager
* @method changePassword
*/
prototype.changePassword = function(username, oldPassword, newPassword) {
var usernameHash = forge.util.encode64(forge.pkcs5.pbkdf2(username, this.usernameSalt, this.usernameIterations, this.usernameWidth));
if (this.usernameWithSalt != usernameHash) {
alert("Username does not match. Aborting password change.");
return false;
}
var oldPasswordHash = forge.util.encode64(forge.pkcs5.pbkdf2(oldPassword, this.passwordSalt, this.passwordIterations, this.passwordWidth));
if (this.passwordWithSalt != oldPasswordHash) {
alert("Old password does not match. Aborting password change.");
return false;
}
this.passwordWithSalt = forge.util.encode64(forge.pkcs5.pbkdf2(newPassword, this.passwordSalt, this.passwordIterations, this.passwordWidth));
var arys = new Array();
arys.push(username, newPassword);
var secret = this.splicePasswords(arys);
this.secretWithSalt = forge.util.encode64(forge.pkcs5.pbkdf2(secret, this.secretSalt, this.secretIterations, 32));
return true;
};
/**
* Fetch credentials from server, invoking events based on login success or
* failure.
* <p>
* Automatically populates EcIdentityManager.
* <p>
* Requires login().
*
* @param {Callback1<Object>} success
* @param {Callback1<String>} failure
* @memberOf EcRemoteIdentityManager
* @method fetch
*/
prototype.fetch = function(success, failure) {
if (!this.configured) {
failure("Remote Identity not configured.");
return;
}
if (this.usernameWithSalt == null || this.passwordWithSalt == null || this.secretWithSalt == null) {
failure("Please log in before performing this operation.");
return;
}
var r = new EbacCredentialRequest();
r.username = this.usernameWithSalt;
r.password = this.passwordWithSalt;
var fd = new FormData();
fd.append("credentialRequest", r.toJson());
var me = this;
EcRemote.postExpectingObject(this.server, "sky/id/login", fd, function(arg0) {
var cs = arg0;
me.pad = cs.pad;
me.token = cs.token;
if (cs.credentials != null)
for (var i = 0; i < cs.credentials.length; i++) {
var c = cs.credentials[i];
var identity = EcIdentity.fromCredential(c, me.secretWithSalt, me.server);
EcIdentityManager.addIdentity(identity);
}
if (cs.contacts != null)
for (var i = 0; i < cs.contacts.length; i++) {
var c = cs.contacts[i];
var identity = EcContact.fromEncryptedContact(c, me.secretWithSalt, me.server);
EcIdentityManager.addContact(identity);
}
success(arg0);
}, function(arg0) {
failure(arg0);
});
};
/**
* Commits credentials in EcIdentityManager to remote server.
* <p>
* Will trigger pad generation and fail if the pad has not been specified.
*
* @param {Callback1<String>} success
* @param {Callback1<String>} failure
* @memberOf EcRemoteIdentityManager
* @method commit
*/
prototype.commit = function(success, failure) {
var service = "sky/id/commit";
this.sendCredentials(success, failure, service);
};
/**
* Creates an account.
* <p>
* Please note that the remote login server does not throw error messages if
* an account creation is blocked due to being a duplicate. This prevents
* login probing. This will always succeed (if the request is properly
* formed and makes it to the server).
* <p>
* Will trigger pad generation and fail if the pad has not been specified.
*
* @param {Callback1<String>} success
* Callback triggered after successfully creating an account
* @param {Callback1<String>} failure
* Callback triggered if error creating an account
* @memberOf EcRemoteIdentityManager
* @method create
*/
prototype.create = function(success, failure) {
var service = "sky/id/create";
this.sendCredentials(success, failure, service);
};
/**
* Sends the identity managers credentials to the service specified
*
* @param {Callback1<String>} success
* Callback triggered if credentials sent successfully
* @param {Callback1<String>} failure
* Callback triggered if error sending credentials
* @param service Service to send credentials to on server
* @memberOf EcRemoteIdentityManager
* @method sendCredentials
*/
prototype.sendCredentials = function(success, failure, service) {
if (!this.configured)
alert("Remote Identity not configured.");
if (this.usernameWithSalt == null || this.passwordWithSalt == null || this.secretWithSalt == null) {
alert("Please log in before performing this operation.");
return;
}
var credentials = new Array();
var contacts = new Array();
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
var id = EcIdentityManager.ids[i];
if (id.source != null && id.source != this.server)
continue;
id.source = this.server;
credentials.push(id.toCredential(this.secretWithSalt));
}
for (var i = 0; i < EcIdentityManager.contacts.length; i++) {
var id = EcIdentityManager.contacts[i];
if (id.source != null && id.source != this.server)
continue;
id.source = this.server;
contacts.push(id.toEncryptedContact(this.secretWithSalt));
}
var commit = new EbacCredentialCommit();
commit.username = this.usernameWithSalt;
commit.password = this.passwordWithSalt;
commit.token = this.token;
commit.credentials.pad = this.pad;
commit.credentials.credentials = credentials;
commit.credentials.contacts = contacts;
var fd = new FormData();
fd.append("credentialCommit", commit.toJson());
var me = this;
EcIdentityManager.signatureSheetAsync(60000, this.server, function(p1) {
fd.append("signatureSheet", p1);
EcRemote.postExpectingString(me.server, service, fd, function(arg0) {
success(arg0);
}, function(arg0) {
failure(arg0);
});
}, failure);
};
/**
* Splices together passwords (in a fashion more like shuffling a deck of
* cards, not appending).
*
* @param {String[]} passwords
* Passwords to splice.
* @return {String}
* Spliced password.
* @memberOf EcRemoteIdentityManager
* @method splicePasswords
*/
prototype.splicePasswords = function(passwords) {
var passwordSplice = "";
for (var charIndex = 0; charIndex > 0; charIndex++) {
var foundAny = false;
for (var passwordIndex = 0; passwordIndex < passwords.length; passwordIndex++) {
if (charIndex >= passwords[passwordIndex].length)
continue;
passwordSplice += passwords[passwordIndex].charAt(charIndex);
foundAny = true;
}
if (!foundAny)
break;
}
return passwordSplice;
};
}, {}, {});
/**
* Represents an encrypted piece of data. Provides helper functions for
* encryption/decryption of JSON-LD objects, and provides some searchability of
* the data within.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcEncryptedValue
* @extends EbacEncryptedValue
*/
var EcEncryptedValue = function() {
EbacEncryptedValue.call(this);
};
EcEncryptedValue = stjs.extend(EcEncryptedValue, EbacEncryptedValue, [], function(constructor, prototype) {
constructor.encryptOnSaveMap = null;
constructor.revive = function(partiallyRehydratedObject) {
var v = new EcEncryptedValue();
v.copyFrom(partiallyRehydratedObject);
return v;
};
/**
* Converts a piece of remote linked data to an encrypted value
*
* @param {EcRemoteLinkedData} d Data to encrypt
* @param {Boolean} hideType Flag to hide the type of the encrypted value
* when encrypting
* @return {EcEncryptedValue} Encrypted value
* @memberOf EcEncryptedValue
* @method toEncryptedValue
* @static
*/
constructor.toEncryptedValue = function(d, hideType) {
d.updateTimestamp();
var v = new EcEncryptedValue();
if (hideType == null || !hideType) {
v.encryptedType = d.type;
}
var newIv = EcAes.newIv(16);
var newSecret = EcAes.newIv(16);
v.payload = EcAesCtr.encrypt(d.toJson(), newSecret, newIv);
v.owner = d.owner;
v.reader = d.reader;
v.id = d.id;
if ((d)["name"] != null) {
v.name = (d)["name"];
}
if (d.owner != null) {
for (var i = 0; i < d.owner.length; i++) {
var eSecret = new EbacEncryptedSecret();
eSecret.iv = newIv;
eSecret.secret = newSecret;
if (v.secret == null) {
v.secret = new Array();
}
v.secret.push(EcRsaOaep.encrypt(EcPk.fromPem(d.owner[i]), eSecret.toEncryptableJson()));
}
}
if (d.reader != null) {
for (var i = 0; i < d.reader.length; i++) {
var eSecret = new EbacEncryptedSecret();
eSecret.iv = newIv;
eSecret.secret = newSecret;
if (v.secret == null) {
v.secret = new Array();
}
v.secret.push(EcRsaOaep.encrypt(EcPk.fromPem(d.reader[i]), eSecret.toEncryptableJson()));
}
}
return v;
};
/**
* Converts a piece of remote linked data to an encrypted value,
* asynchronously
*
* @param {EcRemoteLinkedData} d Data to encrypt
* @param {boolean} hideType Flag to hide the type of the encrypted value
* when encrypting
* @param {Callback1<EcEncryptedValue>} success Callback triggered with
* successfully encrypted, returns the encrypted value
* @param {Callback1<String>} failure Callback triggered on error during
* encryption
* @memberOf EcEncryptedValue
* @method toEncryptedValueAsync
* @static
*/
constructor.toEncryptedValueAsync = function(d, hideType, success, failure) {
d.updateTimestamp();
var v = new EcEncryptedValue();
if (hideType == null || !hideType) {
v.encryptedType = d.type;
}
var newIv = EcAes.newIv(16);
var newSecret = EcAes.newIv(16);
EcAesCtrAsync.encrypt(d.toJson(), newSecret, newIv, function(encryptedText) {
v.payload = encryptedText;
v.owner = d.owner;
v.reader = d.reader;
v.id = d.id;
if ((d)["name"] != null) {
v.name = (d)["name"];
}
if (d.owner != null) {
new EcAsyncHelper().each(d.owner, function(pk, arg1) {
var eSecret = new EbacEncryptedSecret();
eSecret.iv = newIv;
eSecret.secret = newSecret;
if (v.secret == null) {
v.secret = new Array();
}
EcRsaOaepAsync.encrypt(EcPk.fromPem(pk), eSecret.toEncryptableJson(), function(encryptedSecret) {
v.secret.push(encryptedSecret);
arg1();
}, failure);
}, function(arg0) {
if (d.reader != null) {
new EcAsyncHelper().each(d.reader, function(pk, arg1) {
var eSecret = new EbacEncryptedSecret();
eSecret.iv = newIv;
eSecret.secret = newSecret;
if (v.secret == null) {
v.secret = new Array();
}
EcRsaOaepAsync.encrypt(EcPk.fromPem(pk), eSecret.toEncryptableJson(), function(encryptedSecret) {
v.secret.push(encryptedSecret);
arg1();
}, failure);
}, function(arg0) {
success(v);
});
}
});
}
}, failure);
};
/**
* Encrypts a text value with the key provided
*
* @param {String} text Text to encrypt
* @param {String} id ID of the encrypted value
* @param {EcPk} owner Key to Encrypt
* @return {EcEncryptedValue} Encrypted value
* @memberOf EcEncryptedValue
* @method encryptValueOld
* @static
* @deprecated
*/
constructor.encryptValueOld = function(text, id, owner) {
var v = new EcEncryptedValue();
var newIv = EcAes.newIv(16);
var newSecret = EcAes.newIv(16);
v.payload = EcAesCtr.encrypt(text, newSecret, newIv);
v.addOwner(owner);
for (var i = 0; i < v.owner.length; i++) {
var eSecret = new EbacEncryptedSecret();
eSecret.id = forge.util.encode64(forge.pkcs5.pbkdf2(id, "", 1, 8));
eSecret.iv = newIv;
eSecret.secret = newSecret;
if (v.secret == null) {
v.secret = new Array();
}
v.secret.push(EcRsaOaep.encrypt(EcPk.fromPem(v.owner[i]), eSecret.toEncryptableJson()));
}
return v;
};
/**
* Encrypts a text value with the owners and readers provided
*
* @param {String} text Text to encrypt
* @param {String} id ID of the value to encrypt
* @param {String[]} owners Owner keys to encrypt value with
* @param {String[]} readers Reader keys to encrypt value with
* @return {EcEncryptedValue} Encrypted value
* @memberOf EcEncryptedValue
* @method encryptValue
* @static
*/
constructor.encryptValue = function(text, id, owners, readers) {
var v = new EcEncryptedValue();
var newIv = EcAes.newIv(16);
var newSecret = EcAes.newIv(16);
v.payload = EcAesCtr.encrypt(text, newSecret, newIv);
if (owners != null) {
for (var i = 0; i < owners.length; i++) {
v.addOwner(EcPk.fromPem(owners[i]));
}
}
if (owners != null)
if (v.owner != null) {
for (var i = 0; i < v.owner.length; i++) {
var eSecret = new EbacEncryptedSecret();
eSecret.id = forge.util.encode64(forge.pkcs5.pbkdf2(id, "", 1, 8));
eSecret.iv = newIv;
eSecret.secret = newSecret;
if (v.secret == null) {
v.secret = new Array();
}
v.secret.push(EcRsaOaep.encrypt(EcPk.fromPem(v.owner[i]), eSecret.toEncryptableJson()));
}
}
if (readers != null)
if (v.reader != null) {
for (var i = 0; i < v.reader.length; i++) {
var eSecret = new EbacEncryptedSecret();
eSecret.id = forge.util.encode64(forge.pkcs5.pbkdf2(id, "", 1, 8));
eSecret.iv = newIv;
eSecret.secret = newSecret;
if (v.secret == null) {
v.secret = new Array();
}
v.secret.push(EcRsaOaep.encrypt(EcPk.fromPem(v.reader[i]), eSecret.toEncryptableJson()));
}
}
if (readers != null) {
for (var i = 0; i < readers.length; i++) {
v.addReader(EcPk.fromPem(readers[i]));
}
}
return v;
};
/**
* Encrypt a value with a specific IV and secret
*
* @param {String} iv Initialization Vector for encryption
* @param {String} secret Encryption secret
* @param {String} text Text to encrypt
* @param {String} id ID of value to encrypt
* @param {String[]} owners Owners keys to encrypt with
* @param {String[]} readers Reader Keys to encrypt with
* @return {EcEncryptedValue}
* @memberOf EcEncryptedValue
* @method encryptValueUsingIvAndSecret
* @static
*/
constructor.encryptValueUsingIvAndSecret = function(iv, secret, text, id, owners, readers) {
var v = new EcEncryptedValue();
v.payload = EcAesCtr.encrypt(text, secret, iv);
if (owners != null) {
for (var i = 0; i < owners.length; i++) {
v.addOwner(EcPk.fromPem(owners[i]));
}
}
if (owners != null) {
for (var i = 0; i < v.owner.length; i++) {
var eSecret = new EbacEncryptedSecret();
eSecret.id = forge.util.encode64(forge.pkcs5.pbkdf2(id, "", 1, 8));
eSecret.iv = iv;
eSecret.secret = secret;
if (v.secret == null) {
v.secret = new Array();
}
v.secret.push(EcRsaOaep.encrypt(EcPk.fromPem(v.owner[i]), eSecret.toEncryptableJson()));
}
}
if (readers != null) {
for (var i = 0; i < readers.length; i++) {
v.addReader(EcPk.fromPem(readers[i]));
}
}
return v;
};
/**
* Setter and getter function for encryptOnSave of an identifier,
* encryptOnSave is used by the static save functions of a class to
* determine whether or not to encrypt something when it is saved. This
* value is usually set when an object is decrypted using one of the decrypt
* functions above.
*
* @param {String} id ID of the data to get/set encryptOnSave for
* @param {boolean} [val] If passed in, sets the value, if null this
* function gets the encryptOnSave value
* @return {boolean} if val is null/ignored returns value in the map, if val
* is passed in returns val
* @memberOf EcEncryptedValue
* @method encryptOnSave
* @static
*/
constructor.encryptOnSave = function(id, val) {
if (EcEncryptedValue.encryptOnSaveMap == null) {
EcEncryptedValue.encryptOnSaveMap = {};
}
if (val == null) {
if (EcEncryptedValue.encryptOnSaveMap[id] != null) {
return EcEncryptedValue.encryptOnSaveMap[id];
} else {
return false;
}
} else {
EcEncryptedValue.encryptOnSaveMap[id] = val;
return val;
}
};
/**
* Decrypts this encrypted value into an object
*
* @return The Decrypted Object
* @memberOf EcEncryptedValue
* @method decryptIntoObject
*/
prototype.decryptIntoObject = function() {
var decryptRaw = this.decryptIntoString();
if (decryptRaw == null) {
return null;
}
if (!EcLinkedData.isProbablyJson(decryptRaw)) {
return null;
}
var decrypted = new EcRemoteLinkedData("", "");
decrypted.copyFrom(JSON.parse(decryptRaw));
EcEncryptedValue.encryptOnSave(decrypted.id, true);
decrypted.id = this.id;
return decrypted.deAtify();
};
/**
* Asynchronously decrypts this encrypted value into an object
*
* @param {Callback1<EcRemoteLinkedDat>} success Callback triggered on
* successful encryption, returns the decrypted object
* @param {Callback1<String>} failure Callback triggered if error during
* encryption
* @memberOf EcEncryptedValue
* @method decryptIntoObjectAsync
*/
prototype.decryptIntoObjectAsync = function(success, failure) {
var id = this.id;
this.decryptIntoStringAsync(function(decryptRaw) {
if (decryptRaw == null) {
failure("Could not decrypt data.");
}
if (!EcLinkedData.isProbablyJson(decryptRaw)) {
failure("Could not decrypt data.");
}
var decrypted = new EcRemoteLinkedData("", "");
decrypted.copyFrom(JSON.parse(decryptRaw));
EcEncryptedValue.encryptOnSave(decrypted.id, true);
decrypted.id = id;
success(decrypted.deAtify());
}, failure);
};
/**
* Asynchronously decrypts this encrypted value into an object with a IV and
* secret provided
*
* @param {String} iv Initialization Vector for decryption
* @param {String} secret Secret for decryption
* @param {Callback1<EcRemoteLinkedData>} success Callback triggered after
* successful decryption
* @param {Callback1<String>} failure Callback triggered if error during
* decryption
* @memberOf EcEncryptedValue
* @method decryptIntoObjectUsingIvAndSecretAsync
*/
prototype.decryptIntoObjectUsingIvAndSecretAsync = function(iv, secret, success, failure) {
this.decryptIntoStringUsingIvAndSecretAsync(iv, secret, function(decryptRaw) {
if (decryptRaw == null) {
failure("Could not decrypt data.");
}
if (!EcLinkedData.isProbablyJson(decryptRaw)) {
failure("Could not decrypt data.");
}
var decrypted = new EcRemoteLinkedData("", "");
decrypted.copyFrom(JSON.parse(decryptRaw));
EcEncryptedValue.encryptOnSave(decrypted.id, true);
success(decrypted.deAtify());
}, failure);
};
/**
* Decrypts an encrypted value into a string
*
* @return {String} Decrypted string value
* @memberOf EcEncryptedValue
* @method decryptIntoString
*/
prototype.decryptIntoString = function() {
var decryptSecret = this.decryptSecret();
if (decryptSecret != null) {
return EcAesCtr.decrypt(this.payload, decryptSecret.secret, decryptSecret.iv);
}
return null;
};
/**
* Asynchronously decrypts an encrypted value into a string
*
* @param {Callback1<String>} success Callback triggered after successfully
* decrypted, returns decrypted string
* @param {Callback1<String>} failure Callback triggered if error during
* decryption
* @memberOf EcEncryptedValue
* @method decryptIntoStringAsync
*/
prototype.decryptIntoStringAsync = function(success, failure) {
var me = this;
this.decryptSecretAsync(function(decryptSecret) {
if (decryptSecret != null) {
if (me.context == Ebac.context_0_2 || me.context == Ebac.context_0_3) {
if (base64.decode(decryptSecret.iv).byteLength == 32)
decryptSecret.iv = base64.encode(base64.decode(decryptSecret.iv).slice(0, 16));
}
EcAesCtrAsync.decrypt(me.payload, decryptSecret.secret, decryptSecret.iv, success, failure);
}
}, failure);
};
/**
* Asynchronously decrypts an encrypted value into a string with an IV and
* secrete provided
*
* @param {String} iv Initialization Vector for decryption
* @param {String} secret Secret for decryption
* @param {Callback1<String>} success Callback triggered on successful
* decryption
* @param {Callback1<String>} failure Callback triggered if error during
* decryption
* @memberOf EcEncryptedValue
* @method decryptIntoStringUsingIvAndSecretAsync
*/
prototype.decryptIntoStringUsingIvAndSecretAsync = function(iv, secret, success, failure) {
if (this.context == Ebac.context_0_2 || this.context == Ebac.context_0_3) {
if (base64.decode(iv).byteLength == 32)
iv = base64.encode(base64.decode(iv).slice(0, 16));
}
EcAesCtrAsync.decrypt(this.payload, secret, iv, success, failure);
};
/**
* Attempts to decrypt the secret by using all Identities in the Identity
* Manager
*
* @return {EbacEncryptedSecret} Secret after decrypted
* @memberOf EcEncryptedValue
* @method decryptSecret
*/
prototype.decryptSecret = function() {
if (this.owner != null) {
for (var i = 0; i < this.owner.length; i++) {
var decryptionKey = EcIdentityManager.getPpk(EcPk.fromPem(this.owner[i]));
if (decryptionKey == null) {
continue;
}
var decrypted = this.decryptSecretByKey(decryptionKey);
if (decrypted != null) {
return decrypted;
}
}
}
if (this.reader != null) {
for (var i = 0; i < this.reader.length; i++) {
var decryptionKey = EcIdentityManager.getPpk(EcPk.fromPem(this.reader[i]));
if (decryptionKey == null) {
continue;
}
var decrypted = this.decryptSecretByKey(decryptionKey);
if (decrypted != null) {
return decrypted;
}
}
}
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
var decryptionKey = EcIdentityManager.ids[i].ppk;
var decrypted = this.decryptSecretByKey(decryptionKey);
if (decrypted != null) {
return decrypted;
}
}
return null;
};
/**
* Asynchronously attempts to decrypt secret using all identities in
* Identity Manager
*
* @param {Callback1<EbacEncryptedSecret>} success Callback triggered after
* successfully decrypting secret, returns the decrypted secret
* @param {Callback1<String>} failure Callback triggered if error decrypting
* secret
* @memberOf EcEncryptedValue
* @method decryptSecretAsync
*/
prototype.decryptSecretAsync = function(success, failure) {
var ppks = new Array();
if (this.owner != null) {
for (var i = 0; i < this.owner.length; i++) {
var decryptionKey = EcIdentityManager.getPpk(EcPk.fromPem(this.owner[i]));
if (decryptionKey != null) {
if (!decryptionKey.inArray(ppks)) {
ppks.push(decryptionKey);
}
}
}
}
if (this.reader != null) {
for (var i = 0; i < this.reader.length; i++) {
var decryptionKey = EcIdentityManager.getPpk(EcPk.fromPem(this.reader[i]));
if (decryptionKey != null) {
if (!decryptionKey.inArray(ppks)) {
ppks.push(decryptionKey);
}
}
}
}
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
var decryptionKey = EcIdentityManager.ids[i].ppk;
if (decryptionKey != null) {
if (!decryptionKey.inArray(ppks)) {
ppks.push(decryptionKey);
}
}
}
var me = this;
var helper = new EcAsyncHelper();
helper.each(ppks, function(decryptionKey, countdown) {
me.decryptSecretByKeyAsync(decryptionKey, function(p1) {
if (helper.counter == -1) {
return;
}
helper.stop();
success(p1);
}, function(arg0) {
countdown();
});
}, function(arg0) {
failure("Could not decrypt secret.");
});
};
/**
* Attempts to decrypt secret with a specific key
*
* @param {EcPpk} decryptionKey Key to attempt secret decryption
* @return {EbacEncryptedSecret} Decrypted Secret
* @memberOf EcEncryptedValue
* @method decryptSecretByKey
*/
prototype.decryptSecretByKey = function(decryptionKey) {
var encryptedSecret = null;
if (this.secret != null) {
for (var j = 0; j < this.secret.length; j++) {
try {
var decryptedSecret = null;
decryptedSecret = EcRsaOaep.decrypt(decryptionKey, this.secret[j]);
if (!EcLinkedData.isProbablyJson(decryptedSecret)) {
continue;
}
encryptedSecret = EbacEncryptedSecret.fromEncryptableJson(JSON.parse(decryptedSecret));
}catch (ex) {}
}
}
return encryptedSecret;
};
/**
* Asynchronously attempts to decrypt secret with a specific key
*
* @param {EcPpk} decryptionKey Key to attempt secret decryption
* @param {Callback1<EbacEncryptedSecret>} success Callback triggered after
* successful decryption of secret, returns decrypted secret
* @param {Callback1<String>} failure Callback triggered if error during
* secret decryption
* @memberOf EcEncryptedValue
* @method decryptSecretByKeyAsync
*/
prototype.decryptSecretByKeyAsync = function(decryptionKey, success, failure) {
var encryptedSecret = null;
if (this.secret != null) {
var helper = new EcAsyncHelper();
helper.each(this.secret, function(decryptionSecret, decrement) {
EcRsaOaepAsync.decrypt(decryptionKey, decryptionSecret, function(decryptedSecret) {
if (helper.counter == -1) {
return;
}
if (!EcLinkedData.isProbablyJson(decryptedSecret)) {
decrement();
} else {
helper.stop();
success(EbacEncryptedSecret.fromEncryptableJson(JSON.parse(decryptedSecret)));
}
}, function(arg0) {
decrement();
});
}, function(arg0) {
failure("Could not find decryption key.");
});
} else
failure("Secret field is empty.");
};
/**
* Checks if this encrypted value is an encrypted version of a specific
* type, only works if the type wasn't hidden during encryption
*
* @param {String} type Type to compare if an encrypted type
* @return {boolean} True if encrypted version of type, false if not or
* can't tell
* @memberOf EcEncryptedValue
* @method isAnEncrypted
*/
prototype.isAnEncrypted = function(type) {
if (this.encryptedType == null) {
return false;
}
var typeSplit = (type.split("/"));
return this.encryptedType == type || this.encryptedType == typeSplit[typeSplit.length - 1];
};
/**
* Adds a reader to the object, if the reader does not exist.
*
* @param {EcPk} newReader PK of the new reader.
* @memberOf EcEncryptedValue
* @method addReader
*/
prototype.addReader = function(newReader) {
var pem = newReader.toPem();
if (this.reader == null) {
this.reader = new Array();
}
for (var i = 0; i < this.reader.length; i++) {
if (this.reader[i] == pem) {
return;
}
}
this.reader.push(pem);
var payloadSecret = this.decryptSecret();
if (payloadSecret == null) {
console.error("Cannot add a Reader if you don't know the secret");
return;
}
EcArray.setAdd(this.secret, EcRsaOaep.encrypt(newReader, payloadSecret.toEncryptableJson()));
};
/**
* Removes a reader from the object, if the reader does exist.
*
* @param {EcPk} oldReader PK of the old reader.
* @memberOf EcEncryptedValue
* @method removeReader
*/
prototype.removeReader = function(oldReader) {
var pem = oldReader.toPem();
if (this.reader == null) {
this.reader = new Array();
}
for (var i = 0; i < this.reader.length; i++) {
if (this.reader[i] == pem) {
this.reader.splice(i, 1);
}
}
};
}, {encryptOnSaveMap: {name: "Map", arguments: [null, null]}, secret: {name: "Array", arguments: [null]}, owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* A representation of a file.
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class GeneralFile
* @extends EcRemoteLinkedData
* @constructor
*/
var GeneralFile = function() {
EcRemoteLinkedData.call(this, General.context, GeneralFile.myType);
};
GeneralFile = stjs.extend(GeneralFile, EcRemoteLinkedData, [], function(constructor, prototype) {
constructor.TYPE_0_1 = "http://schema.eduworks.com/general/0.1/file";
constructor.TYPE_0_2 = "http://schema.eduworks.com/general/0.2/file";
constructor.myType = GeneralFile.TYPE_0_2;
/**
* Optional checksum of the file, used to verify if the file has been
* transmitted correctly.
*
* @property checksum
* @type String
*/
prototype.checksum = null;
/**
* Mime type of the file.
*
* @property mimeType
* @type String
*/
prototype.mimeType = null;
/**
* Base-64 encoded version of the bytestream of a file.
*
* @property data
* @type String
*/
prototype.data = null;
/**
* Name of the file, used to distinguish it
*
* @property name
* @type String
*/
prototype.name = null;
/**
* Helper method to force the browser to download the file.
*
* @memberOf GeneralFile
* @method download
*/
prototype.download = function() {
var blob = base64ToBlob(this.data, this.mimeType);
saveAs(blob, this.name);
};
prototype.upgrade = function() {
EcLinkedData.prototype.upgrade.call(this);
if (GeneralFile.TYPE_0_1.equals(this.type)) {
var me = (this);
if (me["@context"] == null && me["@schema"] != null)
me["@context"] = me["@schema"];
this.setContextAndType(General.context_0_2, GeneralFile.TYPE_0_2);
}
};
prototype.getTypes = function() {
var a = new Array();
a.push(GeneralFile.TYPE_0_2);
a.push(GeneralFile.TYPE_0_1);
return a;
};
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Repository object used to interact with the CASS Repository web services.
* Should be used for all CRUD and search operations
*
* @author fritz.ray@eduworks.com
* @module com.eduworks.ec
* @class EcRepository
*/
var EcRepository = function() {
EcRepository.repos.push(this);
};
EcRepository = stjs.extend(EcRepository, null, [], function(constructor, prototype) {
constructor.caching = false;
constructor.cachingSearch = false;
constructor.unsigned = false;
constructor.alwaysTryUrl = false;
constructor.cache = new Object();
constructor.fetching = new Object();
constructor.repos = new Array();
prototype.adminKeys = null;
prototype.selectedServer = null;
prototype.autoDetectFound = false;
/**
* Gets a JSON-LD object from the place designated by the URI.
* <p>
* Uses a signature sheet gathered from {@link EcIdentityManager}.
*
* @param {String} url URL of the remote object.
* @param {Callback1<EcRemoteLinkedData>}success Event to call upon
* successful retrieval.
* @param {Callback1<String>} failure Event to call upon spectacular
* failure.
* @memberOf EcRepository
* @method get
* @static
*/
constructor.get = function(url, success, failure) {
if (EcRemote.async == false) {
var result = EcRepository.getBlocking(url);
if (result == null)
if (failure != null)
failure("Could not locate object. May be due to EcRepository.alwaysTryUrl flag.");
else if (success != null)
success(result);
return;
}
if (EcRepository.caching) {
if ((EcRepository.cache)[url] != null) {
if (EcRemote.async) {
Task.immediate(function() {
success((EcRepository.cache)[url]);
});
} else {
success((EcRepository.cache)[url]);
}
return;
}
if (EcRemote.async) {
if ((EcRepository.fetching)[url] != null) {
if ((EcRepository.fetching)[url] > new Date().getTime()) {
setTimeout(function() {
EcRepository.get(url, success, failure);
}, 100);
return;
}
}
(EcRepository.fetching)[url] = new Date().getTime() + 60000;
}
}
if (!EcRepository.shouldTryUrl(url)) {
EcRepository.find(url, "Could not locate object. May be due to EcRepository.alwaysTryUrl flag.", new Object(), 0, success, failure);
return;
}
var fd = new FormData();
if (EcRepository.unsigned) {
EcRemote.getExpectingObject(url, null, function(p1) {
delete (EcRepository.fetching)[url];
var d = new EcRemoteLinkedData("", "");
d.copyFrom(p1);
if (d.getFullType() == null) {
EcRepository.find(url, JSON.stringify(p1), new Object(), 0, success, failure);
return;
}
if (EcRepository.caching) {
(EcRepository.cache)[d.id] = d;
(EcRepository.cache)[d.shortId()] = d;
}
success(d);
}, function(p1) {
EcRepository.find(url, p1, new Object(), 0, success, failure);
});
} else
EcIdentityManager.signatureSheetAsync(60000, url, function(p1) {
if ((EcRepository.cache)[url] != null) {
delete (EcRepository.fetching)[url];
success((EcRepository.cache)[url]);
return;
}
fd.append("signatureSheet", p1);
EcRemote.postExpectingObject(url, null, fd, function(p1) {
delete (EcRepository.fetching)[url];
var d = new EcRemoteLinkedData("", "");
d.copyFrom(p1);
if (d.getFullType() == null) {
EcRepository.find(url, JSON.stringify(p1), new Object(), 0, success, failure);
return;
}
if (EcRepository.caching) {
(EcRepository.cache)[d.id] = d;
(EcRepository.cache)[d.shortId()] = d;
}
success(d);
}, function(p1) {
EcRepository.find(url, p1, new Object(), 0, success, failure);
});
}, failure);
};
constructor.shouldTryUrl = function(url) {
if (url == null)
return false;
if (EcRepository.alwaysTryUrl)
return true;
if (EcRepository.repos.length == 0)
return true;
if (url.indexOf("/api/") != -1 || url.indexOf("/data/") != -1)
return true;
var validUrlFound = false;
for (var i = 0; i < EcRepository.repos.length; i++) {
if (EcRepository.repos[i].selectedServer == null)
continue;
validUrlFound = true;
}
if (!validUrlFound)
return true;
return false;
};
constructor.find = function(url, error, history, i, success, failure) {
if (isNaN(i) || i == undefined || i > EcRepository.repos.length || EcRepository.repos[i] == null) {
delete (EcRepository.fetching)[url];
if (failure != null)
failure(error);
return;
}
var repo = EcRepository.repos[i];
if (repo.selectedServer == null) {
EcRepository.find(url, error, history, i + 1, success, failure);
return;
}
if (((history)[repo.selectedServer]) == true) {
EcRepository.find(url, error, history, i + 1, success, failure);
return;
}
(history)[repo.selectedServer] = true;
repo.search("@id:\"" + url + "\"", null, function(strings) {
if (strings == null || strings.length == 0)
EcRepository.find(url, error, history, i + 1, success, failure);
else {
var done = false;
for (var i = 0; i < strings.length; i++) {
if (strings[i].id == url) {
if (done)
log("Searching for exact ID:" + url + ", found more than one@:" + repo.selectedServer);
done = true;
delete (EcRepository.fetching)[url];
if (EcRepository.caching) {
(EcRepository.cache)[url] = strings[i];
}
success(strings[i]);
}
}
if (done)
return;
EcRepository.find(url, error, history, i + 1, success, failure);
}
}, function(s) {
EcRepository.find(url, s, history, i + 1, success, failure);
});
};
constructor.findBlocking = function(url, error, history, i) {
if (i > EcRepository.repos.length || EcRepository.repos[i] == null) {
delete (EcRepository.fetching)[url];
return null;
}
var repo = EcRepository.repos[i];
if (((history)[repo.selectedServer]) == true)
EcRepository.findBlocking(url, error, history, i + 1);
(history)[repo.selectedServer] = true;
var strings = repo.searchBlocking("@id:\"" + url + "\"");
if (strings == null || strings.length == 0)
return EcRepository.findBlocking(url, error, history, i + 1);
else {
for (var j = 0; j < strings.length; j++) {
if (strings[j].id == url) {
delete (EcRepository.fetching)[url];
if (EcRepository.caching) {
(EcRepository.cache)[url] = strings[j];
}
return strings[j];
}
}
}
return EcRepository.findBlocking(url, error, history, i + 1);
};
/**
* Retrieves a piece of data synchronously from the server, blocking until
* it is returned
*
* @param {String} url URL ID of the data to be retrieved
* @return {EcRemoteLinkedData} Data retrieved, corresponding to the ID
* @memberOf EcRepository
* @method getBlocking
* @static
*/
constructor.getBlocking = function(url) {
if (url == null)
return null;
if (EcRepository.caching) {
if ((EcRepository.cache)[url] != null) {
return (EcRepository.cache)[url];
}
}
if (!EcRepository.shouldTryUrl(url)) {
return EcRepository.findBlocking(url, "Could not locate object. May be due to EcRepository.alwaysTryUrl flag.", new Object(), 0);
}
var fd = new FormData();
var p1 = null;
if (EcRepository.unsigned == false) {
p1 = EcIdentityManager.signatureSheet(60000, url);
fd.append("signatureSheet", p1);
}
var oldAsync = EcRemote.async;
EcRemote.async = false;
EcRemote.postExpectingObject(url, null, fd, function(p1) {
var d = new EcRemoteLinkedData("", "");
d.copyFrom(p1);
if (d.getFullType() == null) {
EcRepository.findBlocking(url, JSON.stringify(p1), new Object(), 0);
return;
}
(EcRepository.cache)[url] = d;
}, function(s) {
(EcRepository.cache)[url] = EcRepository.findBlocking(url, s, new Object(), 0);
});
EcRemote.async = oldAsync;
var result = (EcRepository.cache)[url];
if (!EcRepository.caching) {
(EcRepository.cache)[url] = null;
}
return result;
};
/**
* Escapes a search query
*
* @param {String} query Query string to escape
* @return {String} Escaped query string
* @memberOf EcRepository
* @method escapeSearch
* @static
*/
constructor.escapeSearch = function(query) {
var s = null;
s = (query.split("\\")).join("\\\\");
s = (s.split("-")).join("\\-");
s = (s.split("=")).join("\\=");
s = (s.split("&&")).join("\\&&");
s = (s.split("||")).join("\\||");
s = (s.split("<")).join("\\<");
s = (s.split(">")).join("\\>");
s = (s.split("|")).join("\\|");
s = (s.split("(")).join("\\(");
s = (s.split(")")).join("\\)");
s = (s.split("{")).join("\\{");
s = (s.split("}")).join("\\}");
s = (s.split("[")).join("\\[");
s = (s.split("]")).join("\\]");
s = (s.split("^")).join("\\^");
s = (s.split("\"")).join("\\\"");
s = (s.split("~")).join("\\~");
s = (s.split("*")).join("\\*");
s = (s.split("?")).join("\\?");
s = (s.split(":")).join("\\:");
s = (s.split("/")).join("\\/");
s = (s.split("+")).join("\\+");
return s;
};
/**
* Attempts to save a piece of data.
* <p>
* Uses a signature sheet informed by the owner field of the data.
*
* @param {EcRemoteLinkedData} data Data to save to the location designated
* by its id.
* @param {Callback1<String>} success Callback triggered on successful save
* @param {Callback1<String>} failure Callback triggered if error during
* save
* @memberOf EcRepository
* @method save
* @static
*/
constructor.save = function(data, success, failure) {
EcRepository._save(data, success, failure, null);
};
/**
* Attempts to save a piece of data. If the @id of the data is not of this server, will register the data to the server.
* <p>
* Uses a signature sheet informed by the owner field of the data.
*
* @param {EcRemoteLinkedData} data Data to save to the location designated
* by its id.
* @param {Callback1<String>} success Callback triggered on successful save
* @param {Callback1<String>} failure Callback triggered if error during
* save
* @memberOf EcRepository
* @method save
* @static
*/
prototype.saveTo = function(data, success, failure) {
EcRepository._save(data, success, failure, this);
};
/**
* Attempts to save a piece of data. Does some checks before saving to
* ensure the data is valid. This version does not send a console warning,
* <p>
* Uses a signature sheet informed by the owner field of the data.
*
* @param {EcRemoteLinkedData} data Data to save to the location designated
* by its id.
* @param {Callback1<String>} success Callback triggered on successful save
* @param {Callback1<String>} failure Callback triggered if error during
* save
* @memberOf EcRepository
* @method _save
* @static
*/
constructor._save = function(data, success, failure, repo) {
if (data.invalid()) {
var msg = "Cannot save data. It is missing a vital component.";
if (failure != null) {
failure(msg);
} else {
console.error(msg);
}
return;
}
if (data.reader != null && data.reader.length == 0) {
delete (data)["reader"];
}
if (data.owner != null && data.owner.length == 0) {
delete (data)["owner"];
}
if (EcEncryptedValue.encryptOnSave(data.id, null)) {
var encrypted = EcEncryptedValue.toEncryptedValue(data, false);
EcIdentityManager.sign(data);
EcRepository._saveWithoutSigning(data, success, failure, repo);
} else {
EcIdentityManager.sign(data);
EcRepository._saveWithoutSigning(data, success, failure, repo);
}
};
/**
* Attempts to save a piece of data without signing it.
* <p>
* Uses a signature sheet informed by the owner field of the data.
*
* @param {EcRemoteLinkedData} data Data to save to the location designated
* by its id.
* @param {Callback1<String>} success Callback triggered on successful save
* @param {Callback1<String>} failure Callback triggered if error during
* save
* @memberOf EcRepository
* @method _saveWithoutSigning
* @static
*/
constructor._saveWithoutSigning = function(data, success, failure, repo) {
if (EcRepository.caching) {
delete (EcRepository.cache)[data.id];
delete (EcRepository.cache)[data.shortId()];
}
if (data.invalid()) {
failure("Data is malformed.");
return;
}
if (EcRepository.alwaysTryUrl || repo == null || repo.constructor.shouldTryUrl(data.id))
data.updateTimestamp();
var fd = new FormData();
fd.append("data", data.toJson());
var afterSignatureSheet = function(signatureSheet) {
fd.append("signatureSheet", signatureSheet);
if (!EcRepository.alwaysTryUrl)
if (repo != null)
if (!repo.constructor.shouldTryUrl(data.id)) {
EcRemote.postExpectingString(EcRemote.urlAppend(repo.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.id)), "", fd, success, failure);
return;
}
EcRemote.postExpectingString(data.id, "", fd, success, failure);
};
if (EcRemote.async == false) {
var signatureSheet;
if (data.owner != null && data.owner.length > 0) {
signatureSheet = EcIdentityManager.signatureSheetFor(data.owner, 60000, data.id);
} else {
signatureSheet = EcIdentityManager.signatureSheet(60000, data.id);
}
afterSignatureSheet(signatureSheet);
} else if (data.owner != null && data.owner.length > 0) {
EcIdentityManager.signatureSheetForAsync(data.owner, 60000, data.id, afterSignatureSheet, failure);
} else {
EcIdentityManager.signatureSheetAsync(60000, data.id, afterSignatureSheet, failure);
}
};
/**
* Attempts to delete a piece of data.
* <p>
* Uses a signature sheet informed by the owner field of the data.
*
* @param {EcRemoteLinkedData} data Data to save to the location designated
* by its id.
* @param {Callback1<String>} success Callback triggered on successful
* delete
* @param {Callback1<String>} failure Callback triggered if error during
* delete
* @memberOf EcRepository
* @method _delete
* @static
*/
constructor._delete = function(data, success, failure) {
EcRepository.DELETE(data, success, failure);
};
/**
* Attempts to delete a piece of data.
* <p>
* Uses a signature sheet informed by the owner field of the data.
*
* @param {EcRemoteLinkedData} data Data to save to the location designated
* by its id.
* @param {Callback1<String>} success Callback triggered on successful
* delete
* @param {Callback1<String>} failure Callback triggered if error during
* delete
* @memberOf EcRepository
* @method DELETE
* @static
*/
constructor.DELETE = function(data, success, failure) {
if (EcRepository.caching) {
delete (EcRepository.cache)[data.id];
delete (EcRepository.cache)[data.shortId()];
}
var targetUrl;
targetUrl = data.shortId();
if (data.owner != null && data.owner.length > 0) {
EcIdentityManager.signatureSheetForAsync(data.owner, 60000, data.id, function(signatureSheet) {
if (signatureSheet.length == 2) {
for (var i = 0; i < EcRepository.repos.length; i++) {
if (data.id.indexOf(EcRepository.repos[i].selectedServer) != -1) {
EcRepository.repos[i].deleteRegistered(data, success, failure);
return;
}
}
failure("Cannot delete object without a signature. If deleting from a server, use the non-static _delete");
} else
EcRemote._delete(targetUrl, signatureSheet, success, failure);
}, failure);
} else {
EcRemote._delete(targetUrl, "[]", success, failure);
}
};
/**
* Attempts to delete a piece of data.
* <p>
* Uses a signature sheet informed by the owner field of the data.
*
* @param {EcRemoteLinkedData} data Data to save to the location designated
* by its id.
* @param {Callback1<String>} success Callback triggered on successful
* delete
* @param {Callback1<String>} failure Callback triggered if error during
* delete
* @memberOf EcRepository
* @method DELETE
* @static
*/
prototype.deleteRegistered = function(data, success, failure) {
if (EcRepository.caching) {
delete (EcRepository.cache)[data.id];
delete (EcRepository.cache)[data.shortId()];
}
var targetUrl;
if (EcRepository.shouldTryUrl(data.id))
targetUrl = data.shortId();
else {
targetUrl = EcRemote.urlAppend(this.selectedServer, "data/" + data.getDottedType() + "/" + EcCrypto.md5(data.id));
}
var me = this;
if (data.owner != null && data.owner.length > 0) {
EcIdentityManager.signatureSheetForAsync(data.owner, 60000, data.id, function(signatureSheet) {
if (signatureSheet.length == 2 && me.adminKeys != null) {
EcIdentityManager.signatureSheetForAsync(me.adminKeys, 60000, data.id, function(signatureSheet) {
EcRemote._delete(targetUrl, signatureSheet, success, failure);
}, failure);
} else
EcRemote._delete(targetUrl, signatureSheet, success, failure);
}, failure);
} else {
EcRemote._delete(targetUrl, "[]", success, failure);
}
};
/**
* Retrieves data from the server and caches it for use later during the
* application. This should be called before the data is needed if possible,
* so loading displays can be faster.
*
* @param {String[]} urls List of Data ID Urls that should be precached
* @param {Callback0} success Callback triggered once all of the data has
* been retrieved
* @memberOf EcRepository
* @method precache
*/
prototype.precache = function(urls, success) {
if (urls == null || urls.length == 0) {
if (success != null) {
success();
}
return;
}
var cacheUrls = new Array();
for (var i = 0; i < urls.length; i++) {
var url = urls[i];
if ((EcRepository.cache)[url] != null) {} else if (url.startsWith(this.selectedServer)) {
cacheUrls.push(url.replace(this.selectedServer, "").replace("custom/", ""));
} else if (!EcRepository.shouldTryUrl(url)) {
cacheUrls.push("data/" + EcCrypto.md5(url));
}
}
if (cacheUrls.length == 0) {
if (success != null) {
success();
}
return;
}
var fd = new FormData();
fd.append("data", JSON.stringify(cacheUrls));
var me = this;
if (EcRepository.unsigned) {
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/multiGet", fd, function(p1) {
var results = p1;
for (var i = 0; i < results.length; i++) {
var d = new EcRemoteLinkedData(null, null);
d.copyFrom(results[i]);
results[i] = d;
if (EcRepository.caching) {
if (!EcRepository.shouldTryUrl(d.id)) {
var md5 = EcCrypto.md5(d.id);
for (var j = 0; j < urls.length; j++) {
var url = urls[j];
if (url.indexOf(md5) != -1) {
(EcRepository.cache)[url] = d;
break;
}
}
}
(EcRepository.cache)[d.shortId()] = d;
(EcRepository.cache)[d.id] = d;
}
}
if (success != null) {
success();
}
}, null);
} else
EcIdentityManager.signatureSheetAsync(60000, this.selectedServer, function(p1) {
fd.append("signatureSheet", p1);
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/multiGet", fd, function(p1) {
var results = p1;
for (var i = 0; i < results.length; i++) {
var d = new EcRemoteLinkedData(null, null);
d.copyFrom(results[i]);
results[i] = d;
if (EcRepository.caching) {
if (!EcRepository.shouldTryUrl(d.id)) {
var md5 = EcCrypto.md5(d.id);
for (var j = 0; j < urls.length; j++) {
var url = urls[j];
if (url.indexOf(md5) != -1) {
(EcRepository.cache)[url] = d;
break;
}
}
}
(EcRepository.cache)[d.shortId()] = d;
(EcRepository.cache)[d.id] = d;
}
}
if (success != null) {
success();
}
}, null);
}, null);
};
/**
* Gets a JSON-LD object from the place designated by the URI.
* <p>
* Uses a signature sheet gathered from {@link EcIdentityManager}.
*
* @param {String} url URL of the remote object.
* @param {Callback1<EcRemoteLinkedData>}success Event to call upon
* successful retrieval.
* @param {Callback1<String>} failure Event to call upon spectacular
* failure.
* @memberOf EcRepository
* @method get
* @static
*/
prototype.multiget = function(urls, success, failure, cachedValues) {
if (urls == null || urls.length == 0) {
if (failure != null) {
failure("");
}
return;
}
if (EcRepository.caching) {
var cachedVals = [];
for (var i = 0; i < urls.length; i++) {
if ((EcRepository.cache)[urls[i]] != null) {
cachedVals.push((EcRepository.cache)[urls[i]]);
}
}
if (cachedValues != null)
cachedValues(cachedVals);
}
var onServer = new Array();
for (var i = 0; i < urls.length; i++) {
var url = urls[i];
if (url.startsWith(this.selectedServer)) {
onServer.push(url.replace(this.selectedServer, "").replace("custom/", ""));
}
}
var fd = new FormData();
fd.append("data", JSON.stringify(onServer));
var me = this;
if (EcRepository.unsigned == true)
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/multiGet", fd, function(p1) {
var results = p1;
for (var i = 0; i < results.length; i++) {
var d = new EcRemoteLinkedData(null, null);
d.copyFrom(results[i]);
results[i] = d;
if (EcRepository.caching) {
(EcRepository.cache)[d.shortId()] = d;
(EcRepository.cache)[d.id] = d;
}
}
if (success != null) {
success(results);
}
}, failure);
else
EcIdentityManager.signatureSheetAsync(60000, this.selectedServer, function(p1) {
fd.append("signatureSheet", p1);
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/multiGet", fd, function(p1) {
var results = p1;
for (var i = 0; i < results.length; i++) {
var d = new EcRemoteLinkedData(null, null);
d.copyFrom(results[i]);
results[i] = d;
if (EcRepository.caching) {
(EcRepository.cache)[d.shortId()] = d;
(EcRepository.cache)[d.id] = d;
}
}
if (success != null) {
success(results);
}
}, failure);
}, failure);
};
/**
* Search a repository for JSON-LD compatible data.
* <p>
* Uses a signature sheet gathered from {@link EcIdentityManager}.
*
* @param {String} query ElasticSearch compatible query string, similar to
* Google query strings.
* @param {Callback1<EcRemoteLinkedData>} eachSuccess Success event for each
* found object.
* @param {Callback1<EcRemoteLinkedData[]>} success Success event, called
* after eachSuccess.
* @param {Callback1<String>} failure Failure event.
* @memberOf EcRepository
* @method search
*/
prototype.search = function(query, eachSuccess, success, failure) {
this.searchWithParams(query, null, eachSuccess, success, failure);
};
/**
* Search a repository for JSON-LD compatible data synchronously.
* <p>
* Uses a signature sheet gathered from {@link EcIdentityManager}.
*
* @param {String} query ElasticSearch compatible query string, similar to
* Google query strings.
* @returns EcRemoteLinkedData[]
* @memberOf EcRepository
* @method search
*/
prototype.searchBlocking = function(query) {
return this.searchWithParamsBlocking(query, null);
};
/**
* Search a repository for JSON-LD compatible data.
* <p>
* Uses a signature sheet gathered from {@link EcIdentityManager}.
*
* @param {String} query ElasticSearch compatible query string, similar to
* Google query strings.
* @param {Object} paramObj Additional parameters that can be used to tailor
* the search.
* @param {Callback1<EcRemoteLinkedData>} eachSuccess Success event for each
* found object.
* @param {Callback1<EcRemoteLinkedData[]>} success Success event, called
* after eachSuccess.
* @param {Callback1<String>} failure Failure event.
* @memberOf EcRepository
* @method searchWithParams
*/
prototype.searchWithParams = function(originalQuery, originalParamObj, eachSuccess, success, failure) {
if (EcRemote.async == false) {
var result = this.searchWithParamsBlocking(originalQuery, originalParamObj);
if (result == null)
if (failure != null)
failure("Search failed.");
else {
for (var i = 0; i < result.length; i++)
if (eachSuccess != null)
eachSuccess(result[i]);
if (success != null)
success(result);
}
return;
}
var query = originalQuery;
var paramObj = originalParamObj;
if (paramObj == null) {
paramObj = new Object();
}
var params = new Object();
var paramProps = (params);
query = this.searchParamProps(query, paramObj, paramProps);
if ((paramObj)["fields"] != null) {
paramProps["fields"] = (paramObj)["fields"];
}
var cacheKey;
if (EcRepository.cachingSearch) {
cacheKey = JSON.stringify(paramProps) + query;
if ((EcRepository.cache)[cacheKey] != null) {
this.handleSearchResults((EcRepository.cache)[cacheKey], eachSuccess, success, failure);
return;
}
var me = this;
if (EcRemote.async) {
if ((EcRepository.fetching)[cacheKey] != null) {
if ((EcRepository.fetching)[cacheKey] > new Date().getTime()) {
setTimeout(function() {
me.searchWithParams(originalQuery, originalParamObj, eachSuccess, success, failure);
}, 100);
return;
}
}
(EcRepository.fetching)[cacheKey] = new Date().getTime() + 60000;
}
} else {
cacheKey = null;
}
var fd = new FormData();
fd.append("data", query);
if (params != null) {
fd.append("searchParams", JSON.stringify(params));
}
var me = this;
if (EcRepository.unsigned == true || (paramObj)["unsigned"] == true) {
fd.append("signatureSheet", "[]");
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/search", fd, function(p1) {
if (EcRepository.cachingSearch) {
(EcRepository.cache)[cacheKey] = p1;
}
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
me.handleSearchResults(p1, eachSuccess, success, failure);
}, function(p1) {
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
if (failure != null) {
failure(p1);
}
});
} else
EcIdentityManager.signatureSheetAsync(60000, this.selectedServer, function(signatureSheet) {
fd.append("signatureSheet", signatureSheet);
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/search", fd, function(p1) {
if (EcRepository.cachingSearch) {
(EcRepository.cache)[cacheKey] = p1;
}
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
me.handleSearchResults(p1, eachSuccess, success, failure);
}, function(p1) {
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
if (failure != null) {
failure(p1);
}
});
}, failure);
};
/**
* Search a repository for JSON-LD compatible data synchronously.
* <p>
* Uses a signature sheet gathered from {@link EcIdentityManager}.
*
* @param {String} query ElasticSearch compatible query string, similar to
* Google query strings.
* @param {Object} paramObj Additional parameters that can be used to tailor
* the search.
* @returns EcRemoteLinkedData[]
* @memberOf EcRepository
* @method searchWithParams
*/
prototype.searchWithParamsBlocking = function(originalQuery, originalParamObj) {
var query = originalQuery;
var paramObj = originalParamObj;
if (paramObj == null) {
paramObj = new Object();
}
var params = new Object();
var paramProps = (params);
query = this.searchParamProps(query, paramObj, paramProps);
if ((paramObj)["fields"] != null) {
paramProps["fields"] = (paramObj)["fields"];
}
var oldAsync = EcRemote.async;
EcRemote.async = false;
var cacheKey;
cacheKey = JSON.stringify(paramProps) + query;
if (EcRepository.cachingSearch) {
if ((EcRepository.cache)[cacheKey] != null) {
return this.handleSearchResults((EcRepository.cache)[cacheKey], null, null, null);
}
}
var fd = new FormData();
fd.append("data", query);
if (params != null) {
fd.append("searchParams", JSON.stringify(params));
}
var me = this;
if (EcRepository.unsigned == true || (paramObj)["unsigned"] == true) {
fd.append("signatureSheet", "[]");
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/search", fd, function(p1) {
(EcRepository.cache)[cacheKey] = p1;
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
}, function(p1) {
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
(EcRepository.cache)[cacheKey] = null;
});
} else {
var signatureSheet;
signatureSheet = EcIdentityManager.signatureSheet(60000, this.selectedServer);
fd.append("signatureSheet", signatureSheet);
EcRemote.postExpectingObject(me.selectedServer, "sky/repo/search", fd, function(p1) {
(EcRepository.cache)[cacheKey] = p1;
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
}, function(p1) {
if (cacheKey != null) {
delete (EcRepository.fetching)[cacheKey];
}
(EcRepository.cache)[cacheKey] = null;
});
}
var result = this.handleSearchResults((EcRepository.cache)[cacheKey], null, null, null);
if (!EcRepository.cachingSearch) {
delete (EcRepository.cache)[cacheKey];
}
EcRemote.async = oldAsync;
return result;
};
prototype.searchParamProps = function(query, paramObj, paramProps) {
if ((paramObj)["start"] != null) {
paramProps["start"] = (paramObj)["start"];
}
if ((paramObj)["size"] != null) {
paramProps["size"] = (paramObj)["size"];
}
if ((paramObj)["types"] != null) {
paramProps["types"] = (paramObj)["types"];
}
if ((paramObj)["sort"] != null) {
paramProps["sort"] = (paramObj)["sort"];
}
if ((paramObj)["track_scores"] != null) {
paramProps["track_scores"] = (paramObj)["track_scores"];
}
if ((paramObj)["ownership"] != null) {
var ownership = (paramObj)["ownership"];
if (!query.startsWith("(") || !query.endsWith(")")) {
query = "(" + query + ")";
}
if (ownership == "public") {
query += " AND (_missing_:@owner)";
} else if (ownership == "owned") {
query += " AND (_exists_:@owner)";
} else if (ownership == "me") {
query += " AND (";
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (i != 0) {
query += " OR ";
}
var id = EcIdentityManager.ids[i];
query += "@owner:\"" + id.ppk.toPk().toPem() + "\"";
}
query += ")";
}
}
return query;
};
/**
* Searches known repository endpoints to set the server configuration for
* this repositories instance
*
* @memberOf EcRepository
* @method autoDetectRepository
*/
prototype.autoDetectRepositoryAsync = function(success, failure) {
var protocols = new Array();
if (window != null) {
if (window.location != null) {
if (window.location.protocol == "https:") {
protocols.push("https:");
}
}
}
if (window != null) {
if (window.location != null) {
if (window.location.protocol == "http:") {
protocols.push("http:");
protocols.push("https:");
}
}
}
if (protocols.length == 0) {
protocols.push("https:");
protocols.push("http:");
}
var hostnames = new Array();
var servicePrefixes = new Array();
if (this.selectedServer != null) {
var e = window.document.createElement("a");
(e)["href"] = this.selectedServer;
hostnames.push((e)["host"]);
servicePrefixes.push((e)["pathname"]);
} else {
if (window.location.host != null) {
hostnames.push(window.location.host, window.location.host.replace(".", ".service."), window.location.host + ":8080", window.location.host.replace(".", ".service.") + ":8080");
}
if (window.location.hostname != null) {
hostnames.push(window.location.hostname, window.location.hostname.replace(".", ".service."), window.location.hostname + ":8080", window.location.hostname.replace(".", ".service.") + ":8080");
}
}
EcArray.removeDuplicates(hostnames);
servicePrefixes.push("/" + window.location.pathname.split("/")[1] + "/api/", "/", "/service/", "/api/");
EcArray.removeDuplicates(servicePrefixes);
var me = this;
me.autoDetectFound = false;
for (var j = 0; j < hostnames.length; j++) {
for (var k = 0; k < servicePrefixes.length; k++) {
for (var i = 0; i < protocols.length; i++) {
this.autoDetectRepositoryActualAsync(protocols[i] + "//" + hostnames[j] + servicePrefixes[k].replaceAll("//", "/"), success, failure);
setTimeout(function() {
if (me.autoDetectFound == false) {
var servicePrefixes = new Array();
servicePrefixes.push("/" + window.location.pathname.split("/")[1] + "/api/custom/", "/api/custom/");
EcArray.removeDuplicates(servicePrefixes);
for (var j = 0; j < hostnames.length; j++) {
for (var k = 0; k < servicePrefixes.length; k++) {
for (var i = 0; i < protocols.length; i++) {
me.autoDetectRepositoryActualAsync(protocols[i] + "//" + hostnames[j] + servicePrefixes[k].replaceAll("//", "/"), success, failure);
setTimeout(function() {
if (me.autoDetectFound == false)
failure("Could not find service.");
}, 5000);
}
}
}
}
}, 5000);
}
}
}
};
/**
* Searches known repository endpoints to set the server configuration for
* this repositories instance
*
* @memberOf EcRepository
* @method autoDetectRepository
*/
prototype.autoDetectRepository = function() {
EcRemote.async = false;
var protocols = new Array();
if (window != null) {
if (window.location != null) {
if (window.location.protocol == "https:") {
protocols.push("https:");
}
}
}
if (window != null) {
if (window.location != null) {
if (window.location.protocol == "http:") {
protocols.push("http:");
protocols.push("https:");
}
}
}
if (protocols.length == 0) {
protocols.push("https:");
protocols.push("http:");
}
var hostnames = new Array();
var servicePrefixes = new Array();
if (this.selectedServer != null) {
var e = window.document.createElement("a");
(e)["href"] = this.selectedServer;
hostnames.push((e)["host"]);
servicePrefixes.push((e)["pathname"]);
} else {
if (window.location.host != null) {
hostnames.push(window.location.host, window.location.host.replace(".", ".service."), window.location.host + ":8080", window.location.host.replace(".", ".service.") + ":8080");
}
if (window.location.hostname != null) {
hostnames.push(window.location.hostname, window.location.hostname.replace(".", ".service."), window.location.hostname + ":8080", window.location.hostname.replace(".", ".service.") + ":8080");
}
}
servicePrefixes.push("/" + window.location.pathname.split("/")[1] + "/api/", "/" + window.location.pathname.split("/")[1] + "/api/custom/", "/", "/service/", "/api/", "/api/custom/");
for (var j = 0; j < hostnames.length; j++) {
for (var k = 0; k < servicePrefixes.length; k++) {
for (var i = 0; i < protocols.length; i++) {
if (this.autoDetectRepositoryActual(protocols[i] + "//" + hostnames[j] + servicePrefixes[k].replaceAll("//", "/"))) {
EcRemote.async = true;
return;
}
}
}
}
EcRemote.async = true;
};
/**
* Handles the actual detection of repository endpoint /ping service
*
* @param {String} guess The server prefix
* @return {boolean} Whether the detection successfully found the endpoint
* @memberOf EcRepository
* @method autoDetectRepositoryAsync
* @private
*/
prototype.autoDetectRepositoryActualAsync = function(guess, success, failure) {
var me = this;
var successCheck = function(p1) {
if (p1 != null) {
if ((p1)["ping"] == "pong") {
if (me.autoDetectFound == false) {
me.selectedServer = guess;
me.autoDetectFound = true;
success();
}
}
}
};
var failureCheck = function(p1) {
if (p1 != null) {
if (!(p1 == "")) {
try {
if (p1.indexOf("pong") != -1) {
if (me.autoDetectFound == false) {
me.selectedServer = guess;
me.autoDetectFound = true;
success();
}
}
}catch (ex) {}
}
}
};
if (guess != null && guess != "") {
try {
EcRemote.getExpectingObject(guess, "ping", successCheck, failureCheck);
}catch (ex) {}
}
return this.autoDetectFound;
};
/**
* Handles the actual detection of repository endpoint /ping service
*
* @param {String} guess The server prefix
* @return {boolean} Whether the detection successfully found the endpoint
* @memberOf EcRepository
* @method autoDetectRepositoryActual
* @private
*/
prototype.autoDetectRepositoryActual = function(guess) {
var oldTimeout = EcRemote.timeout;
EcRemote.timeout = 500;
var me = this;
var successCheck = function(p1) {
if (p1 != null) {
if ((p1)["ping"] == "pong") {
me.selectedServer = guess;
me.autoDetectFound = true;
}
}
};
var failureCheck = function(p1) {
if (p1 != null) {
if (p1 != "") {
try {
if (p1.indexOf("pong") != -1) {
me.selectedServer = guess;
me.autoDetectFound = true;
}
}catch (ex) {}
}
}
};
if (guess != null && guess != "") {
try {
EcRemote.getExpectingObject(guess, "ping", successCheck, failureCheck);
}catch (ex) {}
}
EcRemote.timeout = oldTimeout;
return this.autoDetectFound;
};
/**
* Lists all types visible to the current user in the repository
* <p>
* Uses a signature sheet gathered from {@link EcIdentityManager}.
*
* @param {Callback1<Object[]>} success Success event
* @param {Callback1<String>} failure Failure event.
* @memberOf EcRepository
* @method listTypes
*/
prototype.listTypes = function(success, failure) {
var fd = new FormData();
fd.append("signatureSheet", EcIdentityManager.signatureSheet(60000, this.selectedServer));
EcRemote.postExpectingObject(this.selectedServer, "sky/repo/types", fd, function(p1) {
var results = p1;
if (success != null) {
success(results);
}
}, failure);
};
/**
* Backs up the skyrepo elasticsearch database to the server backup directory
*
* @param {String} serverSecret Secret string stored on the server to authenticate administrative rights
* @param {Callback1<Object>} success Success event
* @param {Callback1<String>} failure Failure event.
* @memberOf EcRepository
* @method backup
*/
prototype.backup = function(serverSecret, success, failure) {
EcRemote.getExpectingObject(this.selectedServer, "util/backup?secret=" + serverSecret, success, failure);
};
/**
* Restores the skyrepo elasticsearch backup from the server backup directory
*
* @param {String} serverSecret Secret string stored on the server to authenticate administrative rights
* @param {Callback1<Object>} success Success event
* @param {Callback1<String>} failure Failure event.
* @memberOf EcRepository
* @method restoreBackup
*/
prototype.restoreBackup = function(serverSecret, success, failure) {
EcRemote.getExpectingObject(this.selectedServer, "util/restore?secret=" + serverSecret, success, failure);
};
/**
* Wipes all data from the the skyrepo elasticsearch, can only be restored by using backup restore
*
* @param {String} serverSecret Secret string stored on the server to authenticate administrative rights
* @param {Callback1<Object>} success Success event
* @param {Callback1<String>} failure Failure event.
* @memberOf EcRepository
* @method wipe
*/
prototype.wipe = function(serverSecret, success, failure) {
EcRemote.getExpectingObject(this.selectedServer, "util/purge?secret=" + serverSecret, success, failure);
};
/**
* Handles the search results in search by params, before returning them
* with the callback passed into search method
*
* @param {EcRemoteLinkedData[]} results Results to handle before returning
* @param {Callback1<EcRemoteLinkedData>} eachSuccess Callback function to
* trigger for each search result
* @param {Callback1<EcRemoteLinkedData[]>} success Callback function to
* trigger with all search results
* @param failure
* @memberOf EcRepository
* @method handleSearchResults
* @private
*/
prototype.handleSearchResults = function(results, eachSuccess, success, failure) {
if (results == null) {
if (failure != null)
failure("Error in search. See HTTP request for more details.");
return null;
}
for (var i = 0; i < results.length; i++) {
var d = new EcRemoteLinkedData(null, null);
d.copyFrom(results[i]);
results[i] = d;
if (EcRepository.caching) {
(EcRepository.cache)[d.shortId()] = d;
(EcRepository.cache)[d.id] = d;
}
if (eachSuccess != null) {
eachSuccess(results[i]);
}
}
if (success != null) {
success(results);
}
return results;
};
/**
* Fetches the admin keys from the server to compare for check if current
* user is an admin user
*
* @param {Callback1<String[]>} success
* Callback triggered when the admin keys are successfully returned,
* returns an array of the admin public keys
* @param {Callback1<String>} failure
* Callback triggered if error occurs fetching admin keys
* @memberOf EcRemoteIdentityManager
* @method fetchServerAdminKeys
*/
prototype.fetchServerAdminKeys = function(success, failure) {
var service;
if (this.selectedServer.endsWith("/")) {
service = "sky/admin";
} else {
service = "/sky/admin";
}
var me = this;
EcRemote.getExpectingObject(this.selectedServer, service, function(p1) {
var ary = p1;
me.adminKeys = new Array();
for (var i = 0; i < ary.length; i++) {
me.adminKeys.push(ary[i]);
}
success(ary);
}, function(p1) {
failure("");
});
};
}, {cache: "Object", fetching: "Object", repos: {name: "Array", arguments: ["EcRepository"]}, adminKeys: {name: "Array", arguments: [null]}}, {});
/**
* Implementation of a file with methods for communicating with repository services
*
* @author devlin.junker@eduworks.com
* @module com.eduworks.ec
* @class EcFile
* @extends GeneralFile
* @constructor
*/
var EcFile = function() {
GeneralFile.call(this);
};
EcFile = stjs.extend(EcFile, GeneralFile, [], function(constructor, prototype) {
/**
* Factory method for creating a file with certain values
*
* @param {String} name
* Name of the file to be created
* @param {String} base64Data
* Base 64 encoded file data
* @param {String} mimeType
* MIME Type of the file
* @return {EcFile}
* The file created
* @memberOf EcFile
* @method create
* @static
*/
constructor.create = function(name, base64Data, mimeType) {
var f = new EcFile();
f.data = base64Data;
f.name = name;
f.mimeType = mimeType;
return f;
};
/**
* Retrieves a file from the server specified by it's ID
*
* @param {String} id
* ID of the file data to be retrieved
* @param {Callback1<EcFile>} success
* Callback triggered if successfully retrieved from the server,
* returns the retrieved file
* @param {Callback1<String>} failure
* Callback triggered if error occurs while retrieving file from server
* @memberOf EcFile
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
var f = new EcFile();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1 != null && p1.isA(GeneralFile.myType)) {
f.copyFrom(p1);
if (success != null)
success(f);
} else {
if (failure != null)
failure("Resultant object is not a competency.");
return;
}
}, failure);
};
/**
* Searches the repository given for files that match the query passed in
*
* @param {EcRepository} repo
* Repository to search for files
* @param {String} query
* Query to user for search
* @param {Callback1<EcFile[]> success
* Callback triggered after search completes,
* returns results
* @param {Callback1<String>} failure
* Callback triggered if error occurs while searching
* @param {Object} paramObj
* Parameters to pass to search
* @param start
* @param size
* @memberOf EcFile
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = "";
queryAdd = new GeneralFile().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var file = new EcFile();
if (p1[i].isAny(file.getTypes())) {
file.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcFile.myType)) {
var obj = val.decryptIntoObject();
file.copyFrom(obj);
EcEncryptedValue.encryptOnSave(file.id, true);
}
}
ret[i] = file;
}
success(ret);
}
}, failure);
};
/**
* Saves this file in the repository using the repository web services
*
* @param {Callback1<String>} success
* Callback triggered if successfully saved
* @param {Callback1<String>} failure
* Callback triggered if error occurs while saving
* @memberOf EcFile
* @method save
*/
prototype.save = function(success, failure) {
if (this.name == null || this.name == "") {
var msg = "File Name can not be empty";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
EcRepository.save(this, success, failure);
};
/**
* Deletes the file from the repository using repository web services
*
* @param {Callback1<String>} success
* Callback triggered if successfully deleted
* @param {Callback1<String>} failure
* Callback triggered if error occurs while deleting
* @memberOf EcFile
* @method _delete
*/
prototype._delete = function(repo, success, failure) {
repo.constructor.DELETE(this, success, failure);
};
}, {owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Created by fray on 11/29/17.
*/
var EcConcept = function() {
Concept.call(this);
};
EcConcept = stjs.extend(EcConcept, Concept, [], function(constructor, prototype) {
/**
* Retrieves a concept from it's server asynchronously
*
* @param {String} id
* ID of the concept to retrieve from the server
* @param {Callback1<String>} success
* Callback triggered after retrieving the concept,
* returns the concept retrieved
* @param {Callback1<String>} failure
* Callback triggered if error retrieving concept
* @memberOf EcConcept
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
if (stjs.isInstanceOf(p1.constructor, EcConcept))
if (success != null) {
success(p1);
return;
}
var concept = new EcConcept();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(concept.getTypes())) {
concept.copyFrom(p1);
if (EcRepository.caching) {
(EcRepository.cache)[concept.shortId()] = concept;
(EcRepository.cache)[concept.id] = concept;
}
if (success != null)
success(concept);
} else {
var msg = "Retrieved object was not a concept";
if (failure != null)
failure(msg);
else
console.error(msg);
}
}, failure);
};
/**
* Retrieves a concept from it's server synchronously, the call
* blocks until it is successful or an error occurs
*
* @param {String} id
* ID of the concept to retrieve
* @return EcConcept
* The concept retrieved
* @memberOf EcConcept
* @method getBlocking
* @static
*/
constructor.getBlocking = function(id) {
var p1 = EcRepository.getBlocking(id);
if (p1 == null)
return null;
var concept = new EcConcept();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(concept.getTypes())) {
concept.copyFrom(p1);
return concept;
} else {
var msg = "Retrieved object was not a concept";
console.error(msg);
return null;
}
};
/**
* Searches a repository for competencies that match the search query
*
* @param {EcRepository} repo
* Repository to search using the query
* @param {String} query
* Query string to pass to the search web service
* @param {Callback1<Array<EcConcept>> success
* Callback triggered after completing the search, returns the results
* @param {Callback1<String>} failure
* Callback triggered if error searching
* @param {Object} paramObj
* Parameter object for search
* @memberOf EcConcept
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = "";
queryAdd = new EcConcept().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var comp = new EcConcept();
if (p1[i].isAny(comp.getTypes())) {
comp.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcConcept.myType)) {
var obj = val.decryptIntoObject();
comp.copyFrom(obj);
EcEncryptedValue.encryptOnSave(comp.id, true);
}
}
ret[i] = comp;
}
success(ret);
}
}, failure);
};
}, {topConceptOf: "ConceptScheme", semanticRelation: "Concept", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Created by fray on 11/29/17.
*/
var EcConceptScheme = function() {
ConceptScheme.call(this);
};
EcConceptScheme = stjs.extend(EcConceptScheme, ConceptScheme, [], function(constructor, prototype) {
/**
* Retrieves a concept scheme from the server, specified by the ID
*
* @param {String} id
* ID of the concept scheme to retrieve
* @param {Callback1<EcConceptScheme>} success
* Callback triggered after successfully retrieving the concept scheme,
* returns the retrieved concept scheme
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while retrieving the concept scheme
* @memberOf EcConceptScheme
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
var scheme = new EcConceptScheme();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(scheme.getTypes())) {
scheme.copyFrom(p1);
if (success != null)
success(scheme);
} else {
var msg = "Resultant object is not a concept scheme.";
if (failure != null)
failure(msg);
else
console.error(msg);
}
}, function(p1) {
if (failure != null)
failure(p1);
});
};
/**
* Retrieves a concept scheme from the server in a blocking fashion, specified by the ID
*
* @param {String} id
* ID of the concept scheme to retrieve
* @param {Callback1<EcConceptScheme>} success
* Callback triggered after successfully retrieving the concept scheme,
* returns the retrieved concept scheme
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while retrieving the concept scheme
* @memberOf EcConceptScheme
* @method getBlocking
* @static
*/
constructor.getBlocking = function(id) {
var p1 = EcRepository.getBlocking(id);
if (p1 == null)
return null;
var scheme = new EcConceptScheme();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(scheme.getTypes())) {
scheme.copyFrom(p1);
return scheme;
} else {
return null;
}
};
/**
* Searches the repository given for concept schemes using the query passed in
*
* @param {EcRepository} repo
* Repository to search for concept schemes
* @param {String} query
* Query string used to search for a concept scheme
* @param {Callback1<Array<EcConceptScheme>} success
* Callback triggered when the search successfully returns,
* returns search results
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while searching
* @param {Object} paramObj
* Parameter object for search
* @memberOf EcConceptScheme
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = "";
queryAdd = new EcConceptScheme().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var scheme = new EcConceptScheme();
if (p1[i].isAny(scheme.getTypes())) {
scheme.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcConceptScheme.myType)) {
var obj = val.decryptIntoObject();
scheme.copyFrom(obj);
EcEncryptedValue.encryptOnSave(scheme.id, true);
}
}
ret[i] = scheme;
}
success(ret);
}
}, failure);
};
}, {hasTopConcept: "Concept", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* The sequence that assertions should be built as such: 1. Generate the ID. 2.
* Add the owner. 3. Set the subject. 4. Set the agent. Further functions may be
* called afterwards in any order. WARNING: The modifications of ownership and
* readership do not "just work".
*
* @author fritz.ray@eduworks.com
*/
var EcAssertion = function() {
Assertion.call(this);
};
EcAssertion = stjs.extend(EcAssertion, Assertion, [], function(constructor, prototype) {
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
var assertion = new EcAssertion();
if (p1.isAny(assertion.getTypes())) {
assertion.copyFrom(p1);
if (success != null)
success(assertion);
} else {
var msg = "Retrieved object was not an assertion";
if (failure != null)
failure(msg);
else
console.error(msg);
}
}, failure);
};
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = new EcAssertion().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var assertion = new EcAssertion();
assertion.copyFrom(p1[i]);
ret[i] = assertion;
}
success(ret);
}
}, failure);
};
prototype.getSubject = function() {
if (this.subject == null)
return null;
var v = new EcEncryptedValue();
v.copyFrom(this.subject);
var decryptedString = v.decryptIntoString();
if (decryptedString == null)
return null;
return EcPk.fromPem(decryptedString);
};
/**
* Sets the subject of an assertion. Makes a few assumptions: Owners of the
* object should be able to see and change the encrypted value. Owners and
* readers of the object should be persisted.
*
* @param pk
*/
prototype.setSubject = function(pk) {
var owners = new Array();
var readers = this.reader;
if (readers == null)
readers = new Array();
if (this.subject != null) {
if (this.subject.owner != null)
owners.concat(this.subject.owner);
if (this.subject.reader != null)
readers.concat(this.subject.reader);
}
if (this.owner != null)
owners = owners.concat(this.owner);
readers.push(pk.toPem());
this.subject = EcEncryptedValue.encryptValue(pk.toPem(), this.id, owners, readers);
};
prototype.getSubjectAsync = function(success, failure) {
if (this.subject == null) {
success(null);
return;
}
var v = new EcEncryptedValue();
v.copyFrom(this.subject);
v.decryptIntoStringAsync(function(decryptedString) {
if (decryptedString == null)
failure("Could not decrypt subject.");
else
success(EcPk.fromPem(decryptedString));
}, failure);
};
prototype.getAgent = function() {
if (this.agent == null)
return null;
var v = new EcEncryptedValue();
v.copyFrom(this.agent);
var decryptedString = v.decryptIntoString();
if (decryptedString == null)
return null;
return EcPk.fromPem(decryptedString);
};
prototype.setAgent = function(pk) {
this.agent = EcEncryptedValue.encryptValue(pk.toPem(), this.id, this.subject.owner, this.subject.reader);
};
prototype.getAgentAsync = function(success, failure) {
if (this.agent == null) {
success(null);
return;
}
var v = new EcEncryptedValue();
v.copyFrom(this.agent);
v.decryptIntoStringAsync(function(decryptedString) {
if (decryptedString == null)
failure("Could not decrypt agent.");
else
success(EcPk.fromPem(decryptedString));
}, failure);
};
prototype.getSubjectName = function() {
if (this.subject == null)
return "Nobody";
var subjectPk = this.getSubject();
var identity = EcIdentityManager.getIdentity(subjectPk);
if (identity != null && identity.displayName != null)
return identity.displayName + " (You)";
var contact = EcIdentityManager.getContact(subjectPk);
if (contact == null || contact.displayName == null)
return "Unknown Subject";
return contact.displayName;
};
prototype.getSubjectNameAsync = function(success, failure) {
if (this.subject == null) {
success("Nobody");
return;
}
this.getSubjectAsync(function(subjectPk) {
var identity = EcIdentityManager.getIdentity(subjectPk);
if (identity != null && identity.displayName != null) {
success(identity.displayName + " (You)");
return;
}
var contact = EcIdentityManager.getContact(subjectPk);
if (contact == null || contact.displayName == null) {
success("Unknown Subject");
return;
}
success(contact.displayName);
}, failure);
};
prototype.getAgentName = function() {
if (this.agent == null)
return "Nobody";
var agentPk = this.getAgent();
var identity = EcIdentityManager.getIdentity(agentPk);
if (identity != null && identity.displayName != null)
return identity.displayName + " (You)";
var contact = EcIdentityManager.getContact(agentPk);
if (contact == null || contact.displayName == null)
return "Unknown Agent";
return contact.displayName;
};
prototype.getAgentNameAsync = function(success, failure) {
if (this.subject == null) {
success("Nobody");
return;
}
this.getAgentAsync(function(subjectPk) {
var identity = EcIdentityManager.getIdentity(subjectPk);
if (identity != null && identity.displayName != null) {
success(identity.displayName + " (You)");
return;
}
var contact = EcIdentityManager.getContact(subjectPk);
if (contact == null || contact.displayName == null) {
success("Unknown Agent");
return;
}
success(contact.displayName);
}, failure);
};
prototype.getAssertionDate = function() {
if (this.assertionDate == null)
return null;
var v = new EcEncryptedValue();
v.copyFrom(this.assertionDate);
var decryptedString = v.decryptIntoString();
if (decryptedString == null)
return null;
return Long.parseLong(decryptedString);
};
prototype.setAssertionDate = function(assertionDateMs) {
this.assertionDate = EcEncryptedValue.encryptValue(assertionDateMs.toString(), this.id, this.subject.owner, this.subject.reader);
};
prototype.getAssertionDateAsync = function(success, failure) {
if (this.assertionDate == null) {
success(null);
return;
}
var v = new EcEncryptedValue();
v.copyFrom(this.assertionDate);
v.decryptIntoStringAsync(function(decryptedString) {
if (decryptedString == null)
failure("Could not decrypt assertion date.");
else
success(Long.parseLong(decryptedString));
}, failure);
};
prototype.getExpirationDate = function() {
if (this.expirationDate == null)
return null;
var v = new EcEncryptedValue();
v.copyFrom(this.expirationDate);
var decryptedString = v.decryptIntoString();
if (decryptedString == null)
return null;
return Long.parseLong(decryptedString);
};
prototype.setExpirationDate = function(expirationDateMs) {
this.expirationDate = EcEncryptedValue.encryptValue(expirationDateMs.toString(), this.id, this.subject.owner, this.subject.reader);
};
prototype.getExpirationDateAsync = function(success, failure) {
if (this.expirationDate == null) {
success(null);
return;
}
var v = new EcEncryptedValue();
v.copyFrom(this.expirationDate);
v.decryptIntoStringAsync(function(decryptedString) {
if (decryptedString == null)
failure("Could not decrypt expiration date.");
else
success(Long.parseLong(decryptedString));
}, failure);
};
prototype.getEvidenceCount = function() {
if (this.evidence == null)
return 0;
return this.evidence.length;
};
prototype.getEvidence = function(index) {
if (this.evidence == null)
return null;
var v = new EcEncryptedValue();
v.copyFrom(this.evidence[index]);
var decryptedString = v.decryptIntoString();
return decryptedString;
};
prototype.getEvidenceAsync = function(index, success, failure) {
if (this.evidence[index] == null) {
success(null);
return;
}
var v = new EcEncryptedValue();
v.copyFrom(this.evidence[index]);
v.decryptIntoStringAsync(function(decryptedString) {
if (decryptedString == null)
failure("Could not decrypt evidence.");
else
success(decryptedString);
}, failure);
};
prototype.getDecayFunction = function() {
if (this.decayFunction == null)
return null;
var v = new EcEncryptedValue();
v.copyFrom(this.decayFunction);
var decryptedString = v.decryptIntoString();
if (decryptedString == null)
return null;
return decryptedString;
};
prototype.setDecayFunction = function(decayFunctionText) {
this.decayFunction = EcEncryptedValue.encryptValue(decayFunctionText.toString(), this.id, this.subject.owner, this.subject.reader);
};
prototype.getDecayFunctionAsync = function(success, failure) {
if (this.decayFunction == null) {
success(null);
return;
}
var v = new EcEncryptedValue();
v.copyFrom(this.decayFunction);
v.decryptIntoStringAsync(function(decryptedString) {
if (decryptedString == null)
failure("Could not decrypt decay function.");
else
success(decryptedString);
}, failure);
};
prototype.getNegative = function() {
if (this.negative == null)
return false;
var v = new EcEncryptedValue();
v.copyFrom(this.negative);
var decryptedString = v.decryptIntoString();
if (decryptedString != null)
decryptedString.toLowerCase();
return "true".equals(decryptedString);
};
prototype.setNegative = function(negativeB) {
this.negative = EcEncryptedValue.encryptValue(negativeB.toString(), this.id, this.subject.owner, this.subject.reader);
};
prototype.getNegativeAsync = function(success, failure) {
if (this.negative == null) {
success(null);
return;
}
var v = new EcEncryptedValue();
v.copyFrom(this.negative);
v.decryptIntoStringAsync(function(decryptedString) {
if (decryptedString == null) {
failure("Could not decrypt negative.");
return;
}
if (decryptedString != null)
decryptedString.toLowerCase();
success("true".equals(decryptedString));
}, failure);
};
prototype.setCompetency = function(competencyUrl) {
this.competency = competencyUrl;
};
prototype.setLevel = function(levelUrl) {
this.level = levelUrl;
};
prototype.setConfidence = function(confidenceZeroToOne) {
this.confidence = confidenceZeroToOne;
};
prototype.setEvidence = function(evidences) {
var encryptedValues = new Array();
for (var i = 0; i < evidences.length; i++)
encryptedValues.push(EcEncryptedValue.encryptValue(evidences[i], this.id, this.subject.owner, this.subject.reader));
this.evidence = encryptedValues;
};
prototype.save = function(success, failure) {
if (this.competency == null || this.competency == "") {
var msg = "Failing to save: Competency cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.subject == null) {
var msg = "Failing to save: Subject cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.agent == null) {
var msg = "Failing to save: Agent cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.confidence == null) {
var msg = "Failing to save: Confidence cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.assertionDate == null) {
var msg = "Failing to save: Assertion Date cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.decayFunction == null) {
var msg = "Failing to save: Decay Function cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
EcRepository.save(this, success, failure);
};
prototype.addReader = function(newReader) {
if (this.agent != null) {
this.agent = EcEncryptedValue.revive(this.agent);
this.agent.addReader(newReader);
}
if (this.assertionDate != null) {
this.assertionDate = EcEncryptedValue.revive(this.assertionDate);
this.assertionDate.addReader(newReader);
}
if (this.decayFunction != null) {
this.decayFunction = EcEncryptedValue.revive(this.decayFunction);
this.decayFunction.addReader(newReader);
}
if (this.evidence != null)
for (var i = 0; i < this.evidence.length; i++) {
this.evidence[i] = EcEncryptedValue.revive(this.evidence[i]);
this.evidence[i].addReader(newReader);
}
if (this.expirationDate != null) {
this.expirationDate = EcEncryptedValue.revive(this.expirationDate);
this.expirationDate.addReader(newReader);
}
if (this.negative != null) {
this.negative = EcEncryptedValue.revive(this.negative);
this.negative.addReader(newReader);
}
if (this.subject != null) {
this.subject = EcEncryptedValue.revive(this.subject);
this.subject.addReader(newReader);
}
EcRemoteLinkedData.prototype.addReader.call(this, newReader);
};
prototype.removeReader = function(newReader) {
if (this.agent != null) {
this.agent = EcEncryptedValue.revive(this.agent);
this.agent.removeReader(newReader);
}
if (this.assertionDate != null) {
this.assertionDate = EcEncryptedValue.revive(this.assertionDate);
this.assertionDate.removeReader(newReader);
}
if (this.decayFunction != null) {
this.decayFunction = EcEncryptedValue.revive(this.decayFunction);
this.decayFunction.removeReader(newReader);
}
if (this.evidence != null)
for (var i = 0; i < this.evidence.length; i++) {
this.evidence[i] = EcEncryptedValue.revive(this.evidence[i]);
this.evidence[i].removeReader(newReader);
}
if (this.expirationDate != null) {
this.expirationDate = EcEncryptedValue.revive(this.expirationDate);
this.expirationDate.removeReader(newReader);
}
if (this.negative != null) {
this.negative = EcEncryptedValue.revive(this.negative);
this.negative.removeReader(newReader);
}
if (this.subject != null) {
this.subject = EcEncryptedValue.revive(this.subject);
this.subject.removeReader(newReader);
}
EcRemoteLinkedData.prototype.removeReader.call(this, newReader);
};
prototype.getSearchStringByTypeAndCompetency = function(competency) {
return "(" + this.getSearchStringByType() + " AND competency:\"" + competency.shortId() + "\")";
};
}, {subject: "EcEncryptedValue", agent: "EcEncryptedValue", evidence: {name: "Array", arguments: ["EcEncryptedValue"]}, assertionDate: "EcEncryptedValue", expirationDate: "EcEncryptedValue", decayFunction: "EcEncryptedValue", negative: "EcEncryptedValue", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Implementation of a Rollup Rule object with methods for interacting with CASS
* services on a server.
*
* @author fritz.ray@eduworks.com
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class EcRollupRule
* @constructor
* @extends RollupRule
*/
var EcRollupRule = function() {
RollupRule.call(this);
};
EcRollupRule = stjs.extend(EcRollupRule, RollupRule, [], function(constructor, prototype) {
/**
* Retrieves a rollup rule from the server
*
* @param {String} id
* ID of the rollup rule to retrieve
* @param {Callback1<EcRollupRule>} success
* Callback triggered on successful retrieving rollup rule,
* returns the rollup rule
* @param {Callback1<String>} failure
* Callback triggered if error retrieving rollup rule
* @memberOf EcRollupRule
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
if (success == null)
return;
if (!p1.isA(EcRollupRule.myType)) {
if (failure != null)
failure("Resultant object is not a level.");
return;
}
var c = new EcRollupRule();
c.copyFrom(p1);
success(c);
}, function(p1) {
if (failure != null)
failure(p1);
});
};
/**
* Searches for levels with a string query
*
* @param {EcRepository} repo
* Repository to search for levels
* @param {String} query
* query string to use in search
* @param {Callback1<Array<EcRollupRule>>} success
* Callback triggered when searches successfully
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while searching
* @param {Object} paramObj
* Search parameters object to pass in
* @param size
* @param start
* @memberOf EcRollupRule
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = "";
queryAdd = new EcRollupRule().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var rule = new EcRollupRule();
if (p1[i].isAny(rule.getTypes())) {
rule.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcRollupRule.myType)) {
var obj = val.decryptIntoObject();
rule.copyFrom(obj);
EcEncryptedValue.encryptOnSave(rule.id, true);
}
}
ret[i] = rule;
}
success(ret);
}
}, failure);
};
/**
* Method for setting a rollup rule name
*
* @param name
* @memberOf EcRollupRule
* @method setName
*/
prototype.setName = function(name) {
this.name = name;
};
/**
* Method for setting a rollup rule description
*
* @param {String} description
* @memberOf EcRollupRule
* @method setDescription
*/
prototype.setDescription = function(description) {
this.description = description;
};
/**
* Saves this rollup rules details on the server specified by its ID
*
* @param {Callback1<String>} success
* Callback triggered on successful save of rollup rule
* @param {Callback1<String>} failure
* Callback triggered if error saving rollup rule
* @memberOf EcRollupRule
* @method save
*/
prototype.save = function(success, failure) {
if (this.rule == null || this.rule == "") {
var msg = "RollupRule Rule cannot be empty";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.competency == null || this.competency == "") {
var msg = "RollupRule's Competency cannot be empty";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
EcRepository.save(this, success, failure);
};
/**
* Deletes this rollup rule from the server specified by it's ID
*
* @param {Callback1<String>} success
* Callback triggered on successful deleting the rollup rle
* @param {Callback1<String>} failure
* Callback triggered if error deleting the rollup rule
* @memberOf EcRollupRule
* @method _delete
*/
prototype._delete = function(success, failure) {
EcRepository.DELETE(this, success, failure);
};
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Implementation of an alignment object with methods for interacting with CASS
* services on a server.
*
* @author fritz.ray@eduworks.com
* @author devlin.junker@eduworks.com
* <p>
* TODO: Test case where an absent relation is in the framework.
* @module org.cassproject
* @class EcAlignment
* @constructor
* @extends Relation
*/
var EcAlignment = function() {
Relation.call(this);
};
EcAlignment = stjs.extend(EcAlignment, Relation, [], function(constructor, prototype) {
/**
* Retrieves the alignment specified with the ID from the server
*
* @param {String} id
* ID of the alignment to retrieve
* @param {Callback1<EcAlignment>} success
* Callback triggered on successfully retrieving the alignment,
* returns the alignment
* @param {Callback1<String>} [failure]
* Callback triggered if error while retrieving alignment
* @memberOf EcAlignment
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
if (stjs.isInstanceOf(p1.constructor, EcAlignment))
if (success != null) {
success(p1);
return;
}
var relation = new EcAlignment();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
}
if (p1.isAny(relation.getTypes())) {
relation.copyFrom(p1);
if (EcRepository.caching) {
(EcRepository.cache)[relation.shortId()] = relation;
(EcRepository.cache)[relation.id] = relation;
}
if (success != null)
success(relation);
} else {
var msg = "Resultant object is not a relation.";
if (failure != null)
failure(msg);
else
console.error(msg);
}
}, failure);
};
/**
* Retrieves an alignment from it's server synchronously, the call
* blocks until it is successful or an error occurs
*
* @param {String} id
* ID of the alignment to retrieve
* @return EcAlignment
* The alignment retrieved
* @memberOf EcAlignment
* @method getBlocking
* @static
*/
constructor.getBlocking = function(id) {
var p1 = EcRepository.getBlocking(id);
if (p1 == null)
return null;
if (stjs.isInstanceOf(p1.constructor, EcAlignment))
return p1;
var alignment = new EcAlignment();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(alignment.getTypes())) {
alignment.copyFrom(p1);
if (EcRepository.caching) {
(EcRepository.cache)[alignment.shortId()] = alignment;
(EcRepository.cache)[alignment.id] = alignment;
}
return alignment;
} else {
var msg = "Retrieved object was not a relation";
console.error(msg);
return null;
}
};
/**
* Searches the repository using the query and optional parameters provided
*
* @param {EcRepository} repo
* Repository to search using the query provided
* @param {String} query
* The query to send to the search
* @param {Callback1<Array<EcAlignment>>} success
* Callback triggered on successful search return
* @param {Callback1<String>} [failure]
* Callback triggered if error searching
* @param {Object} [paramObj]
* Parameters to include in the search
* @param start
* @param size
* @memberOf EcAlignment
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = new EcAlignment().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var alignment = new EcAlignment();
if (p1[i].isAny(alignment.getTypes())) {
alignment.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcAlignment.myType)) {
var obj = val.decryptIntoObject();
alignment.copyFrom(obj);
}
}
ret[i] = alignment;
}
success(ret);
}
}, failure);
};
/**
* Searches the repository for alignments with a specific ID in the source field
*
* @param {EcRepository} repo
* Repository to search for alignments with the source specified
* @param {String} sourceId
* ID in the source field of the alignments to find
* @param {Callback1<Array<EcAlignment>>} success
* Callback triggered on successful search return
* @param {Callback1<String>} [failure]
* Callback triggered if error searching
* @param {Object} [paramObj]
* Parameters to include in the search
* @param start
* @param size
* @memberOf EcAlignment
* @method searchBySource
* @static
*/
constructor.searchBySource = function(repo, sourceId, success, failure, paramObj) {
var query = "";
query = "(" + new EcAlignment().getSearchStringByType();
var noVersion = EcRemoteLinkedData.trimVersionFromUrl(sourceId);
if (noVersion == sourceId) {
query += " AND (source:\"" + sourceId + "\"))";
} else {
query += " AND (source:\"" + sourceId + "\" OR source:\"" + noVersion + "\"))";
}
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var alignment = new EcAlignment();
if (p1[i].isAny(alignment.getTypes())) {
alignment.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcAlignment.myType)) {
var obj = val.decryptIntoObject();
if ((obj)["source"] != sourceId && (obj)["source"] != noVersion) {
continue;
}
alignment.copyFrom(obj);
}
}
ret[i] = alignment;
}
success(ret);
}
}, failure);
};
/**
* Searches the repository for alignments with one of an array of IDs in the source field
*
* @param {EcRepository} repo
* Repository to search for alignments with the source specified
* @param {String} sourceId
* ID in the source field of the alignments to find
* @param {Callback1<Array<EcAlignment>>} success
* Callback triggered on successful search return
* @param {Callback1<String>} [failure]
* Callback triggered if error searching
* @param {Object} [paramObj]
* Parameters to include in the search
* @param start
* @param size
* @memberOf EcAlignment
* @method searchBySource
* @static
*/
constructor.searchBySources = function(repo, sourceIds, success, failure, paramObj) {
var query = "";
query = "(" + new EcAlignment().getSearchStringByType() + " AND (source:";
var noVersions = [];
for (var i = 0; i < sourceIds.length; i++) {
var sourceId = sourceIds[i];
if (i != 0)
query += " OR ";
var noVersion = EcRemoteLinkedData.trimVersionFromUrl(sourceId);
if (noVersion == sourceId) {
query += "\"" + sourceId + "\"";
} else {
query += "\"" + sourceId + "\" OR source:\"" + noVersion + "\"";
}
noVersions.push(noVersion);
}
query += "))";
var finalNoVersions = noVersions;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var alignment = new EcAlignment();
if (p1[i].isAny(alignment.getTypes())) {
alignment.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcAlignment.myType)) {
var obj = val.decryptIntoObject();
if (sourceIds.indexOf((obj)["source"]) == -1 && finalNoVersions.indexOf((obj)["source"]) == -1) {
continue;
}
alignment.copyFrom(obj);
}
}
ret[i] = alignment;
}
success(ret);
}
}, failure);
};
/**
* Searches the repository for alignments with a specific ID in the target field
*
* @param {EcRepository} repo
* Repository to search for alignments with the source specified
* @param {String} competencyId
* ID in the target field of the alignments to find
* @param {Callback1<Array<EcAlignment>>} success
* Callback triggered on successful search return
* @param {Callback1<String>} [failure]
* Callback triggered if error searching
* @param {Object} [paramObj]
* Parameters to include in the search
* @memberOf EcAlignment
* @method searchByCompetency
* @static
*/
constructor.searchByCompetency = function(repo, competencyId, success, failure, paramObj) {
var query = "";
query = "(" + new EcAlignment().getSearchStringByType();
var noVersion = EcRemoteLinkedData.trimVersionFromUrl(competencyId);
if (noVersion == competencyId) {
query += " AND (source:\"" + competencyId + "\" OR target:\"" + competencyId + "\"))";
} else {
query += " AND (source:\"" + competencyId + "\" OR source:\"" + noVersion + "\" OR target:\"" + competencyId + "\" OR target:\"" + noVersion + "\"))";
}
query += " OR @encryptedType:\"" + EcAlignment.myType + "\" OR @encryptedType:\"" + EcAlignment.myType.replace(Cass.context + "/", "") + "\")";
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var alignment = new EcAlignment();
if (p1[i].isAny(alignment.getTypes())) {
alignment.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcAlignment.myType)) {
var obj = val.decryptIntoObject();
if ((obj)["source"] != competencyId && (obj)["source"] != noVersion && (obj)["target"] != competencyId && (obj)["target"] != noVersion) {
continue;
}
alignment.copyFrom(obj);
}
}
ret[i] = alignment;
}
success(ret);
}
}, failure);
};
/**
* Setter for alignment name
*
* @param {String} name
* name to give this alignment
* @memberOf EcAlignment
* @method setName
*/
prototype.setName = function(name) {
this.name = name;
};
/**
* Setter for alignment description
*
* @param {String} description
* description to give this alignment
* @memberOf EcAlignment
* @method setDescription
*/
prototype.setDescription = function(description) {
this.description = description;
};
/**
* Saves this alignment details on the server corresponding to its ID
*
* @param {Callback1<String>} success
* Callback triggered on successfully saving the alignment
* @param {Callback1<String>} [failure]
* Callback triggered if error while saving alignment
* @memberOf EcAlignment
* @method save
*/
prototype.save = function(success, failure) {
if (this.source == null || this.source == "") {
var msg = "Source Competency cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.target == null || this.target == "") {
var msg = "Target Competency cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.relationType == null || this.relationType == "") {
var msg = "Relation Type cannot be missing";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
EcRepository.save(this, success, failure);
};
/**
* Deletes the alignment from the server corresponding to its ID
*
* @param {Callback1<String>} success
* Callback triggered on successfully deleting the alignment
* @param {Callback1<String>} [failure]
* Callback triggered if error while deleting alignment
* @memberOf EcAlignment
* @method _delete
*/
prototype._delete = function(success, failure) {
EcRepository.DELETE(this, success, failure);
};
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Implementation of a Level object with methods for interacting with CASS
* services on a server.
*
* @author fritz.ray@eduworks.com
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class EcLevel
* @constructor
* @extends Level
*/
var EcLevel = function() {
Level.call(this);
};
EcLevel = stjs.extend(EcLevel, Level, [], function(constructor, prototype) {
/**
* Retrieves a level from the server specified by its ID
*
* @param {String} id
* ID of the level to retrieve
* @param {Callback1<EcLevel>} success
* Callback triggered when successfully retrieving the level,
* returns the level
* @param {Callback1<String>} failure
* Callback triggered if error occurs when retrieving the level
* @memberOf EcLevel
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
var level = new EcLevel();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(level.getTypes())) {
level.copyFrom(p1);
if (success != null)
success(level);
} else {
var msg = "Resultant object is not a level.";
if (failure != null)
failure(msg);
else
console.error(msg);
}
}, failure);
};
/**
* Retrieves a level from it's server synchronously, the call
* blocks until it is successful or an error occurs
*
* @param {String} id
* ID of the level to retrieve
* @return EcLevel
* The level retrieved
* @memberOf EcLevel
* @method getBlocking
* @static
*/
constructor.getBlocking = function(id) {
var p1 = EcRepository.getBlocking(id);
if (p1 == null)
return null;
var level = new EcLevel();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(level.getTypes())) {
level.copyFrom(p1);
return level;
} else {
var msg = "Retrieved object was not a level";
console.error(msg);
return null;
}
};
/**
* Searches for levels with a string query
*
* @param {EcRepository} repo
* Repository to search for levels
* @param {String} query
* query string to use in search
* @param {Callback1<Array<EcLevel>>} success
* Callback triggered when searches successfully
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while searching
* @param {Object} paramObj
* Search parameters object to pass in
* @param size
* @param start
* @memberOf EcLevel
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = "";
queryAdd = new EcLevel().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var level = new EcLevel();
if (p1[i].isAny(level.getTypes())) {
level.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcLevel.myType)) {
var obj = val.decryptIntoObject();
level.copyFrom(obj);
EcEncryptedValue.encryptOnSave(level.id, true);
}
}
ret[i] = level;
}
success(ret);
}
}, failure);
};
/**
* Searches for levels using a competency that the results must be related to
*
* @param {EcRepository} repo
* Repository to search for levels
* @param {String} competencyId
* competency ID that the levels are rleated to
* @param {Callback1<Array<EcLevel>>} success
* Callback triggered when searches successfully
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while searching
* @param {Object} paramObj
* Search parameters object to pass in
* @param size
* @param start
* @memberOf EcLevel
* @method searchByCompetency
* @static
*/
constructor.searchByCompetency = function(repo, competencyId, success, failure, paramObj) {
if (competencyId == null || competencyId == "") {
failure("No Competency Specified");
return;
}
var query = "(" + new EcLevel().getSearchStringByType();
query += " AND ( competency:\"" + competencyId + "\" OR competency:\"" + EcRemoteLinkedData.trimVersionFromUrl(competencyId) + "\"))";
query += " OR @encryptedType:\"" + EcLevel.myType + "\" OR @encryptedType:\"" + EcLevel.myType.replace(Cass.context + "/", "") + "\"";
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var levels = [];
for (var i = 0; i < p1.length; i++) {
var level = new EcLevel();
if (p1[i].isAny(level.getTypes())) {
level.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcLevel.myType)) {
var obj = val.decryptIntoObject();
if ((obj)["competency"] != competencyId) {
continue;
}
level.copyFrom(obj);
EcEncryptedValue.encryptOnSave(level.id, true);
}
}
level.copyFrom(p1[i]);
levels[i] = level;
}
if (success != null)
success(levels);
}
}, failure);
};
/**
* Adds a relationship between this level and a target level to define
* how they correspond to one another
*
* @param {EcLevel} targetLevel
* Target level of the relationship
* @param {String} alignmentType
* Type of relationship
* @param {EcPpk} identity
* Private key that will own the new relationship
* @param {String} server
* URL Prefix of the new relationship ID (Server it will be saved on)
* @memberOf EcLevel
* @method addRelationship
*/
prototype.addRelationship = function(targetLevel, alignmentType, identity, server) {
var a = new EcAlignment();
a.source = this.id;
a.target = targetLevel.id;
a.relationType = alignmentType;
a.addOwner(identity.toPk());
a.generateId(server);
a.signWith(identity);
};
/**
* Method to set the name of this level
*
* @param {String} name
* Name to set on the level
* @memberOf EcLevel
* @method setName
*/
prototype.setName = function(name) {
this.name = name;
};
/**
* Method to set the description of the level
*
* @param {String} description
* Description to set on the level
* @memberOf EcLevel
* @method setDescription
*/
prototype.setDescription = function(description) {
this.description = description;
};
/**
* Saves this levels details to the server
*
* @param {Callback1<String>} success
* Callback triggered on successfully saving the level to the server
* @param {Callback1<String>} failure
* Callback triggered if error occurs while saving the level to the server
* @memberOf EcLevel
* @method save
*/
prototype.save = function(success, failure) {
if (this.name == null || this.name == "") {
var msg = "Level name cannot be empty";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
if (this.competency == null || this.competency == "") {
var msg = "Level's Competency cannot be empty";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
EcRepository.save(this, success, failure);
};
/**
* Deletes the level from it's repository
*
* @param {Callback1<String>} success
* Callback triggered when the level is successfully deleted from the server
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while deleting the level
* @memberOf EcLevel
* @method _delete
*/
prototype._delete = function(success, failure) {
EcRepository.DELETE(this, success, failure);
};
}, {contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Implementation of a Competency object with methods for interacting with CASS
* services on a server.
*
* @author fritz.ray@eduworks.com
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class EcCompetency
* @constructor
* @extends Competency
*/
var EcCompetency = function() {
Competency.call(this);
var me = (this);
if (EcCompetency.template != null) {
var you = (EcCompetency.template);
for (var key in you) {
if ((typeof you[key]) != "function")
me[key.replace("@", "")] = you[key];
}
}
};
EcCompetency = stjs.extend(EcCompetency, Competency, [], function(constructor, prototype) {
constructor.relDone = {};
constructor.levelDone = {};
constructor.template = null;
/**
* Retrieves a competency from it's server asynchronously
*
* @param {String} id
* ID of the competency to retrieve from the server
* @param {Callback1<String>} success
* Callback triggered after retrieving the competency,
* returns the competency retrieved
* @param {Callback1<String>} failure
* Callback triggered if error retrieving competency
* @memberOf EcCompetency
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
if (stjs.isInstanceOf(p1.constructor, EcCompetency))
if (success != null) {
success(p1);
return;
}
var competency = new EcCompetency();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(competency.getTypes())) {
competency.copyFrom(p1);
if (EcRepository.caching) {
(EcRepository.cache)[competency.shortId()] = competency;
(EcRepository.cache)[competency.id] = competency;
}
if (success != null)
success(competency);
} else {
var msg = "Retrieved object was not a competency";
if (failure != null)
failure(msg);
else
console.error(msg);
}
}, failure);
};
/**
* Retrieves a competency from it's server synchronously, the call
* blocks until it is successful or an error occurs
*
* @param {String} id
* ID of the competency to retrieve
* @return EcCompetency
* The competency retrieved
* @memberOf EcCompetency
* @method getBlocking
* @static
*/
constructor.getBlocking = function(id) {
var p1 = EcRepository.getBlocking(id);
if (p1 == null)
return null;
var competency = new EcCompetency();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(competency.getTypes())) {
competency.copyFrom(p1);
return competency;
} else {
var msg = "Retrieved object was not a competency";
console.error(msg);
return null;
}
};
/**
* Searches a repository for competencies that match the search query
*
* @param {EcRepository} repo
* Repository to search using the query
* @param {String} query
* Query string to pass to the search web service
* @param {Callback1<Array<EcCompetency>> success
* Callback triggered after completing the search, returns the results
* @param {Callback1<String>} failure
* Callback triggered if error searching
* @param {Object} paramObj
* Parameter object for search
* @param start
* @param size
* @memberOf EcCompetency
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = "";
queryAdd = new EcCompetency().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var comp = new EcCompetency();
if (p1[i].isAny(comp.getTypes())) {
comp.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcCompetency.myType)) {
var obj = val.decryptIntoObject();
comp.copyFrom(obj);
EcEncryptedValue.encryptOnSave(comp.id, true);
}
}
ret[i] = comp;
}
success(ret);
}
}, failure);
};
/**
* Adds a new alignment on the server specified with this competency as its
* source and the specified target competency
*
* @param {EcCompetency} target
* Competency to be related with
* @param {String} alignmentType
* String defining the relationship type
* @param {EcPpk} owner
* Private Key that will own the relationship created
* @param {String} server
* URL Prefix of the new relationship (Server it will be saved on)
* @param {Callback1<String>} success
* Callback triggered after successfully creating and saving the relationship
* @param {Callback1<String>} [failure]
* Callback triggered if error creating and saving relationship
* @return EcAlignment
* Created relationship
* @memberOf EcCompetency
* @method addAlignment
*/
prototype.addAlignment = function(target, alignmentType, owner, server, success, failure) {
var a = new EcAlignment();
a.generateId(server);
a.source = this.shortId();
a.target = target.shortId();
a.relationType = alignmentType;
a.addOwner(owner.toPk());
EcRepository.save(a, success, failure);
return a;
};
/**
* Searches the repository given for any relationships that contain this competency
*
* @param {EcRepository} repo
* Repository to search for relationships
* @param {Callback1<EcAlignment>} eachSuccess
* Callback triggered for each relationship found
* @param {Callback1<String>} failure
* Callback triggered if an error finding relationships
* @param {Callback1<Array<EcAlignment>>} successAll
* Callback triggered once all of the relationships have been found
* @memberOf EcCompetency
* @method relations
*/
prototype.relations = function(repo, eachSuccess, failure, successAll) {
this.relationships(repo, eachSuccess, failure, successAll);
};
/**
* Searches the repository given for any relationships that contain this competency
*
* @param {EcRepository} repo
* Repository to search for relationships
* @param {Callback1<EcAlignment>} eachSuccess
* Callback triggered for each relationship found
* @param {Callback1<String>} failure
* Callback triggered if an error finding relationships
* @param {Callback1<Array<EcAlignment>>} successAll
* Callback triggered once all of the relationships have been found
* @memberOf EcCompetency
* @method relations
* @deprecated
*/
prototype.relationships = function(repo, eachSuccess, failure, successAll) {
repo.search(new EcAlignment().getSearchStringByType() + " AND (source:\"" + this.id + "\" OR target:\"" + this.id + "\" OR source:\"" + this.shortId() + "\" OR target:\"" + this.shortId() + "\")", function(p1) {
var a = new EcAlignment();
a.copyFrom(p1);
if (eachSuccess != null)
eachSuccess(a);
}, function(p1) {
if (successAll != null) {
var rels = [];
for (var i = 0; i < p1.length; i++) {
var a = new EcAlignment();
a.copyFrom(p1[i]);
rels[i] = a;
}
if (successAll != null)
successAll(rels);
}
}, failure);
};
/**
* Adds a new level on the server specified for this competency.
*
* @param {String} name
* Name of the new level to create
* @param {String} description
* Description of the new level to create
* @param {String} owner
* Private key of the owner of the new level
* @param {String} server
* URL Prefix for the new level's ID (Server saved on)
* @param {Callback1<String>} success
* Callback triggered after successfully creating and saving the level
* @param {Callback1<String>} failure
* Callback triggered if an error creating and saving the level
* @return EcLevel
* Level created
* @memberOf EcCompetency
* @method addLevel
*/
prototype.addLevel = function(name, description, owner, server, success, failure) {
var l = new EcLevel();
l.generateId(server);
l.competency = this.shortId();
l.description = description;
l.name = name;
l.addOwner(owner.toPk());
EcRepository.save(l, success, failure);
return l;
};
/**
* Searches the repository given for any levels of this competency
*
* @param {EcRepository} repo
* Repository to search for levels
* @param {Callback1<EcLevel>} success
* Callback triggered for each level found
* @param {Callback1<String>} failure
* Callback triggered if an error finding levels
* @param {Callback1<Array<EcLevel>>} successAll
* Callback triggered once all of the levels have been found
* @memberOf EcCompetency
* @method levels
*/
prototype.levels = function(repo, success, failure, successAll) {
var query = "(" + new EcLevel().getSearchStringByType() + " AND ( competency:\"" + this.id + "\" OR competency:\"" + this.shortId() + "\"))";
query += " OR @encryptedType:\"" + EcLevel.myType + "\" OR @encryptedType:\"" + EcLevel.myType.replace(Cass.context + "/", "") + "\"";
var competencyId = this.id;
var shortId = this.shortId();
repo.search(query, function(p1) {
if (success != null) {
var a = new EcLevel();
if (p1.isA(EcLevel.myType)) {
a.copyFrom(p1);
} else if (p1.isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1);
if (val.isAnEncrypted(EcLevel.myType)) {
var obj = val.decryptIntoObject();
if ((obj)["competency"] != competencyId && (obj)["competency"] != shortId) {
return;
}
a.copyFrom(obj);
EcEncryptedValue.encryptOnSave(a.id, true);
}
}
success(a);
}
}, function(p1) {
if (successAll != null) {
var levels = [];
for (var i = 0; i < p1.length; i++) {
var a = new EcLevel();
if (p1[i].isA(EcLevel.myType)) {
a.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcLevel.myType)) {
var obj = val.decryptIntoObject();
if ((obj)["competency"] != competencyId && (obj)["competency"] != shortId) {
continue;
}
a.copyFrom(obj);
EcEncryptedValue.encryptOnSave(a.id, true);
}
}
levels[i] = a;
}
if (successAll != null)
successAll(levels);
}
}, failure);
};
/**
* Adds a new rollup rule on the server specified for this competency
*
* @param {String} name
* Name of the rollup rule to create
* @param {String} description
* Description of the rollup rule to create
* @param {EcPpk} owner
* Private key that will own the new rollup rule
* @param {String} server
* URL Prefix for the new rollup rule's ID (Server that it will be saved on)
* @param {Callback1<String>} success
* Callback triggered if successfully save the rollup rule
* @param {Callback1<String>} failure
* Callback triggered fi error during save of rollup rule
* @return EcRollupRule
* Created rollup rule
* @memberOf EcCompetency
* @method addRollupRule
*/
prototype.addRollupRule = function(name, description, owner, server, success, failure) {
var r = new EcRollupRule();
r.generateId(server);
r.competency = this.shortId();
r.description = description;
r.name = name;
r.addOwner(owner.toPk());
EcRepository.save(r, success, failure);
return r;
};
/**
* Searches the repository given for any rollup rules of this competency
*
* @param {EcRepository} repo
* Repository to search for levels
* @param {Callback1<EcRollupRule>} success
* Callback triggered for each rollup rule found
* @param {Callback1<String>} failure
* Callback triggered if an error finding rollup rule
* @param {Callback1<Array<EcRollupRule>} successAll
* Callback triggered once all of the rollup rules have been found
* @memberOf EcCompetency
* @method rollupRules
*/
prototype.rollupRules = function(repo, success, failure, successAll) {
var query = "(" + new EcRollupRule().getSearchStringByType() + " AND ( competency:\"" + this.id + "\" OR competency:\"" + this.shortId() + "\"))";
query += " OR @encryptedType:\"" + EcRollupRule.myType + "\" OR @encryptedType:\"" + EcRollupRule.myType.replace(Cass.context + "/", "") + "\"";
var competencyId = this.id;
var shortId = this.shortId();
repo.search(query, function(p1) {
if (success != null) {
var a = new EcRollupRule();
if (p1.isA(EcRollupRule.myType)) {
a.copyFrom(p1);
} else if (p1.isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1);
if (val.isAnEncrypted(EcRollupRule.myType)) {
var obj = val.decryptIntoObject();
if ((obj)["competency"] != competencyId && (obj)["competency"] != shortId) {
return;
}
a.copyFrom(obj);
EcEncryptedValue.encryptOnSave(a.id, true);
}
}
success(a);
}
}, function(p1) {
if (successAll != null) {
var rollupRules = [];
for (var i = 0; i < p1.length; i++) {
var a = new EcRollupRule();
if (p1[i].isA(EcRollupRule.myType)) {
a.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcRollupRule.myType)) {
var obj = val.decryptIntoObject();
if ((obj)["competency"] != competencyId && (obj)["competency"] != shortId) {
continue;
}
a.copyFrom(obj);
EcEncryptedValue.encryptOnSave(a.id, true);
}
}
rollupRules[i] = a;
}
if (successAll != null)
successAll(rollupRules);
}
}, failure);
};
/**
* Method to set competency scope
*
* @param {String} scope
* Scope to set for its competency
* @memberOf EcCompetency
* @method setScope
*/
prototype.setScope = function(scope) {
this.scope = scope;
};
/**
* Saves the competency details to the server
*
* @param {Callback1<String>} success
* Callback triggered on successfully saving the competency
* @param {Callback1<String>} failure
* Callback triggered if error saving competency
* @memberOf EcCompetency
* @method save
*/
prototype.save = function(success, failure) {
if (this.name == null || this.name == "") {
var msg = "Competency Name can not be empty";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
EcRepository.save(this, success, failure);
};
/**
* Deletes the competency from the server
* <p>
* TODO: Delete rollup rules?
*
* @param {Callback1<String>} success
* Callback triggered on successful deleting the competency
* @param {Callback1<String>} failure
* Callback triggered if error deleting the competency
* @param {EcRepository} repo
* Repository to delete from and to check for levels or relationships to delete
* @memberOf EcCompetency
* @method _delete
*/
prototype._delete = function(success, failure, repo) {
var me = this;
EcRepository.DELETE(this, function(p1) {
if (repo != null) {
me.relationships(repo, function(p1) {
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (p1.canEdit(EcIdentityManager.ids[i].ppk.toPk())) {
p1._delete(null, function(p1) {
if (failure != null)
failure("Unable to Delete Competency Relation");
else
console.error("Unable to Delete Competency Relation");
});
return;
}
}
}, failure, function(p1) {
if (EcCompetency.levelDone[this.id]) {
if (success != null)
success("");
} else {
EcCompetency.relDone[this.id] = true;
}
});
me.levels(repo, function(p1) {
for (var i = 0; i < EcIdentityManager.ids.length; i++) {
if (p1.canEdit(EcIdentityManager.ids[i].ppk.toPk())) {
p1._delete(null, function(p1) {
if (failure != null)
failure("Unable to Delete Competency Relation");
else
console.error("Unable to Delete Competency Relation");
});
return;
}
}
}, failure, function(p1) {
if (EcCompetency.relDone[this.id]) {
if (success != null)
success("");
} else {
EcCompetency.levelDone[this.id] = true;
}
});
} else {
if (success != null)
success(p1);
}
}, failure);
};
}, {relDone: {name: "Map", arguments: [null, null]}, levelDone: {name: "Map", arguments: [null, null]}, template: "Object", contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Implementation of a Framework object with methods for interacting with CASS
* services on a server.
*
* @author fritz.ray@eduworks.com
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class EcFramework
* @constructor
* @extends Framework
*/
var EcFramework = function() {
Framework.call(this);
var me = (this);
if (EcFramework.template != null) {
var you = (EcFramework.template);
for (var key in you) {
if ((typeof you[key]) != "function")
me[key.replace("@", "")] = you[key];
}
}
};
EcFramework = stjs.extend(EcFramework, Framework, [], function(constructor, prototype) {
constructor.relDone = {};
constructor.levelDone = {};
constructor.template = null;
/**
* Retrieves a framework from the server, specified by the ID
*
* @param {String} id
* ID of the framework to retrieve
* @param {Callback1<EcFramework>} success
* Callback triggered after successfully retrieving the framework,
* returns the retrieved framework
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while retrieving the framework
* @memberOf EcFramework
* @method get
* @static
*/
constructor.get = function(id, success, failure) {
EcRepository.get(id, function(p1) {
var framework = new EcFramework();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(framework.getTypes())) {
framework.copyFrom(p1);
if (success != null)
success(framework);
} else {
var msg = "Resultant object is not a framework.";
if (failure != null)
failure(msg);
else
console.error(msg);
}
}, function(p1) {
if (failure != null)
failure(p1);
});
};
/**
* Retrieves a framework from the server in a blocking fashion, specified by the ID
*
* @param {String} id
* ID of the framework to retrieve
* @param {Callback1<EcFramework>} success
* Callback triggered after successfully retrieving the framework,
* returns the retrieved framework
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while retrieving the framework
* @memberOf EcFramework
* @method getBlocking
* @static
*/
constructor.getBlocking = function(id) {
var p1 = EcRepository.getBlocking(id);
if (p1 == null)
return null;
var framework = new EcFramework();
if (p1.isA(EcEncryptedValue.myType)) {
var encrypted = new EcEncryptedValue();
encrypted.copyFrom(p1);
p1 = encrypted.decryptIntoObject();
EcEncryptedValue.encryptOnSave(p1.id, true);
}
if (p1.isAny(framework.getTypes())) {
framework.copyFrom(p1);
return framework;
} else {
return null;
}
};
/**
* Searches the repository given for frameworks using the query passed in
*
* @param {EcRepository} repo
* Repository to search for frameworks
* @param {String} query
* Query string used to search for a framework
* @param {Callback1<Array<EcFramework>} success
* Callback triggered when the search successfully returns,
* returns search results
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while searching
* @param {Object} paramObj
* Parameter object for search
* @memberOf EcFramework
* @method search
* @static
*/
constructor.search = function(repo, query, success, failure, paramObj) {
var queryAdd = "";
queryAdd = new EcFramework().getSearchStringByType();
if (query == null || query == "")
query = queryAdd;
else
query = "(" + query + ") AND " + queryAdd;
repo.searchWithParams(query, paramObj, null, function(p1) {
if (success != null) {
var ret = [];
for (var i = 0; i < p1.length; i++) {
var framework = new EcFramework();
if (p1[i].isAny(framework.getTypes())) {
framework.copyFrom(p1[i]);
} else if (p1[i].isA(EcEncryptedValue.myType)) {
var val = new EcEncryptedValue();
val.copyFrom(p1[i]);
if (val.isAnEncrypted(EcFramework.myType)) {
var obj = val.decryptIntoObject();
framework.copyFrom(obj);
EcEncryptedValue.encryptOnSave(framework.id, true);
}
}
ret[i] = framework;
}
success(ret);
}
}, failure);
};
/**
* Adds the competency ID specified to the frameworks list of competency IDs
*
* @param {String} id
* ID of the competency to add
* @memberOf EcFramework
* @method addCompetency
*/
prototype.addCompetency = function(id) {
id = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.competency == null)
this.competency = new Array();
for (var i = 0; i < this.competency.length; i++)
if (EcRemoteLinkedData.trimVersionFromUrl(this.competency[i]).equals(id))
return;
this.competency.push(id);
};
/**
* Removes a competency ID from the framework's list, also removes any
* levels and relations associated with that competency
* <p>
* TODO: remove rollup rules? should we add flag to remove these extras
*
* @param {String} id
* ID of the competency to remove
* @param {Callback1<String>} success
* Callback triggered after succesfully removing the competency and levels and relationships
* @param {Callback1<String>} failure
* Callback triggered if error occurs when removing competency and levels and relationships
* @memberOf EcFramework
* @method removeCompetency
*/
prototype.removeCompetency = function(id, success, failure) {
var shortId = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.competency == null)
this.competency = new Array();
for (var i = 0; i < this.competency.length; i++)
if (this.competency[i].equals(shortId) || this.competency[i].equals(id))
this.competency.splice(i, 1);
if ((this.relation == null || this.relation.length == 0) && (this.level == null || this.level.length == 0))
if (success != null)
success("");
EcFramework.relDone[id] = false;
EcFramework.levelDone[id] = false;
if (this.relation != null) {
this.removeRelationshipsThatInclude(id, 0, function(p1) {
if (EcFramework.levelDone[id]) {
if (success != null)
success(p1);
} else {
EcFramework.relDone[id] = true;
}
}, failure);
} else {
EcFramework.relDone[id] = true;
}
if (this.level != null) {
this.removeLevelsThatInclude(id, 0, function(p1) {
if (EcFramework.relDone[id]) {
if (success != null)
success(p1);
} else {
EcFramework.levelDone[id] = true;
}
}, failure);
} else {
EcFramework.levelDone[id] = true;
}
};
/**
* Helper method to remove relationships associated with a competency from this framework
*
* @param {String} id
* ID of the competency being removed, to find relationships on
* @param {int} i
* recursive index parameter
* @param {Callback1<String>} success
* Callback triggered after all relationships in the framework have been checked
* @param {Callback1<String>} failure
* Callback triggered if error occurs looking through relationships
* @memberOf EcFramework
* @method removeRelationshipsThatInclude
* @private
*/
prototype.removeRelationshipsThatInclude = function(id, i, success, failure) {
var shortId = EcRemoteLinkedData.trimVersionFromUrl(id);
var me = this;
if (i >= this.relation.length && success != null)
success("");
else
EcRepository.get(this.relation[i], function(p1) {
var a = null;
try {
a = new EcAlignment();
a.copyFrom(p1);
}catch (e) {}
if (a != null && a.source == shortId || a.target == shortId || a.source == id || a.target == id) {
me.relation.splice(i, 1);
me.removeRelationshipsThatInclude(id, i, success, failure);
} else
me.removeRelationshipsThatInclude(id, i + 1, success, failure);
}, failure);
};
/**
* Helper method to remove levels associated with a competency from this framework
*
* @param {String} id
* ID of the competency being removed, to find levels on
* @param {int} i
* recursive index parameter
* @param {Callback1<String>} success
* Callback triggered after all levels in the framework have been checked
* @param {Callback1<String>} failure
* Callback triggered if error occurs looking through levels
* @memberOf EcFramework
* @method removeLevelsThatInclude
* @private
*/
prototype.removeLevelsThatInclude = function(id, i, success, failure) {
var shortId = EcRemoteLinkedData.trimVersionFromUrl(id);
var me = this;
if (i >= this.level.length && success != null)
success("");
else
EcRepository.get(this.level[i], function(p1) {
var a = new EcLevel();
a.copyFrom(p1);
if (a.competency == shortId || a.competency == id) {
me.level.splice(i, 1);
me.removeLevelsThatInclude(id, i, success, failure);
} else
me.removeLevelsThatInclude(id, i + 1, success, failure);
}, failure);
};
/**
* Adds a relation ID to the framework's list of relations
*
* @param {String} id
* ID to add to the framework's relation list
* @memberOf EcFramework
* @method addRelation
*/
prototype.addRelation = function(id) {
id = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.relation == null)
this.relation = new Array();
for (var i = 0; i < this.relation.length; i++)
if (EcRemoteLinkedData.trimVersionFromUrl(this.relation[i]).equals(id))
return;
this.relation.push(id);
};
/**
* Removes a relation ID from the framework's list of relations
*
* @param {String} id
* ID to remove from the framework's relation list
* @memberOf EcFramework
* @method removeCompetency
*/
prototype.removeRelation = function(id) {
id = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.relation == null)
this.relation = new Array();
for (var i = 0; i < this.relation.length; i++)
if (EcRemoteLinkedData.trimVersionFromUrl(this.relation[i]).equals(id))
this.relation.splice(i, 1);
};
/**
* Adds a level ID to the framework's list of levels
*
* @param {String} id
* ID of the level to add to framework's list
* @memberOf EcFramework
* @method addLevel
*/
prototype.addLevel = function(id) {
id = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.level == null)
this.level = new Array();
for (var i = 0; i < this.level.length; i++)
if (EcRemoteLinkedData.trimVersionFromUrl(this.level[i]).equals(id))
return;
this.level.push(id);
};
/**
* Removes a level ID from the framework's list of levels
*
* @param {String} id
* ID to remove from framework's level list
* @memberOf EcFramework
* @method removeLevel
*/
prototype.removeLevel = function(id) {
id = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.level == null)
this.level = new Array();
for (var i = 0; i < this.level.length; i++)
if (EcRemoteLinkedData.trimVersionFromUrl(this.level[i]).equals(id))
this.level.splice(i, 1);
};
/**
* Adds a rollup rule ID to the framework's list of rollup rules
*
* @param {String} id
* ID of the rollup rule to add
* @memberOf EcFramework
* @method addRollupRule
*/
prototype.addRollupRule = function(id) {
id = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.rollupRule == null)
this.rollupRule = new Array();
for (var i = 0; i < this.rollupRule.length; i++)
if (EcRemoteLinkedData.trimVersionFromUrl(this.rollupRule[i]).equals(id))
return;
this.rollupRule.push(id);
};
/**
* Removes a rollup rule ID from the framework's list of rollup rules
*
* @param {String} id
* ID to remove from rollup rule list
* @memberOf EcFramework
* @method removeRollupRule
*/
prototype.removeRollupRule = function(id) {
id = EcRemoteLinkedData.trimVersionFromUrl(id);
if (this.rollupRule == null)
this.rollupRule = new Array();
for (var i = 0; i < this.rollupRule.length; i++)
if (EcRemoteLinkedData.trimVersionFromUrl(this.rollupRule[i]).equals(id))
this.rollupRule.splice(i, 1);
};
/**
* Saves this frameworks details on the server specified by it's ID
*
* @param {Callback1<String>} success
* Callback triggered after successfully saving the framework
* @param {Callback1<String>} failure
* Callback triggered if error occurs while saving the framework
* @memberOf EcFramework
* @method save
*/
prototype.save = function(success, failure) {
if (this.name == null || this.name == "") {
var msg = "Framework Name Cannot be Empty";
if (failure != null)
failure(msg);
else
console.error(msg);
return;
}
EcRepository.save(this, success, failure);
};
/**
* Deletes this framework from the server specified by it's ID
*
* @param {Callback1<String>} success
* Callback triggered if successfully deleted framework
* @param {Callback1<String>} failure
* Callback triggered if error occurs when deleting the framework
* @memberOf EcFramework
* @method _delete
*/
prototype._delete = function(success, failure) {
EcRepository.DELETE(this, success, failure);
};
prototype.asAsnJson = function(success, failure, fallbackServerUrl) {
var id = this.id;
var server = this.getServerBaseUrl();
if (server != null && server != undefined && !server.endsWith("/")) {
server = server + "/";
}
EcRemote.getExpectingString(server, "asn?id=" + this.getGuid(), success, function(p1) {
if (fallbackServerUrl != null && fallbackServerUrl != undefined) {
var server = fallbackServerUrl;
if (!server.endsWith("/")) {
server = server + "/";
}
EcRemote.getExpectingString(server, "asn?id=" + id, success, failure);
} else {
failure(p1);
}
});
};
}, {relDone: {name: "Map", arguments: [null, null]}, levelDone: {name: "Map", arguments: [null, null]}, template: "Object", competency: {name: "Array", arguments: [null]}, relation: {name: "Array", arguments: [null]}, level: {name: "Array", arguments: [null]}, rollupRule: {name: "Array", arguments: [null]}, contributor: "Object", reviews: "Review", audience: "Audience", timeRequired: "Duration", publication: "PublicationEvent", contentLocation: "Place", temporalCoverage: "Object", isBasedOn: "Object", fileFormat: "Object", interactionStatistic: "InteractionCounter", recordedAt: "Event", isPartOf: "CreativeWork", exampleOfWork: "CreativeWork", dateCreated: "Object", releasedEvent: "PublicationEvent", publisher: "Object", encoding: "MediaObject", creator: "Object", hasPart: "CreativeWork", license: "Object", translator: "Object", offers: "Offer", schemaVersion: "Object", review: "Review", position: "Object", genre: "Object", character: "Person", producer: "Object", editor: "Person", locationCreated: "Place", about: "Thing", audio: "AudioObject", encodings: "MediaObject", funder: "Object", accountablePerson: "Person", material: "Object", author: "Object", sourceOrganization: "Organization", sponsor: "Object", provider: "Object", copyrightHolder: "Object", comment: "Comment", spatialCoverage: "Place", aggregateRating: "AggregateRating", educationalAlignment: "AlignmentObject", video: "VideoObject", version: "Object", mainEntity: "Thing", associatedMedia: "MediaObject", workExample: "CreativeWork", mentions: "Thing", citation: "Object", dateModified: "Object", inLanguage: "Object", isBasedOnUrl: "Object", identifier: "Object", image: "Object", potentialAction: "Action", mainEntityOfPage: "Object", owner: {name: "Array", arguments: [null]}, signature: {name: "Array", arguments: [null]}, reader: {name: "Array", arguments: [null]}, atProperties: {name: "Array", arguments: [null]}}, {});
var PapaParseParams = function() {};
PapaParseParams = stjs.extend(PapaParseParams, null, [], function(constructor, prototype) {
prototype.complete = null;
prototype.error = null;
}, {complete: {name: "Callback1", arguments: ["Object"]}, error: {name: "Callback1", arguments: ["Object"]}}, {});
/**
* Base class for all importers, can hold helper functions
* that are useful for all importers
*
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class Importer
* @abstract
*/
var Importer = function() {};
Importer = stjs.extend(Importer, null, [], function(constructor, prototype) {
constructor.isObject = function(obj) {
return Object.prototype.toString.call(obj) == "[object Object]";
};
constructor.isArray = function(obj) {
return Object.prototype.toString.call(obj) == "[object Array]";
};
}, {}, {});
/**
* Base class for all exporters, can hold helper functions
* that are useful for all exporters
*
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class Exporter
* @abstract
*/
var Exporter = function() {};
Exporter = stjs.extend(Exporter, null, [], null, {}, {});
/**
* Export methods to handle exporting two CSV file , one of competencies
* and one of relationships representing a framework
*
* @author devlin.junker@eduworks.com
* @author fritz.ray@eduworks.com
* @module org.cassproject
* @class CSVExport
* @static
* @extends Exporter
*/
var CSVExport = function() {
Exporter.call(this);
};
CSVExport = stjs.extend(CSVExport, Exporter, [], function(constructor, prototype) {
constructor.frameworkCompetencies = null;
constructor.frameworkRelations = null;
constructor.exportObjects = function(objects, fileName) {
var compExport = new CSVExport.CSVExportProcess();
compExport.buildExport(objects);
compExport.downloadCSV(fileName);
};
/**
* Method to export the CSV files of competencies and relationships for a framework
*
* @param {String} frameworkId
* Id of the framework to export
* @param {Callback0} success
* Callback triggered after both files have been successfully exported
* @param {Callback1<String>} failure
* Callback triggered if an error occurs during export
* @memberOf CSVExport
* @method export
* @static
*/
constructor.exportFramework = function(frameworkId, success, failure) {
if (frameworkId == null) {
failure("Framework not selected.");
return;
}
CSVExport.frameworkCompetencies = [];
CSVExport.frameworkRelations = [];
EcRepository.get(frameworkId, function(data) {
if (data.isAny(new EcFramework().getTypes())) {
var fw = new EcFramework();
fw.copyFrom(data);
if (fw.competency == null || fw.competency.length == 0)
failure("No Competencies in Framework");
for (var i = 0; i < fw.competency.length; i++) {
var competencyUrl = fw.competency[i];
EcRepository.get(competencyUrl, function(competency) {
CSVExport.frameworkCompetencies.push(competency);
if (CSVExport.frameworkCompetencies.length == fw.competency.length) {
var compExport = new CSVExport.CSVExportProcess();
compExport.buildExport(CSVExport.frameworkCompetencies);
compExport.downloadCSV(fw.getName() + " - Competencies.csv");
} else {}
}, function(s) {
CSVExport.frameworkCompetencies.push(null);
if (CSVExport.frameworkCompetencies.length == fw.competency.length) {
var compExport = new CSVExport.CSVExportProcess();
compExport.buildExport(CSVExport.frameworkCompetencies);
compExport.downloadCSV(fw.getName() + " - Competencies.csv");
} else {}
});
}
for (var i = 0; i < fw.relation.length; i++) {
var relationUrl = fw.relation[i];
EcRepository.get(relationUrl, function(relation) {
CSVExport.frameworkRelations.push(relation);
if (CSVExport.frameworkRelations.length == fw.relation.length) {
var compExport = new CSVExport.CSVExportProcess();
compExport.buildExport(CSVExport.frameworkRelations);
compExport.downloadCSV(fw.getName() + " - Relations.csv");
if (success != null && success != undefined)
success();
} else {}
}, function(s) {
CSVExport.frameworkRelations.push(null);
if (CSVExport.frameworkRelations.length == fw.relation.length) {
var compExport = new CSVExport.CSVExportProcess();
compExport.buildExport(CSVExport.frameworkRelations);
compExport.downloadCSV(fw.getName() + " - Relations.csv");
if (success != null && success != undefined)
success();
} else {}
});
}
}
}, failure);
};
constructor.CSVExportProcess = function() {
this.csvOutput = [];
};
constructor.CSVExportProcess = stjs.extend(constructor.CSVExportProcess, null, [], function(constructor, prototype) {
prototype.csvOutput = null;
prototype.flattenObject = function(flattenedObject, object, prefix) {
var data = new EcRemoteLinkedData((object)["@context"], (object)["@type"]);
data.copyFrom(object);
var tempObj = JSON.parse(data.toJson());
var props = (tempObj);
for (var prop in props) {
var id;
if (prefix != null && prefix != undefined)
id = prefix + "." + prop;
else
id = prop;
if (props[prop] != null && props[prop] != "" && stjs.isInstanceOf(props[prop].constructor, Object)) {
this.flattenObject(flattenedObject, props[prop], id);
} else {
(flattenedObject)[id] = props[prop];
}
}
};
prototype.addCSVRow = function(object) {
var flattenedObject = new EcRemoteLinkedData(object.context, object.type);
this.flattenObject(flattenedObject, object, null);
this.csvOutput.push(JSON.parse(flattenedObject.toJson()));
var props = (JSON.parse(flattenedObject.toJson()));
for (var prop in props) {
if (props[prop] != null && props[prop] != "") {
for (var i = 0; i < this.csvOutput.length; i++) {
var row = this.csvOutput[i];
if (!(row).hasOwnProperty(prop)) {
(row)[prop] = "";
}
}
}
}
};
prototype.buildExport = function(objects) {
for (var i = 0; i < objects.length; i++)
if (objects[i] != null) {
var object = objects[i];
this.addCSVRow(object);
}
};
prototype.downloadCSV = function(name) {
var csv = Papa.unparse(this.csvOutput);
var pom = window.document.createElement("a");
pom.setAttribute("href", "data:text/csv;charset=utf-8," + encodeURIComponent(csv));
pom.setAttribute("download", name);
if ((window.document)["createEvent"] != null) {
var event = ((window.document)["createEvent"]).call(window.document, "MouseEvents");
((event)["initEvent"]).call(event, "click", true, true);
pom.dispatchEvent(event);
} else {
((pom)["click"]).call(pom);
}
};
}, {csvOutput: {name: "Array", arguments: ["Object"]}}, {});
}, {frameworkCompetencies: {name: "Array", arguments: ["EcRemoteLinkedData"]}, frameworkRelations: {name: "Array", arguments: ["EcRemoteLinkedData"]}}, {});
/**
* Import methods to handle an ASN JSON file containing a framework,
* competencies and relationships, and store them in a CASS instance
*
* @author devlin.junker@eduworks.com
* @author fritz.ray@eduworks.com
* @module org.cassproject
* @class ASNImport
* @static
* @extends Importer
*/
var ASNImport = function() {
Importer.call(this);
};
ASNImport = stjs.extend(ASNImport, Importer, [], function(constructor, prototype) {
constructor.INCREMENTAL_STEP = 5;
constructor.jsonFramework = null;
constructor.frameworkUrl = null;
constructor.jsonCompetencies = null;
constructor.competencyCount = 0;
constructor.relationCount = 0;
constructor.importedFramework = null;
constructor.competencies = null;
constructor.progressObject = null;
constructor.savedCompetencies = 0;
constructor.savedRelations = 0;
/**
* Recursive function that looks through the file and saves each
* competency object in a map for use during importing. It also counts
* the number of competencies and relationships that it finds
*
* @param {Object} obj
* The current JSON object we're examining for comepetencies and reationships
* @param {String} key
* The ASN identifier of the current object
* @memberOf ASNImport
* @method asnJsonPrime
* @private
* @static
*/
constructor.asnJsonPrime = function(obj, key) {
var value = (obj)[key];
if (Importer.isObject(value)) {
if ((value)["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"] != null) {
var stringVal = (((value)["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"])["0"])["value"];
if (stringVal == "http://purl.org/ASN/schema/core/Statement") {
ASNImport.jsonCompetencies[key] = value;
ASNImport.competencyCount++;
var children = (value)["http://purl.org/gem/qualifiers/hasChild"];
if (children != null)
for (var j = 0; j < children.length; j++) {
ASNImport.relationCount++;
ASNImport.asnJsonPrime(obj, (children[j])["value"]);
}
}
}
}
};
/**
* Does the actual legwork of looking for competencies and relationships.
* <p>
* This function finds the framework information, and pulls out the competency
* objects array to be scanned by asnJsonPrime
*
* @param {Object} obj
* ASN JSON Object from file that contains framework information and competencies/relationships
* @memberOf ASNImport
* @method lookThroughSource
* @private
* @static
*/
constructor.lookThroughSource = function(obj) {
ASNImport.competencyCount = 0;
ASNImport.relationCount = 0;
for (var key in (obj)) {
var value = (obj)[key];
if (Importer.isObject(value)) {
if ((value)["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"] != null) {
var stringVal = (((value)["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"])["0"])["value"];
if (stringVal == "http://purl.org/ASN/schema/core/StandardDocument") {
ASNImport.jsonFramework = value;
ASNImport.frameworkUrl = key;
var children = (value)["http://purl.org/gem/qualifiers/hasChild"];
if (children != null)
for (var j = 0; j < children.length; j++) {
ASNImport.asnJsonPrime(obj, (children[j])["value"]);
}
}
}
}
}
};
/**
* Analyzes an ASN File for competencies and relationships.
* <p>
* This should be called before import, the success callback returns an object
* indicating the number of competencies and relationships found.
*
* @param {Object} file
* ASN JSON file
* @param {Callback1<Object>} success
* Callback triggered on successful analysis of file
* @param {Callback1<Object>} [failure]
* Callback triggered if there is an error during analysis of the file
* @memberOf ASNImport
* @method analyzeFile
* @static
*/
constructor.analyzeFile = function(file, success, failure) {
if (file == null) {
failure("No file to analyze");
return;
}
if ((file)["name"] == null) {
failure("Invalid file");
return;
} else if (!((file)["name"]).endsWith(".json")) {
failure("Invalid file type");
return;
}
var reader = new FileReader();
reader.onload = function(e) {
var result = ((e)["target"])["result"];
var jsonObj = JSON.parse(result);
ASNImport.jsonCompetencies = {};
ASNImport.jsonFramework = null;
ASNImport.frameworkUrl = "";
ASNImport.lookThroughSource(jsonObj);
if (ASNImport.jsonFramework == null) {
failure("Could not find StandardDocument.");
} else {
success(ASNImport.jsonCompetencies);
}
};
reader.readAsText(file);
};
/**
* Method to import the competencies from an ASN JSON file,
* should be called after analyzing the file
*
* @param {String} serverUrl
* URL Prefix for the competencies to be imported
* @param {EcIdentity} owner
* EcIdentity that will own the new competencies
* @param {boolean} createFramework
* Flag to create a framework and include the competencies and relationships created
* @param {Callback2<Array<EcCompetency>, EcFramework>} success
* Callback triggered after the competencies (and framework?) are created
* @param {Callback1<Object>} failure
* Callback triggered if an error occurs while creating the competencies
* @param {Callback1<Object>} [incremental]
* Callback triggered incrementally during the creation of competencies to indicate progress,
* returns an object indicating the number of competencies (and relationships?) created so far
* @memberOf ASNImport
* @method importCompetencies
* @static
*/
constructor.importCompetencies = function(serverUrl, owner, createFramework, success, failure, incremental) {
ASNImport.competencies = {};
if (createFramework) {
ASNImport.importedFramework = new EcFramework();
ASNImport.importedFramework.competency = [];
ASNImport.importedFramework.relation = [];
} else {
ASNImport.importedFramework = null;
}
ASNImport.progressObject = null;
ASNImport.createCompetencies(serverUrl, owner, function() {
ASNImport.createRelationships(serverUrl, owner, ASNImport.jsonFramework, null, function() {
if (createFramework) {
ASNImport.createFramework(serverUrl, owner, success, failure);
} else {
var compList = [];
for (var key in ASNImport.competencies) {
compList.push(ASNImport.competencies[key]);
}
if (success != null)
success(compList, null);
}
}, failure, incremental);
}, failure, incremental);
};
/**
* Handles creating the competencies found during analysis, iterates through the
* competency ASN objects saved and creates them in the CASS repository at the URL given.
*
* @param {String} serverUrl
* URL Prefix for the competencies to be imported
* @param {EcIdentity} owner
* EcIdentity that will own the new competencies
* @param {Callback0} success
* Callback triggered after the competencies are created
* @param {Callback1<Object>} failure
* Callback triggered if an error occurs while creating the competencies
* @param {Callback1<Object>} [incremental]
* Callback triggered incrementally during the creation of competencies to indicate progress
* @memberOf ASNImport
* @method createCompetencies
* @private
* @static
*/
constructor.createCompetencies = function(serverUrl, owner, success, failure, incremental) {
ASNImport.savedCompetencies = 0;
for (var key in ASNImport.jsonCompetencies) {
var comp = new EcCompetency();
var jsonComp = ASNImport.jsonCompetencies[key];
if ((jsonComp)["http://purl.org/dc/elements/1.1/title"] == null)
comp.name = (((jsonComp)["http://purl.org/dc/terms/description"])["0"])["value"];
else
comp.name = (((jsonComp)["http://purl.org/dc/elements/1.1/title"])["0"])["value"];
comp.sameAs = key;
if ((jsonComp)["http://purl.org/dc/terms/description"] != null)
comp.description = (((jsonComp)["http://purl.org/dc/terms/description"])["0"])["value"];
comp.generateId(serverUrl);
if (owner != null)
comp.addOwner(owner.ppk.toPk());
if (ASNImport.importedFramework != null)
ASNImport.importedFramework.addCompetency(comp.shortId());
ASNImport.competencies[key] = comp;
ASNImport.saveCompetency(success, failure, incremental, comp);
}
};
constructor.saveCompetency = function(success, failure, incremental, comp) {
Task.asyncImmediate(function(o) {
var keepGoing = o;
comp.save(function(p1) {
ASNImport.savedCompetencies++;
if (ASNImport.savedCompetencies % ASNImport.INCREMENTAL_STEP == 0) {
if (ASNImport.progressObject == null)
ASNImport.progressObject = new Object();
(ASNImport.progressObject)["competencies"] = ASNImport.savedCompetencies;
incremental(ASNImport.progressObject);
}
if (ASNImport.savedCompetencies == ASNImport.competencyCount) {
if (ASNImport.progressObject == null)
ASNImport.progressObject = new Object();
(ASNImport.progressObject)["competencies"] = ASNImport.savedCompetencies;
incremental(ASNImport.progressObject);
success();
}
keepGoing();
}, function(p1) {
failure("Failed to save competency");
keepGoing();
});
});
};
/**
* Handles creating the relationships from the file analyzed earlier.
* Recursively travels through looking for the hasChild field and creates
* relationships based off of that.
*
* @param {String} serverUrl
* URL Prefix for the relationships to be imported
* @param {EcIdentity} owner
* EcIdentity that will own the new relationships
* @param {Object} node
* @param {String} nodeId
* @param {Callback0} success
* Callback triggered after the relationships are created
* @param {Callback1<Object>} failure
* Callback triggered if an error occurs while creating the relationships
* @param {Callback1<Object>} incremental
* Callback triggered incrementally during the creation of relationships to indicate progress
* @memberOf ASNImport
* @method createRelationships
* @private
* @static
*/
constructor.createRelationships = function(serverUrl, owner, node, nodeId, success, failure, incremental) {
ASNImport.savedRelations = 0;
if (ASNImport.relationCount == 0) {
success();
}
var children = (node)["http://purl.org/gem/qualifiers/hasChild"];
if (children != null)
for (var j = 0; j < children.length; j++) {
if (nodeId != null) {
var relation = new EcAlignment();
relation.target = ASNImport.competencies[nodeId].shortId();
relation.source = ASNImport.competencies[(children[j])["value"]].shortId();
relation.relationType = "narrows";
relation.name = "";
relation.description = "";
relation.generateId(serverUrl);
if (owner != null)
relation.addOwner(owner.ppk.toPk());
if (ASNImport.importedFramework != null)
ASNImport.importedFramework.addRelation(relation.shortId());
ASNImport.saveRelation(success, failure, incremental, relation);
}
ASNImport.createRelationships(serverUrl, owner, ASNImport.jsonCompetencies[(children[j])["value"]], (children[j])["value"], success, failure, incremental);
}
};
constructor.saveRelation = function(success, failure, incremental, relation) {
Task.asyncImmediate(function(o) {
var keepGoing = o;
relation.save(function(p1) {
ASNImport.savedRelations++;
if (ASNImport.savedRelations % ASNImport.INCREMENTAL_STEP == 0) {
if (ASNImport.progressObject == null)
ASNImport.progressObject = new Object();
(ASNImport.progressObject)["relations"] = ASNImport.savedRelations;
incremental(ASNImport.progressObject);
}
if (ASNImport.savedRelations == ASNImport.relationCount) {
success();
}
keepGoing();
}, function(p1) {
failure("Failed to save Relationship");
keepGoing();
});
});
};
/**
* Handles creating the framework if the createFramework flag was set
*
* @param {String} serverUrl
* URL Prefix for the framework to be imported
* @param {EcIdentity} owner
* EcIdentity that will own the new framework
* @param {Callback2<Array<EcCompetency>, EcFramework>} success
* Callback triggered after the framework is created
* @param {Callback1<Object>} failure
* Callback triggered if there is an error during the creation of framework
* @meberOf ASNImport
* @method createFramework
* @private
* @static
*/
constructor.createFramework = function(serverUrl, owner, success, failure) {
ASNImport.importedFramework.name = (((ASNImport.jsonFramework)["http://purl.org/dc/elements/1.1/title"])["0"])["value"];
ASNImport.importedFramework.description = (((ASNImport.jsonFramework)["http://purl.org/dc/terms/description"])["0"])["value"];
ASNImport.importedFramework.generateId(serverUrl);
ASNImport.importedFramework.sameAs = ASNImport.frameworkUrl;
if (owner != null)
ASNImport.importedFramework.addOwner(owner.ppk.toPk());
ASNImport.importedFramework.save(function(p1) {
var compList = [];
for (var key in ASNImport.competencies) {
compList.push(ASNImport.competencies[key]);
}
if (success != null)
success(compList, ASNImport.importedFramework);
}, function(p1) {
failure("Failed to save framework");
});
};
}, {jsonFramework: "Object", jsonCompetencies: {name: "Map", arguments: [null, "Object"]}, importedFramework: "EcFramework", competencies: {name: "Map", arguments: [null, "EcCompetency"]}, progressObject: "Object"}, {});
/**
* Importer methods to copy or link to competencies that already
* exist in another framework in a CASS instance.
*
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class FrameworkImport
* @static
* @extends Importer
*/
var FrameworkImport = function() {};
FrameworkImport = stjs.extend(FrameworkImport, null, [], function(constructor, prototype) {
constructor.savedComp = 0;
constructor.savedRel = 0;
constructor.targetUsable = null;
constructor.competencies = null;
constructor.relations = null;
constructor.compMap = null;
/**
* Copies or links competencies that exist in one framework in a CASS instance,
* to another different framework in the same CASS instance.
*
* @param {EcFramework} source
* Framework to copy or link the competencies from
* @param {EcFramework} target
* Framework to add the copied or linked competencies to
* @param {boolean} copy
* Flag indicating whether or not to copy or link the competencies in the source framework
* @param {String} serverUrl
* URL Prefix for the created competencies if copied
* @param {EcIdentity} owner
* EcIdentity that will own the created competencies if copied
* @param {Callback1<Array<EcCompetency>>} success
* Callback triggered after succesfully copying or linking all of the competencies,
* returns an array of the new or linked competencies
* @param {Callback1<Object>} [failure]
* Callback triggered if an error occurred while creating the competencies
* @memberOf FrameworkImport
* @method importCompetencies
* @static
*/
constructor.importCompetencies = function(source, target, copy, serverUrl, owner, success, failure) {
if (source == null) {
failure("Source Framework not set");
return;
}
if (target == null) {
failure("Target Framework not Set");
return;
}
FrameworkImport.targetUsable = target;
if (source.competency == null || source.competency.length == 0) {
failure("Source Has No Competencies");
return;
}
FrameworkImport.competencies = [];
FrameworkImport.relations = [];
if (copy) {
FrameworkImport.compMap = {};
FrameworkImport.savedComp = 0;
FrameworkImport.savedRel = 0;
for (var i = 0; i < source.competency.length; i++) {
var id = source.competency[i];
EcCompetency.get(id, function(comp) {
var competency = new EcCompetency();
competency.copyFrom(comp);
competency.generateId(serverUrl);
FrameworkImport.compMap[comp.shortId()] = competency.shortId();
if (owner != null)
competency.addOwner(owner.ppk.toPk());
var id = competency.id;
Task.asyncImmediate(function(o) {
var keepGoing = o;
competency.save(function(str) {
FrameworkImport.savedComp++;
FrameworkImport.targetUsable.addCompetency(id);
if (FrameworkImport.savedComp == FrameworkImport.competencies.length) {
FrameworkImport.targetUsable.save(function(p1) {
for (var i = 0; i < source.relation.length; i++) {
var id = source.relation[i];
EcAlignment.get(id, function(rel) {
var relation = new EcAlignment();
relation.copyFrom(rel);
relation.generateId(serverUrl);
relation.source = FrameworkImport.compMap[rel.source];
relation.target = FrameworkImport.compMap[rel.target];
if (owner != null)
relation.addOwner(owner.ppk.toPk());
var id = relation.id;
Task.asyncImmediate(function(o) {
var keepGoing2 = o;
relation.save(function(str) {
FrameworkImport.savedRel++;
FrameworkImport.targetUsable.addRelation(id);
if (FrameworkImport.savedRel == FrameworkImport.relations.length) {
FrameworkImport.targetUsable.save(function(p1) {
success(FrameworkImport.competencies, FrameworkImport.relations);
}, function(p1) {
failure(p1);
});
}
keepGoing2();
}, function(str) {
failure("Trouble Saving Copied Competency");
keepGoing2();
});
});
FrameworkImport.relations.push(relation);
}, function(str) {
failure(str);
});
}
}, function(p1) {
failure(p1);
});
}
keepGoing();
}, function(str) {
failure("Trouble Saving Copied Competency");
keepGoing();
});
});
FrameworkImport.competencies.push(competency);
}, function(str) {
failure(str);
});
}
} else {
for (var i = 0; i < source.competency.length; i++) {
if (target.competency == null || (target.competency.indexOf(source.competency[i]) == -1 && target.competency.indexOf(EcRemoteLinkedData.trimVersionFromUrl(source.competency[i])) == -1)) {
EcCompetency.get(source.competency[i], function(comp) {
FrameworkImport.competencies.push(comp);
FrameworkImport.targetUsable.addCompetency(comp.id);
if (FrameworkImport.competencies.length == source.competency.length) {
delete (FrameworkImport.targetUsable)["competencyObjects"];
FrameworkImport.targetUsable.save(function(p1) {
for (var i = 0; i < source.relation.length; i++) {
if (target.relation == null || (target.relation.indexOf(source.relation[i]) == -1 && target.relation.indexOf(EcRemoteLinkedData.trimVersionFromUrl(source.competency[i])) == -1)) {
EcAlignment.get(source.relation[i], function(relation) {
FrameworkImport.relations.push(relation);
FrameworkImport.targetUsable.addRelation(relation.id);
if (FrameworkImport.relations.length == source.relation.length) {
delete (FrameworkImport.targetUsable)["competencyObjects"];
Task.asyncImmediate(function(o) {
var keepGoing = o;
FrameworkImport.targetUsable.save(function(p1) {
success(FrameworkImport.competencies, FrameworkImport.relations);
keepGoing();
}, function(p1) {
failure(p1);
keepGoing();
});
});
}
}, function(p1) {
failure(p1);
});
}
}
}, function(p1) {
failure(p1);
});
}
}, function(p1) {
failure(p1);
});
}
}
}
};
}, {targetUsable: "EcFramework", competencies: {name: "Array", arguments: ["EcCompetency"]}, relations: {name: "Array", arguments: ["EcAlignment"]}, compMap: {name: "Map", arguments: [null, null]}}, {});
/**
* Importer methods to create competencies based on a
* Medbiquitous competency XML file
*
* @author devlin.junker@eduworks.com
* @author fritz.ray@eduworks.com
* @module org.cassproject
* @class MedbiqImport
* @static
* @extends Importer
*/
var MedbiqImport = function() {
Importer.call(this);
};
MedbiqImport = stjs.extend(MedbiqImport, Importer, [], function(constructor, prototype) {
constructor.INCREMENTAL_STEP = 5;
constructor.medbiqXmlCompetencies = null;
constructor.progressObject = null;
constructor.saved = 0;
/**
* Does the legwork of looking for competencies in the XML
*
* @param {Object} obj
* Parsed XML Object
* @memberOf MedbiqImport
* @method medbiqXmlLookForCompetencyObject
* @private
* @static
*/
constructor.medbiqXmlLookForCompetencyObject = function(obj) {
if (Importer.isObject(obj) || Importer.isArray(obj))
for (var key in (obj)) {
if (key == "CompetencyObject")
MedbiqImport.medbiqXmlParseCompetencyObject((obj)[key]);
else
MedbiqImport.medbiqXmlLookForCompetencyObject((obj)[key]);
}
};
/**
* Does the legwork of parsing the competencies out of the parsed XML
*
* @param {Object} obj
* Parsed XML Object
* @memberOf MedbiqImport
* @method medbiqXmlParseCompetencyObject
* @private
* @static
*/
constructor.medbiqXmlParseCompetencyObject = function(obj) {
if (Importer.isArray(obj)) {
for (var key in (obj)) {
MedbiqImport.medbiqXmlParseCompetencyObject((obj)[key]);
}
} else {
var newCompetency = new EcCompetency();
if ((obj)["lom"] != null && ((obj)["lom"])["general"] != null) {
newCompetency.name = ((((obj)["lom"])["general"])["title"])["string"].toString();
if ((((obj)["lom"])["general"])["description"] != null)
newCompetency.description = ((((obj)["lom"])["general"])["description"])["string"].toString();
if ((((obj)["lom"])["general"])["identifier"] != null)
newCompetency.url = ((((obj)["lom"])["general"])["identifier"])["entry"].toString();
if (newCompetency.description == null)
newCompetency.description = "";
MedbiqImport.medbiqXmlCompetencies.push(newCompetency);
}
}
};
/**
* Analyzes a Medbiquitous XML file for competencies and saves them for use in the import process
*
* @param {Object} file
* Medbiquitous XML file
* @param {Callback1<Array<EcCompetency>>} success
* Callback triggered on succesfully analyzing competencies,
* returns an array of all of the competencies found
* @param {Callback1<String>} [failure]
* Callback triggered on error analyzing file
* @memberOf MedbiqImport
* @method analyzeFile
* @static
*/
constructor.analyzeFile = function(file, success, failure) {
if (file == null) {
failure("No file to analyze");
return;
}
if ((file)["name"] == null) {
failure("Invalid file");
return;
} else if (!((file)["name"]).endsWith(".xml")) {
failure("Invalid file type");
return;
}
var reader = new FileReader();
reader.onload = function(e) {
var result = ((e)["target"])["result"];
var jsonObject = new X2JS().xml_str2json(result);
MedbiqImport.medbiqXmlCompetencies = [];
MedbiqImport.medbiqXmlLookForCompetencyObject(jsonObject);
success(MedbiqImport.medbiqXmlCompetencies);
};
reader.onerror = function(p1) {
failure("Error Reading File");
};
reader.readAsText(file);
};
/**
* Method for actually creating the competencies in the CASS repository after a
* Medbiquitous XML file has been parsed. Must be called after analyzeFile
*
* @param {String} serverUrl
* URL Prefix for the created competencies (and relationships?)
* @param {EcIdentity} owner
* EcIdentity that will own the created competencies (and relationships?)
* @param {Callback1<Array<EcCompetency>>} success
* Callback triggered after successfully creating the competencies from the XML file
* @param {Callback1<Object>} [failure]
* Callback triggered if there is an error while creating the competencies
* @param {Callback1<Object>} [incremental]
* Callback triggered incrementally while the competencies are being created to show progress,
* returns an object indicating the number of competencies created so far
* @memberOf MedbiqImport
* @method importCompetencies
* @static
*/
constructor.importCompetencies = function(serverUrl, owner, success, failure, incremental) {
MedbiqImport.progressObject = null;
MedbiqImport.saved = 0;
for (var i = 0; i < MedbiqImport.medbiqXmlCompetencies.length; i++) {
var comp = MedbiqImport.medbiqXmlCompetencies[i];
comp.generateId(serverUrl);
if (owner != null)
comp.addOwner(owner.ppk.toPk());
MedbiqImport.saveCompetency(success, failure, incremental, comp);
}
};
constructor.saveCompetency = function(success, failure, incremental, comp) {
Task.asyncImmediate(function(o) {
var keepGoing = o;
comp.save(function(p1) {
MedbiqImport.saved++;
if (MedbiqImport.saved % MedbiqImport.INCREMENTAL_STEP == 0) {
if (MedbiqImport.progressObject == null)
MedbiqImport.progressObject = new Object();
(MedbiqImport.progressObject)["competencies"] = MedbiqImport.saved;
incremental(MedbiqImport.progressObject);
}
if (MedbiqImport.saved == MedbiqImport.medbiqXmlCompetencies.length) {
if (MedbiqImport.progressObject == null)
MedbiqImport.progressObject = new Object();
(MedbiqImport.progressObject)["competencies"] = MedbiqImport.saved;
incremental(MedbiqImport.progressObject);
success(MedbiqImport.medbiqXmlCompetencies);
}
keepGoing();
}, function(p1) {
failure("Failed to Save Competency");
keepGoing();
});
});
};
}, {medbiqXmlCompetencies: {name: "Array", arguments: ["EcCompetency"]}, progressObject: "Object"}, {});
/**
* Import methods to handle an CSV file of competencies and a
* CSV file of relationships and store them in a CASS instance
*
* @author devlin.junker@eduworks.com
* @author fritz.ray@eduworks.com
* @module org.cassproject
* @class CSVImport
* @static
* @extends Importer
*/
var CSVImport = function() {};
CSVImport = stjs.extend(CSVImport, null, [], function(constructor, prototype) {
constructor.INCREMENTAL_STEP = 5;
constructor.importCsvLookup = null;
constructor.saved = 0;
constructor.progressObject = null;
/**
* Analyzes a CSV File to return the column names to the user for specifying
* which columns contain which data. This should be called before import.
*
* @param {Object} file
* CSV file to be analyzed
* @param {Callback1<Object>} success
* Callback triggered after successfully analyzing the CSV file
* @param {Callback1<Object>} [failure]
* Callback triggered if there is an error analyzing the CSV file
* @memberOf CSVImport
* @method analyzeFile
* @static
*/
constructor.analyzeFile = function(file, success, failure) {
if (file == null) {
failure("No file to analyze");
return;
}
if ((file)["name"] == null) {
failure("Invalid file");
} else if (!((file)["name"]).endsWith(".csv")) {
failure("Invalid file type");
}
Papa.parse(file, {complete: function(results) {
var tabularData = (results)["data"];
success(tabularData);
}, error: failure});
};
/**
* Helper function to transform a competencies oldID to match the new server url
*
* @param {String} oldId
* Old ID found in the CSV file
* @param {EcRemoteLinkedData} newObject
* New competency being created
* @param {String} selectedServer
* New URL Prefix that the new competency's ID should match
* @memberOf CSVImport
* @method transformId
* @private
* @static
*/
constructor.transformId = function(oldId, newObject, selectedServer) {
if (oldId == null || oldId == "")
oldId = generateUUID();
if (oldId.indexOf("http") != -1) {
var parts = (oldId).split("/");
var guid = null;
var timestamp = null;
var pattern = new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$", "i");
for (var i = 0; i < parts.length; i++) {
if (!isNaN(parseInt(parts[i])))
timestamp = parts[i];
else if (pattern.test(parts[i]))
guid = parts[i];
}
if (guid == null)
newObject.assignId(selectedServer, parts[parts.length - 2]);
else
newObject.assignId(selectedServer, guid);
} else
newObject.assignId(selectedServer, oldId);
};
/**
* Method to create competencies (and relationships if the parameters are passed in)
* based on a CSV file and references to which columns correspond to which pieces
* of data.
*
* @param {Object} file
* CSV File to import competencies from
* @param {String} serverUrl
* URL Prefix for the created competencies (and relationships?)
* @param {EcIdentity} owner
* EcIdentity that will own the created competencies (and relationships?)
* @param {int} nameIndex
* Index of the column that contains the competency names
* @param {int} descriptionIndex
* Index of the column that contains the competency descriptions
* @param {int} scopeIndex
* Index of the column that contains the competency scopes
* @param {int} idIndex
* Index of the column that contains the old competency ID (Optional, if not exists pass null or negative)
* @param {Object} [relations]
* CSV File to import relationships from (Optional, if not exists pass null)
* @param {int} [sourceIndex]
* Index (in relation file) of the column containing the relationship source competency ID (Optional, if not exists pass null or negative)
* @param {int} [relationTypeIndex]
* Index (in relation file) of the column containing the relationship type (Optional, if not exists pass null or negative)
* @param {int} [destIndex]
* Index (in relation file) of the column containing the relationship destination competency ID (Optional, if not exists pass null or negative)
* @param {Callback2<Array<EcCompetency>, Array<EcAlignment>>} success
* Callback triggered after the competencies (and relationships?) have been created
* @param {Callback1<Object>} [failure]
* Callback triggered if an error during creating the competencies
* @param {Callback1<Object>} [incremental]
* Callback triggered incrementally during creation of competencies to indicate progress,
* returns an object indicating the number of competencies (and relationships?) created so far
* @memberOf CSVImport
* @method importCompetencies
* @static
*/
constructor.importCompetencies = function(file, serverUrl, owner, nameIndex, descriptionIndex, scopeIndex, idIndex, relations, sourceIndex, relationTypeIndex, destIndex, success, failure, incremental, uniquify) {
CSVImport.progressObject = null;
CSVImport.importCsvLookup = new Object();
if (nameIndex < 0) {
failure("Name Index not Set");
return;
}
var competencies = [];
Papa.parse(file, {complete: function(results) {
var tabularData = (results)["data"];
var colNames = tabularData[0];
for (var i = 1; i < tabularData.length; i++) {
if (tabularData[i].length == 0 || (tabularData[i].length == 1 && (tabularData[i][0] == null || tabularData[i][0] == undefined || tabularData[i][0] == ""))) {
continue;
}
if (tabularData[i][nameIndex] == null || tabularData[i][nameIndex] == undefined || tabularData[i][nameIndex] == "") {
continue;
}
var competency = new EcCompetency();
competency.name = tabularData[i][nameIndex];
if (descriptionIndex >= 0)
competency.description = tabularData[i][descriptionIndex];
if (scopeIndex >= 0)
competency.scope = tabularData[i][scopeIndex];
if ((uniquify == undefined || uniquify == null || uniquify == false) && idIndex != null && idIndex >= 0) {
competency.id = tabularData[i][idIndex];
CSVImport.transformId(tabularData[i][idIndex], competency, serverUrl);
} else {
competency.generateId(serverUrl);
}
if (owner != undefined && owner != null)
competency.addOwner(owner.ppk.toPk());
var shortId = null;
if (idIndex != null && idIndex != undefined && idIndex >= 0) {
var oldId = tabularData[i][idIndex];
shortId = EcRemoteLinkedData.trimVersionFromUrl(oldId);
(CSVImport.importCsvLookup)[shortId] = competency.shortId();
}
if (idIndex != null && idIndex != undefined && idIndex >= 0 && tabularData[i][idIndex] != null && tabularData[i][idIndex] != "") {
if ((CSVImport.importCsvLookup)[tabularData[i][idIndex]] == null)
(CSVImport.importCsvLookup)[tabularData[i][idIndex]] = competency.shortId();
}
for (var idx = 0; idx < tabularData[i].length; idx++) {
var name = colNames[idx];
if (name == null || name.trim() == "" || name.startsWith("@") || name.indexOf(".") != -1 || tabularData[i][idx].trim() == "" || idx == nameIndex || idx == descriptionIndex || idx == scopeIndex || idx == idIndex) {
continue;
} else {
(competency)[colNames[idx]] = tabularData[i][idx];
}
}
competencies.push(competency);
}
CSVImport.saved = 0;
for (var i = 0; i < competencies.length; i++) {
var comp = competencies[i];
CSVImport.saveCompetency(comp, incremental, competencies, relations, success, serverUrl, owner, sourceIndex, relationTypeIndex, destIndex, failure);
}
}, error: failure});
};
constructor.saveCompetency = function(comp, incremental, competencies, relations, success, serverUrl, owner, sourceIndex, relationTypeIndex, destIndex, failure) {
Task.asyncImmediate(function(o) {
var keepGoing = o;
comp.save(function(results) {
CSVImport.saved++;
if (CSVImport.saved % CSVImport.INCREMENTAL_STEP == 0) {
if (CSVImport.progressObject == null)
CSVImport.progressObject = new Object();
(CSVImport.progressObject)["competencies"] = CSVImport.saved;
incremental(CSVImport.progressObject);
}
if (CSVImport.saved == competencies.length) {
if (relations == null)
success(competencies, new Array());
else
CSVImport.importRelations(serverUrl, owner, relations, sourceIndex, relationTypeIndex, destIndex, competencies, success, failure, incremental);
}
keepGoing();
}, function(results) {
failure("Failed to save competency");
for (var j = 0; j < competencies.length; j++) {
competencies[j]._delete(null, null, null);
}
keepGoing();
});
});
};
/**
* Handles actually importing the relationships from the relationship CSV file
*
* @param {String} serverUrl
* URL Prefix for the created competencies (and relationships?)
* @param {EcIdentity} owner
* EcIdentity that will own the created competencies (and relationships?)
* @param {Object} file
* CSV File to import competencies from
* @param {int} sourceIndex
* Index (in relation file) of the column containing the relationship source competency ID
* @param {int} relationTypeIndex
* Index (in relation file) of the column containing the relationship type
* @param {int} destIndex
* Index (in relation file) of the column containing the relationship destination competency ID
* @param {Array<EcCompetency>} competencies
* Array of newly created competencies
* @param {Callback2<Array<EcCompetency>, Array<EcAlignment>>} success
* Callback triggered after the relationships have been created
* @param {Callback1<Object>} failure
* Callback triggered if an error during creating the relationships
* @param {Callback1<Object>} incremental
* Callback triggered incrementally during creation to indicate progress
* @memberOf CSVImport
* @method importRelations
* @private
* @static
*/
constructor.importRelations = function(serverUrl, owner, file, sourceIndex, relationTypeIndex, destIndex, competencies, success, failure, incremental) {
var relations = new Array();
if (sourceIndex == null || sourceIndex < 0) {
failure("Source Index not Set");
return;
}
if (relationTypeIndex == null || relationTypeIndex < 0) {
failure("Relation Type Index not Set");
return;
}
if (destIndex == null || destIndex < 0) {
failure("Destination Index not Set");
return;
}
Papa.parse(file, {complete: function(results) {
var tabularData = (results)["data"];
for (var i = 1; i < tabularData.length; i++) {
var alignment = new EcAlignment();
var sourceKey = tabularData[i][sourceIndex];
var relationTypeKey = tabularData[i][relationTypeIndex];
var destKey = tabularData[i][destIndex];
if ((CSVImport.importCsvLookup)[sourceKey] == null)
alignment.source = sourceKey;
else
alignment.source = (CSVImport.importCsvLookup)[sourceKey];
if ((CSVImport.importCsvLookup)[destKey] == null)
alignment.target = destKey;
else
alignment.target = (CSVImport.importCsvLookup)[destKey];
alignment.relationType = relationTypeKey;
if (owner != null)
alignment.addOwner(owner.ppk.toPk());
alignment.generateId(serverUrl);
relations.push(alignment);
}
CSVImport.saved = 0;
for (var i = 0; i < relations.length; i++) {
var relation = relations[i];
CSVImport.saveRelation(relation, incremental, relations, success, competencies, failure);
}
if (CSVImport.saved == 0 && CSVImport.saved == relations.length) {
success(competencies, relations);
}
}, error: failure});
};
constructor.saveRelation = function(relation, incremental, relations, success, competencies, failure) {
Task.asyncImmediate(function(o) {
var keepGoing = o;
relation.save(function(results) {
CSVImport.saved++;
if (CSVImport.saved % CSVImport.INCREMENTAL_STEP == 0) {
if (CSVImport.progressObject == null)
CSVImport.progressObject = new Object();
(CSVImport.progressObject)["relations"] = CSVImport.saved;
incremental(CSVImport.progressObject);
incremental(CSVImport.saved);
}
if (CSVImport.saved == relations.length) {
success(competencies, relations);
}
keepGoing();
}, function(results) {
failure("Failed to save competency or relation");
for (var j = 0; j < competencies.length; j++) {
competencies[j]._delete(null, null, null);
}
for (var j = 0; j < relations.length; j++) {
relations[j]._delete(null, null);
}
keepGoing();
});
});
};
constructor.hasContextColumn = function(colNames) {
for (var idx = 0; idx < colNames.length; idx++) {
if (colNames[idx] == "@context") {
return idx;
}
}
return -1;
};
constructor.hasTypeColumn = function(colNames) {
for (var idx = 0; idx < colNames.length; idx++) {
if (colNames[idx] == "@type") {
return idx;
}
}
return -1;
};
constructor.expandObject = function(nestedFields, nestedObj, value) {
if (nestedFields.length == 0) {
return;
} else if (nestedFields.length == 1) {
(nestedObj)[nestedFields[0]] = value;
} else {
var key = nestedFields[0];
if ((nestedObj)[key] == null || (nestedObj)[key] == undefined)
(nestedObj)[key] = new Object();
nestedFields.splice(0, 1);
CSVImport.expandObject(nestedFields, (nestedObj)[key], value);
}
};
constructor.transformReferences = function(data) {
var props = (data);
for (var prop in props) {
if (props[prop] == null || props[prop] == undefined || Object.prototype.toString.call(props[prop]).indexOf("String") == -1) {
if (EcObject.isObject(props[prop])) {
var nested = props[prop];
CSVImport.transformReferences(nested);
(data)[prop] = nested;
}
continue;
}
var oldVal = props[prop];
if ((CSVImport.importCsvLookup)[oldVal] != null && (CSVImport.importCsvLookup)[oldVal] != undefined && (CSVImport.importCsvLookup)[oldVal] != "") {
(data)[prop] = (CSVImport.importCsvLookup)[oldVal];
}
}
};
constructor.importData = function(file, serverUrl, owner, success, failure, incremental, idIndex, assignedContext, assignedType) {
var objects = [];
var hasAssignedContext = assignedContext != undefined && assignedContext != null && assignedContext.trim() != "";
var hasAssignedType = assignedType != undefined && assignedType != null && assignedType.trim() != "";
CSVImport.importCsvLookup = new Object();
Papa.parse(file, {complete: function(results) {
var tabularData = (results)["data"];
var colNames = tabularData[0];
var contextIdx = -1;
var typeIdx = -1;
if (!hasAssignedContext && (contextIdx = CSVImport.hasContextColumn(colNames)) == -1) {
failure("Was not passed and cannot find column with data context");
} else if (!hasAssignedType && (typeIdx = CSVImport.hasTypeColumn(colNames)) == 1) {
failure("Was not passed and cannot find column with data type");
}
for (var i = 1; i < tabularData.length; i++) {
if (tabularData[i].length == 0 || (tabularData[i].length == 1 && (tabularData[i][0] == null || tabularData[i][0] == undefined || tabularData[i][0] == ""))) {
continue;
}
var context = null;
var type = null;
if (hasAssignedContext)
context = assignedContext;
else
context = tabularData[i][contextIdx];
if (hasAssignedType)
type = assignedType;
else
type = tabularData[i][typeIdx];
var data = new EcRemoteLinkedData(context, type);
var nestedObjs = {};
for (var idx = 0; idx < tabularData[i].length; idx++) {
var name = colNames[idx];
if (name == "@id" || name == "id") {
data.id = tabularData[i][idx];
continue;
} else if (name == null || name.trim() == "" || name.startsWith("@") || tabularData[i][idx].trim() == "" || idx == contextIdx || idx == typeIdx) {
continue;
} else if (name.indexOf(".") != -1) {
var split = (name.split("."));
if (split.length > 1) {
var key = split[0];
if (nestedObjs[key] == null || nestedObjs[key] == undefined)
nestedObjs[key] = new Object();
split.splice(0, 1);
CSVImport.expandObject(split, nestedObjs[key], tabularData[i][idx]);
continue;
}
name = split[0];
}
var val = tabularData[i][idx];
(data)[name] = val;
}
for (var key in nestedObjs) {
(data)[key] = nestedObjs[key];
}
if (owner != null)
data.addOwner(owner.ppk.toPk());
var fileId = data.id;
if (idIndex != undefined && idIndex != null && idIndex >= 0) {
data.id = tabularData[i][idIndex];
CSVImport.transformId(tabularData[i][idIndex], data, serverUrl);
} else {
data.generateId(serverUrl);
}
var shortId;
if (idIndex != null && idIndex != undefined && idIndex >= 0) {
var oldId = tabularData[i][idIndex];
shortId = EcRemoteLinkedData.trimVersionFromUrl(oldId);
(CSVImport.importCsvLookup)[shortId] = data.shortId();
}
if (idIndex != null && idIndex != undefined && idIndex >= 0 && tabularData[i][idIndex] != null && tabularData[i][idIndex] != "") {
if ((CSVImport.importCsvLookup)[tabularData[i][idIndex]] == null)
(CSVImport.importCsvLookup)[tabularData[i][idIndex]] = data.shortId();
} else if (fileId != null && fileId != undefined && fileId != "") {
if ((CSVImport.importCsvLookup)[fileId] == null)
(CSVImport.importCsvLookup)[fileId] = data.shortId();
shortId = EcRemoteLinkedData.trimVersionFromUrl(fileId);
if ((CSVImport.importCsvLookup)[shortId] == null)
(CSVImport.importCsvLookup)[shortId] = data.shortId();
}
objects.push(data);
}
CSVImport.saved = 0;
for (var i = 0; i < objects.length; i++) {
var data = objects[i];
CSVImport.transformReferences(data);
CSVImport.saveTransformedData(data, incremental, objects, success, failure);
}
}, error: failure});
};
constructor.saveTransformedData = function(data, incremental, objects, success, failure) {
Task.asyncImmediate(function(o) {
var keepGoing = o;
EcRepository.save(data, function(results) {
CSVImport.saved++;
if (CSVImport.saved % CSVImport.INCREMENTAL_STEP == 0)
incremental(CSVImport.saved);
if (CSVImport.saved == objects.length)
success(objects);
keepGoing();
}, function(results) {
failure("Failed to save object");
keepGoing();
});
});
};
}, {importCsvLookup: "Object", progressObject: "Object"}, {});
/**
* Object that holds the Moodle Adapter configuration values returned
* from the server and provides methods for saving new config values
*
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class MoodleConfig
* @constructor
*/
var MoodleConfig = function() {
EcLinkedData.call(this, null, null);
};
MoodleConfig = stjs.extend(MoodleConfig, EcLinkedData, [], function(constructor, prototype) {
prototype.enabled = false;
prototype.moodleEndpoint = null;
prototype.moodleToken = null;
/**
* Retrieves the Moodle adapter configuration values from the server
*
* @param {String} serverUrl
* URL of server to save configuration values to
* @param {Callback1<Object>} success
* Callback triggered on successfully retrieving config values to server
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while getting the config values
* @memberOf MoodleConfig
* @method get
* @static
*/
constructor.get = function(serverUrl, success, failure) {
var fd = new FormData();
EcIdentityManager.signatureSheetAsync(60000, serverUrl, function(signatureSheet) {
fd.append("signatureSheet", signatureSheet);
EcRemote.postExpectingObject(serverUrl, "adapter/moodle/config/get", fd, success, failure);
}, failure);
};
/**
* Retrieves the Moodle adapter Encryption Key from the server to share frameworks with
*
* @param {String} serverUrl
* URL of server to save configuration values to
* @param {Callback1<String>} success
* Callback triggered on successfully retrieving config values to server
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while getting the config values
* @memberOf MoodleConfig
* @method get
* @static
*/
constructor.getMoodleKey = function(serverUrl, success, failure) {
var fd = new FormData();
EcIdentityManager.signatureSheetAsync(60000, serverUrl, function(signatureSheet) {
fd.append("signatureSheet", signatureSheet);
EcRemote.postExpectingString(serverUrl, "adapter/moodle/config/key", fd, success, failure);
}, failure);
};
constructor.syncCassToMoodle = function(serverUrl, success, failure) {
EcRemote.postExpectingString(serverUrl, "moodle/cassToMoodle", new FormData(), success, failure);
};
constructor.syncMoodleToCass = function(serverUrl, success, failure) {
EcRemote.postExpectingString(serverUrl, "moodle/moodleToCass", new FormData(), success, failure);
};
/**
* Saves this config Objects configuration values to the server specified
*
* @param {String} serverUrl
* URL of server to save configuration values to
* @param {Callback1<Object>} success
* Callback triggered on successfully saving config values to server
* @param {Callback1<String>} failure
* Callback triggered if an error occurs while saving the config values
* @memberOf MoodleConfig
* @method save
*/
prototype.save = function(serverUrl, success, failure) {
var fd = new FormData();
fd.append("config", JSON.stringify(this));
EcIdentityManager.signatureSheetAsync(60000, serverUrl, function(signatureSheet) {
fd.append("signatureSheet", signatureSheet);
EcRemote.postExpectingObject(serverUrl, "adapter/moodle/config/set", fd, success, failure);
}, failure);
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Object that holds the xAPI Adapter configuration values returned
* from the server and provides methods for saving new config values
*
* @author devlin.junker@eduworks.com
* @module org.cassproject
* @class XapiConfig
* @constructor
*/
var XapiConfig = function() {
EcLinkedData.call(this, null, null);
};
XapiConfig = stjs.extend(XapiConfig, EcLinkedData, [], function(constructor, prototype) {
prototype.enabled = false;
prototype.xapiAuth = null;
prototype.xapiEndpoint = null;
prototype.xapiHostName = null;
/**
* Retrieves the adapter configuration values from the server
*
* @param serverUrl URL of server to save configuration values to
* @param success Callback triggered on successfully retrieving config values to server
* @param failure Callback triggered if an error occurs while getting the config values
* @memberOf XapiConfig
* @method get
* @static
*/
constructor.get = function(serverUrl, success, failure) {
var fd = new FormData();
EcIdentityManager.signatureSheetAsync(60000, serverUrl, function(signatureSheet) {
fd.append("signatureSheet", signatureSheet);
EcRemote.postExpectingObject(serverUrl, "adapter/xapi/config/get", fd, success, failure);
}, failure);
};
/**
* Saves this config Objects configuration values to the server specified
*
* @param serverUrl URL of server to save configuration values to
* @param success Callback triggered on successfully saving config values to server
* @param failure Callback triggered if an error occurs while saving the config values
* @memberOf XapiConfig
* @method save
*/
prototype.save = function(serverUrl, success, failure) {
var fd = new FormData();
fd.append("config", JSON.stringify(this));
EcIdentityManager.signatureSheetAsync(60000, serverUrl, function(signatureSheet) {
fd.append("signatureSheet", signatureSheet);
EcRemote.postExpectingObject(serverUrl, "adapter/xapi/config/set", fd, success, failure);
}, failure);
};
}, {atProperties: {name: "Array", arguments: [null]}}, {});
/**
* Created by fray on 5/30/17.
*/
var AssertionCoprocessor = function() {};
AssertionCoprocessor = stjs.extend(AssertionCoprocessor, null, [], function(constructor, prototype) {
prototype.assertionProcessor = null;
prototype.collectAssertions = function(ip, listOfCompetencies, success) {
success(new Array());
};
}, {assertionProcessor: "AssertionProcessor"}, {});
/**
* Data structure used to hold data relevant to a request to determine the competence of an individual.
* (hereafter, "Inquiry")
*
* @author fritz.ray@eduworks.com
* @author tom.buskirk@eduworks.com
* @class InquiryPacket
* @module org.cassproject
*/
var InquiryPacket = /**
* Create an InquiryPacket.
*
* @param {EcPk[]} subject Public keys of the individual to retreive assertions about.
* @param {EcCompetency} competency Competency that the inquiry is made about.
* @param {EcLevel} level Level of the competency.
* @param {EcFramework} context Framework to provide boundaries for the inquiry within.
* @param {function(InquiryPacket)} success Method to call when a result has been reached.
* @param {function(string)} failure Method to call if the inquiry fails.
* @param {string} rule For rollup rules, this is a search used to populate this inquiry packet.
* @param {IPType} type The type of this inquiry packet. May be competency, rollup rule, or relation.
* @constructor
*/
function(subject, competency, level, context, success, failure, rule, type) {
this.positive = new Array();
this.negative = new Array();
this.equivalentPackets = new Array();
this.subPackets = new Array();
this.dateCreated = new Date().getTime();
this.subject = subject;
this.competency = new Array();
if (competency != null)
this.competency.push(competency);
this.level = new Array();
if (level != null)
this.level.push(level);
this.context = context;
this.success = success;
this.failure = failure;
this.rule = rule;
this.type = type;
this.result = null;
this.log = "";
};
InquiryPacket = stjs.extend(InquiryPacket, null, [], function(constructor, prototype) {
prototype.root = false;
/**
* One or more identifiers that identify an individual.
*
* @property subject
* @type EcPk[]
*/
prototype.subject = null;
/**
* Competency that this packet is inquiring about.
* May be multiple competencies that are either collapsed due to an inference loop, or are equivalent to one another.
*
* @property competency
* @type EcCompetency[]
*/
prototype.competency = null;
/**
* Framework that this inquiry is scoped to.
*
* @property context
* @type EcFramework
*/
prototype.context = null;
/**
* Callback when this and all child inquiries have successfully reached a conclusion.
*
* @property success
* @type function(InquiryPacket)
*/
prototype.success = null;
/**
* Callback if this inquiry requires additional information to proceed.
*
* @property ask
* @type string function(string)
*/
prototype.ask = null;
/**
* Callback if this inquiry fails.
*
* @property failure
* @type function(string)
*/
prototype.failure = null;
/**
* Level that the competency is being measured at.
* May have multiple levels referring to multiple competencies due to cycles or equivalence.
*
* @property level
* @type EcLevel[]
*/
prototype.level = null;
/**
* Packets that are equivalent to this packet. May be used when equivalence is best represented with additional packets.
*
* @property equivalentPackets
* @type InquiryPacket[]
*/
prototype.equivalentPackets = null;
/**
* Packets that assist in determining the state of this packet.
*
* @property subPackets
* @type InquiryPacket[]
*/
prototype.subPackets = null;
/**
* Datetime representing when this packet was created.
*
* @property dateCreated
* @internal
* @type number
*/
prototype.dateCreated = 0.0;
/**
* Mark true when assertions have been retrieved for this packet.
*
* @property hasCheckedAssertionsForCompetency
* @type boolean
*/
prototype.hasCheckedAssertionsForCompetency = false;
/**
* Mark true when rollup rules have been processed for this packet.
*
* @property hasCheckedRollupRulesForCompetency
* @type boolean
*/
prototype.hasCheckedRollupRulesForCompetency = false;
/**
* Mark true when relations have been processed for this packet.
*
* @property hasCheckedRelationshipsForCompetency
* @type boolean
*/
prototype.hasCheckedRelationshipsForCompetency = false;
/**
* Async counter to keep track of number of unresolved processes.
*
* @property numberOfQueriesRunning
* @type integer
*/
prototype.numberOfQueriesRunning = 0;
/**
* Local log for this inquiry packet.
*
* @property log
* @type string
*/
prototype.log = null;
/**
* Assertions (direct or indirect) that contribute to a positive result.
*
* @property positive
* @type EcAssertion[]
*/
prototype.positive = null;
/**
* Assertions (direct or indirect) that contribute to a negative result.
*
* @property negative
* @type EcAssertion[]
*/
prototype.negative = null;
/**
* Set to true if this packet has completed processing.
*
* @property finished
* @type boolean
*/
prototype.finished = false;
/**
* Set to true if this packet has finished stage one.
*
* @property stageOneFinished
* @type boolean
*/
prototype.stageOneComplete = false;
/**
* Type of inquiry packet. Inquiry packets can represent relational logic, rollup logic or competencies.
*
* @property type
* @type IPType
*/
prototype.type = null;
/**
* Rollup Rule search string. (if IPType == ROLLUPRULE)
*
* @property rule
* @type string
*/
prototype.rule = null;
/**
* Result as a ResultType.
*
* @property result
* @type ResultType
*/
prototype.result = null;
prototype.getContext = function() {
return this.context;
};
/**
* Returns true if any child packets have an indeterminate result.
*
* @return {boolean}
* @method anyIndeterminantChildPackets
*/
prototype.anyIndeterminantChildPackets = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (InquiryPacket.ResultType.INDETERMINANT.equals(this.equivalentPackets[i].result))
return true;
}
for (var i = 0; i < this.subPackets.length; i++) {
if (InquiryPacket.ResultType.INDETERMINANT.equals(this.subPackets[i].result))
return true;
}
return false;
};
/**
* Returns true if all child packets have unknown results.
*
* @return {boolean}
* @method allChildPacketsUnknown
*/
prototype.allChildPacketsUnknown = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (!InquiryPacket.ResultType.UNKNOWN.equals(this.equivalentPackets[i].result))
return false;
}
for (var i = 0; i < this.subPackets.length; i++) {
if (!InquiryPacket.ResultType.UNKNOWN.equals(this.subPackets[i].result))
return false;
}
return true;
};
/**
* Returns true if all child packets have unknown results.
*
* @return {boolean}
* @method allChildPacketsUnknown
*/
prototype.allChildPacketsAreTrue = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (!InquiryPacket.ResultType.TRUE.equals(this.equivalentPackets[i].result))
return false;
}
for (var i = 0; i < this.subPackets.length; i++) {
if (!InquiryPacket.ResultType.TRUE.equals(this.subPackets[i].result))
return false;
}
return true;
};
/**
* Returns true if any child packets have false results.
*
* @return {boolean}
* @method anyChildPacketsAreFalse
*/
prototype.anyChildPacketsAreFalse = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (InquiryPacket.ResultType.FALSE.equals(this.equivalentPackets[i].result))
return true;
}
for (var i = 0; i < this.subPackets.length; i++) {
if (InquiryPacket.ResultType.FALSE.equals(this.subPackets[i].result))
return true;
}
return false;
};
/**
* Returns true if any child packets have unknown results.
*
* @return {boolean}
* @method anyChildPacketsAreUnknown
*/
prototype.anyChildPacketsAreUnknown = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (InquiryPacket.ResultType.UNKNOWN.equals(this.equivalentPackets[i].result))
return true;
}
for (var i = 0; i < this.subPackets.length; i++) {
if (InquiryPacket.ResultType.UNKNOWN.equals(this.subPackets[i].result))
return true;
}
return false;
};
/**
* Returns true if any child packets have true results.
*
* @return {boolean}
* @method anyChildPacketsAreTrue
*/
prototype.anyChildPacketsAreTrue = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (InquiryPacket.ResultType.TRUE.equals(this.equivalentPackets[i].result))
return true;
}
for (var i = 0; i < this.subPackets.length; i++) {
if (InquiryPacket.ResultType.TRUE.equals(this.subPackets[i].result))
return true;
}
return false;
};
/**
* Returns true if all equivalent packets have unknown results.
*
* @return {boolean}
* @method allEquivalentPacketsUnknown
*/
prototype.allEquivalentPacketsUnknown = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (!InquiryPacket.ResultType.UNKNOWN.equals(this.equivalentPackets[i].result))
return false;
}
return true;
};
/**
* Returns true if all equivalent packets have the true or unknown result.
*
* @return {boolean}
* @method allEquivalentPacketsTrueOrUnknown
*/
prototype.allEquivalentPacketsTrueOrUnknown = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (InquiryPacket.ResultType.FALSE.equals(this.equivalentPackets[i].result) || InquiryPacket.ResultType.INDETERMINANT.equals(this.equivalentPackets[i].result))
return false;
}
return true;
};
/**
* Returns true if all sub packets have the true or unknown result.
*
* @return {boolean}
* @method allSubPacketsTrueOrUnknown
*/
prototype.allSubPacketsTrueOrUnknown = function() {
for (var i = 0; i < this.subPackets.length; i++) {
if (InquiryPacket.ResultType.FALSE.equals(this.subPackets[i].result) || InquiryPacket.ResultType.INDETERMINANT.equals(this.subPackets[i].result))
return false;
}
return true;
};
/**
* Returns true if all equivalent packets have the false or unknown result.
*
* @return {boolean}
* @method allEquivalentPacketsFalseOrUnknown
*/
prototype.allEquivalentPacketsFalseOrUnknown = function() {
for (var i = 0; i < this.equivalentPackets.length; i++) {
if (InquiryPacket.ResultType.TRUE.equals(this.equivalentPackets[i].result) || InquiryPacket.ResultType.INDETERMINANT.equals(this.equivalentPackets[i].result))
return false;
}
return true;
};
/**
* Returns true if all sub packets have the false or unknown result.
*
* @return
*/
prototype.allSubPacketsFalseOrUnknown = function() {
for (var i = 0; i < this.subPackets.length; i++) {
if (InquiryPacket.ResultType.TRUE.equals(this.subPackets[i].result) || InquiryPacket.ResultType.INDETERMINANT.equals(this.subPackets[i].result))
return false;
}
return true;
};
/**
* Returns true if the provided ID represents a competency in this packet.
*
* @param competencyId
* @return
*/
prototype.hasId = function(competencyId) {
for (var i = 0; i < this.competency.length; i++)
if (this.competency[i].isId(competencyId))
return true;
return false;
};
constructor.IPType = stjs.enumeration("COMPETENCY", "ROLLUPRULE", "RELATION_AND", "RELATION_OR", "RELATION_NARROWS", "RELATION_BROADENS", "RELATION_REQUIRES", "RELATION_ISREQUIREDBY");
constructor.ResultType = stjs.enumeration("TRUE", "FALSE", "UNKNOWN", "INDETERMINANT");
}, {subject: {name: "Array", arguments: ["EcPk"]}, competency: {name: "Array", arguments: ["EcCompetency"]}, context: "EcFramework", success: {name: "Callback1", arguments: ["InquiryPacket"]}, ask: {name: "Function1", arguments: [null, null]}, failure: {name: "Callback1", arguments: [null]}, level: {name: "Array", arguments: ["EcLevel"]}, equivalentPackets: {name: "Array", arguments: ["InquiryPacket"]}, subPackets: {name: "Array", arguments: ["InquiryPacket"]}, positive: {name: "Array", arguments: ["EcAssertion"]}, negative: {name: "Array", arguments: ["EcAssertion"]}, type: {name: "Enum", arguments: ["InquiryPacket.IPType"]}, result: {name: "Enum", arguments: ["InquiryPacket.ResultType"]}}, {});
var NodePacket = function() {
this.nodeList = new Array();
this.nodeMap = {};
};
NodePacket = stjs.extend(NodePacket, null, [], function(constructor, prototype) {
prototype.nodeList = null;
prototype.nodeMap = null;
prototype.getNodeList = function() {
return this.nodeList;
};
prototype.setNodeList = function(nodeList) {
this.nodeList = nodeList;
};
prototype.getNodeCount = function() {
return this.nodeList.length;
};
prototype.addNode = function(n) {
if (this.nodeMap[n.getId()] == null) {
this.nodeList.push(n);
this.nodeMap[n.getId()] = n;
}
};
prototype.toString = function() {
var ret = "";
ret = ret + "NodePacket: (";
for (var i = 0; i < this.nodeList.length; i++) {
if ((i + 1) < this.nodeList.length)
ret = ret + this.nodeList[i].toString() + ", ";
else
ret = ret + this.nodeList[i].toString();
}
ret = ret + ")";
return ret;
};
}, {nodeList: {name: "Array", arguments: ["Node"]}, nodeMap: {name: "Map", arguments: [null, "Node"]}}, {});
var Node = function(nameId) {
this.name = nameId;
this.id = nameId;
};
Node = stjs.extend(Node, null, [], function(constructor, prototype) {
prototype.name = null;
prototype.id = null;
prototype.getName = function() {
return this.name;
};
prototype.setName = function(name) {
this.name = name;
};
prototype.getId = function() {
return this.id;
};
prototype.setId = function(id) {
this.id = id;
};
prototype.toString = function() {
return "Node: \"" + this.id + "\"";
};
}, {}, {});
var PapDependencyParms = function() {};
PapDependencyParms = stjs.extend(PapDependencyParms, null, [], function(constructor, prototype) {
prototype.parentIndex = null;
prototype.childIndex = null;
prototype.type = null;
prototype.weight = null;
prototype.leak = null;
prototype.dependencyFirst = false;
prototype.reverse = false;
prototype.getParentIndex = function() {
return this.parentIndex;
};
prototype.setParentIndex = function(parentIndex) {
this.parentIndex = parentIndex;
};
prototype.getChildIndex = function() {
return this.childIndex;
};
prototype.setChildIndex = function(childIndex) {
this.childIndex = childIndex;
};
prototype.getType = function() {
return this.type;
};
prototype.setType = function(type) {
this.type = type;
};
prototype.getWeight = function() {
return this.weight;
};
prototype.setWeight = function(weight) {
this.weight = weight;
};
prototype.getLeak = function() {
return this.leak;
};
prototype.setLeak = function(leak) {
this.leak = leak;
};
prototype.getDependencyFirst = function() {
return this.dependencyFirst;
};
prototype.setDependencyFirst = function(dependencyFirst) {
this.dependencyFirst = dependencyFirst;
};
prototype.getReverse = function() {
return this.reverse;
};
prototype.setReverse = function(reverse) {
this.reverse = reverse;
};
prototype.swapParentChildIndexes = function() {
var temp = this.parentIndex;
this.parentIndex = this.childIndex;
this.childIndex = temp;
};
}, {}, {});
var PapUpdate = function(index, change, positive) {
this.index = index;
this.change = change;
this.visited = new Array();
this.positive = positive;
};
PapUpdate = stjs.extend(PapUpdate, null, [], function(constructor, prototype) {
prototype.index = 0;
prototype.visited = null;
prototype.change = 0.0;
prototype.positive = false;
prototype.hasVisited = function(index) {
for (var i = 0; i < this.visited.length; i++) {
if (this.visited[i].intValue() == index)
return true;
}
return false;
};
prototype.updateChild = function(index, change) {
var res = new PapUpdate(index, change, this.positive);
res.setVisited(this.cloneVisited());
res.getVisited().push(index);
return res;
};
prototype.toString = function() {
var sign = this.positive ? "+" : "-";
return "<update " + this.index + " | " + sign + this.change + ">";
};
prototype.compare = function(other) {
var diff = this.change - other.getChange();
if (diff < 0)
return 1;
if (diff > 0)
return -1;
return 0;
};
prototype.cloneVisited = function() {
var newVis = new Array();
for (var i = 0; i < this.visited.length; i++) {
newVis.push(this.visited[i]);
}
return newVis;
};
prototype.getIndex = function() {
return this.index;
};
prototype.setIndex = function(index) {
this.index = index;
};
prototype.getVisited = function() {
return this.visited;
};
prototype.setVisited = function(visited) {
this.visited = visited;
};
prototype.getChange = function() {
return this.change;
};
prototype.setChange = function(change) {
this.change = change;
};
prototype.getPositive = function() {
return this.positive;
};
prototype.setPositive = function(positive) {
this.positive = positive;
};
}, {visited: {name: "Array", arguments: [null]}}, {});
var RelationType = function() {};
RelationType = stjs.extend(RelationType, null, [], function(constructor, prototype) {
constructor.RELATION_TYPE = stjs.enumeration("IS_EQUIVALENT_TO", "NARROWS", "BROADENS", "REQUIRES", "IS_REQUIRED_BY");
}, {}, {});
var SimpleAssertion = function(id, competencyId, confidence) {
this.id = id;
this.competencyId = competencyId;
this.confidence = confidence;
};
SimpleAssertion = stjs.extend(SimpleAssertion, null, [], function(constructor, prototype) {
prototype.id = null;
prototype.subjectPem = null;
prototype.competencyId = null;
prototype.confidence = null;
prototype.assertionDate = null;
prototype.expirationDate = null;
prototype.negative = null;
prototype.getId = function() {
return this.id;
};
prototype.setId = function(id) {
this.id = id;
};
prototype.getSubjectPem = function() {
return this.subjectPem;
};
prototype.setSubjectPem = function(subjectPem) {
this.subjectPem = subjectPem;
};
prototype.getCompetencyId = function() {
return this.competencyId;
};
prototype.setCompetencyId = function(competencyId) {
this.competencyId = competencyId;
};
prototype.getConfidence = function() {
return this.confidence;
};
prototype.setConfidence = function(confidence) {
this.confidence = confidence;
};
prototype.getAssertionDate = function() {
return this.assertionDate;
};
prototype.setAssertionDate = function(assertionDate) {
this.assertionDate = assertionDate;
};
prototype.getExpirationDate = function() {
return this.expirationDate;
};
prototype.setExpirationDate = function(expirationDate) {
this.expirationDate = expirationDate;
};
prototype.isNegative = function() {
return this.negative;
};
prototype.setNegative = function(negative) {
this.negative = negative;
};
}, {}, {});
var ExceptionReturn = function(errorMessage) {
this.errorMessage = errorMessage;
};
ExceptionReturn = stjs.extend(ExceptionReturn, null, [], function(constructor, prototype) {
prototype.errorMessage = null;
prototype.getErrorMessage = function() {
return this.errorMessage;
};
prototype.setErrorMessage = function(errorMessage) {
this.errorMessage = errorMessage;
};
prototype.getJsonString = function() {
return JSON.stringify(this);
};
}, {}, {});
var RrQuery = function() {};
RrQuery = stjs.extend(RrQuery, null, [], function(constructor, prototype) {
prototype.query = null;
}, {}, {});
var PapCompetencyPrediction = function() {};
PapCompetencyPrediction = stjs.extend(PapCompetencyPrediction, null, [], function(constructor, prototype) {
prototype.competencyId = null;
prototype.confidence = 0.0;
prototype.conflictLevel = 0.0;
prototype.conflictClass = null;
prototype.getCompetencyId = function() {
return this.competencyId;
};
prototype.setCompetencyId = function(competencyId) {
this.competencyId = competencyId;
};
prototype.getConfidence = function() {
return this.confidence;
};
prototype.setConfidence = function(confidence) {
this.confidence = confidence;
};
prototype.getConflictLevel = function() {
return this.conflictLevel;
};
prototype.setConflictLevel = function(conflictLevel) {
this.conflictLevel = conflictLevel;
};
prototype.getConflictClass = function() {
return this.conflictClass;
};
prototype.setConflictClass = function(conflictClass) {
this.conflictClass = conflictClass;
};
}, {}, {});
var RrS = function() {
this.token = new Array();
this.query = new Array();
};
RrS = stjs.extend(RrS, null, [], function(constructor, prototype) {
prototype.token = null;
prototype.query = null;
prototype.addToken = function(rrToken) {
this.token.push(rrToken);
};
prototype.addQuery = function(rrQuery) {
this.query.push(rrQuery);
};
}, {token: {name: "Array", arguments: ["RrToken"]}, query: {name: "Array", arguments: ["RrQuery"]}}, {});
var RrToken = function() {};
RrToken = stjs.extend(RrToken, null, [], function(constructor, prototype) {
prototype.number = null;
prototype.bool = null;
}, {}, {});
var NodeRelationMap = function() {
this.nodeList = new Array();
this.relationMap = {};
};
NodeRelationMap = stjs.extend(NodeRelationMap, null, [], function(constructor, prototype) {
prototype.nodeList = null;
prototype.relationMap = null;
prototype.addNodeRelations = function(n, rm) {
this.nodeList.push(n);
this.relationMap[n.getId()] = rm;
};
prototype.getRelationsForNode = function(n) {
return this.relationMap[n.getId()];
};
prototype.getNodeList = function() {
return this.nodeList;
};
prototype.setNodeList = function(nodeList) {
this.nodeList = nodeList;
};
prototype.getRelationMap = function() {
return this.relationMap;
};
prototype.setRelationMap = function(relationMap) {
this.relationMap = relationMap;
};
prototype.toString = function() {
var ret = "";
var n;
var nra;
for (var i = 0; i < this.nodeList.length; i++) {
n = this.nodeList[i];
ret = ret + n.toString() + "\n";
nra = this.relationMap[n.getId()];
for (var j = 0; j < nra.length; j++) {
ret = ret + "\t" + nra[j].toString() + "\n";
}
}
return ret;
};
}, {nodeList: {name: "Array", arguments: ["Node"]}, relationMap: {name: "Map", arguments: [null, {name: "Array", arguments: ["NodeRelation"]}]}}, {});
var NodeRelation = function(source, target, type) {
this.source = source;
this.target = target;
this.type = type;
};
NodeRelation = stjs.extend(NodeRelation, null, [], function(constructor, prototype) {
prototype.type = null;
prototype.source = null;
prototype.target = null;
prototype.getSource = function() {
return this.source;
};
prototype.setSource = function(source) {
this.source = source;
};
prototype.getTarget = function() {
return this.target;
};
prototype.setTarget = function(target) {
this.target = target;
};
prototype.getType = function() {
return this.type;
};
prototype.setType = function(type) {
this.type = type;
};
prototype.toString = function() {
return this.getSource().toString() + " >>" + this.getType() + "<< " + this.getTarget().toString();
};
}, {type: {name: "Enum", arguments: ["RelationType.RELATION_TYPE"]}, source: "Node", target: "Node"}, {});
var CgEdge = function(source, target, relation) {
this.source = source;
this.target = target;
this.relation = relation;
};
CgEdge = stjs.extend(CgEdge, null, [], function(constructor, prototype) {
prototype.source = null;
prototype.target = null;
prototype.relation = null;
prototype.getSource = function() {
return this.source;
};
prototype.setSource = function(source) {
this.source = source;
};
prototype.getTarget = function() {
return this.target;
};
prototype.setTarget = function(target) {
this.target = target;
};
prototype.getRelation = function() {
return this.relation;
};
prototype.setRelation = function(relation) {
this.relation = relation;
};
}, {}, {});
var PapDependencyDefinitionBase = function(depClass, reverse, weight, leak) {
this.depClass = depClass;
this.reverse = reverse;
this.weight = weight;
this.leak = leak;
};
PapDependencyDefinitionBase = stjs.extend(PapDependencyDefinitionBase, null, [], function(constructor, prototype) {
prototype.depClass = null;
prototype.reverse = false;
prototype.weight = null;
prototype.leak = null;
prototype.getDepClass = function() {
return this.depClass;
};
prototype.setDepClass = function(depClass) {
this.depClass = depClass;
};
prototype.getReverse = function() {
return this.reverse;
};
prototype.setReverse = function(reverse) {
this.reverse = reverse;
};
prototype.getWeight = function() {
return this.weight;
};
prototype.setWeight = function(weight) {
this.weight = weight;
};
prototype.getLeak = function() {
return this.leak;
};
prototype.setLeak = function(leak) {
this.leak = leak;
};
}, {}, {});
var ArrayUtil = function() {};
ArrayUtil = stjs.extend(ArrayUtil, null, [], function(constructor, prototype) {
constructor.arrayContains = function(a, o) {
for (var i = 0; i < a.length; i++) {
if (a[i] == o)
return true;
}
return false;
};
constructor.arrayRemove = function(a, o) {
var retArray = new Array();
for (var i = 0; i < a.length; i++) {
if (a[i] != o)
retArray.push(a[i]);
}
return retArray;
};
constructor.arrayLastIndexOf = function(a, o) {
for (var i = (a.length - 1); i >= 0; i--) {
if (a[i] == o)
return i;
}
return -1;
};
constructor.arrayToString = function(a) {
if (a == null || a.length == 0)
return "<Emtpy>";
var ret = "";
for (var i = 0; i < a.length; i++) {
if ((i + 1) < a.length)
ret = ret + a[i].toString() + ", ";
else
ret = ret + a[i].toString();
}
return ret;
};
}, {}, {});
var PacketRelation = function(source, target, type) {
this.source = source;
this.target = target;
this.type = type;
};
PacketRelation = stjs.extend(PacketRelation, null, [], function(constructor, prototype) {
prototype.type = null;
prototype.source = null;
prototype.target = null;
prototype.getSource = function() {
return this.source;
};
prototype.setSource = function(source) {
this.source = source;
};
prototype.getTarget = function() {
return this.target;
};
prototype.setTarget = function(target) {
this.target = target;
};
prototype.getType = function() {
return this.type;
};
prototype.setType = function(type) {
this.type = type;
};
prototype.toString = function() {
return this.getSource().toString() + " >>" + this.getType() + "<< " + this.getTarget().toString();
};
}, {type: {name: "Enum", arguments: ["RelationType.RELATION_TYPE"]}, source: "NodePacket", target: "NodePacket"}, {});
var PapSettings = function() {
this.iterations = PapSettings.DEFAULT_ITERATIONS;
this.abruptExpiration = PapSettings.DEFAULT_ABRUPT_EXP;
this.gradualForgetting = PapSettings.DEFAULT_GRAD_FORGETTING;
this.evidenceWeight = PapSettings.DEFAULT_EVIDENCE_WEIGHT;
this.discount = PapSettings.DEFAULT_DISCOUNT;
this.priorityQueueThreshold = PapSettings.DEFAULT_PRIORITY_QUEUE_THRESHOLD;
this.betaPrecision = PapSettings.DEFAULT_BETA_PRECISION;
this.betaMean = PapSettings.DEFAULT_BETA_MEAN;
};
PapSettings = stjs.extend(PapSettings, null, [], function(constructor, prototype) {
constructor.DEFAULT_ITERATIONS = 200;
constructor.DEFAULT_ABRUPT_EXP = false;
constructor.DEFAULT_GRAD_FORGETTING = true;
constructor.DEFAULT_EVIDENCE_WEIGHT = 1.0;
constructor.DEFAULT_DISCOUNT = 1.0;
constructor.DEFAULT_PRIORITY_QUEUE_THRESHOLD = 0.01;
constructor.DEFAULT_BETA_PRECISION = 0.1;
constructor.DEFAULT_BETA_MEAN = 0.2;
prototype.iterations = null;
prototype.abruptExpiration = false;
prototype.gradualForgetting = false;
prototype.evidenceWeight = null;
prototype.discount = null;
prototype.priorityQueueThreshold = null;
prototype.betaPrecision = null;
prototype.betaMean = null;
prototype.getIterations = function() {
return this.iterations;
};
prototype.setIterations = function(iterations) {
this.iterations = iterations;
};
prototype.getAbruptExpiration = function() {
return this.abruptExpiration;
};
prototype.setAbruptExpiration = function(abruptExpiration) {
this.abruptExpiration = abruptExpiration;
};
prototype.getGradualForgetting = function() {
return this.gradualForgetting;
};
prototype.setGradualForgetting = function(gradualForgetting) {
this.gradualForgetting = gradualForgetting;
};
prototype.getEvidenceWeight = function() {
return this.evidenceWeight;
};
prototype.setEvidenceWeight = function(evidenceWeight) {
this.evidenceWeight = evidenceWeight;
};
prototype.getDiscount = function() {
return this.discount;
};
prototype.setDiscount = function(discount) {
this.discount = discount;
};
prototype.getPriorityQueueThreshold = function() {
return this.priorityQueueThreshold;
};
prototype.setPriorityQueueThreshold = function(priorityQueueThreshold) {
this.priorityQueueThreshold = priorityQueueThreshold;
};
prototype.getBetaPrecision = function() {
return this.betaPrecision;
};
prototype.setBetaPrecision = function(betaPrecision) {
this.betaPrecision = betaPrecision;
};
prototype.getBetaMean = function() {
return this.betaMean;
};
prototype.setBetaMean = function(betaMean) {
this.betaMean = betaMean;
};
}, {}, {});
var PapCompetencyNetwork = function(dependencies, numberNodes, settings) {
this.numberNodes = numberNodes;
this.dependencies = dependencies;
this.activations = new Array();
this.alphas = new Array();
this.betas = new Array();
this.updated = new Array();
for (var i = 0; i < numberNodes; i++) {
var beta_prior = settings.getBetaPrecision();
var beta_mean = settings.getBetaMean();
this.alphas.push(beta_mean * beta_prior);
this.betas.push((1.0 - beta_mean) * beta_prior);
this.activations.push(beta_mean);
this.updated.push(false);
}
};
PapCompetencyNetwork = stjs.extend(PapCompetencyNetwork, null, [], function(constructor, prototype) {
constructor.LOW_CONFLICT_CLASS = "low";
constructor.MEDIUM_CONFLICT_CLASS = "medium";
constructor.HIGH_CONFLICT_CLASS = "high";
constructor.EMPTY_PREDICTION = 0.0;
constructor.EMPTY_CONFLICT_LEVEL = 0.0;
constructor.MEDIUM_CONFLICT_CLASS_QUALIFIER = 1.05;
constructor.HIGH_CONFLICT_CLASS_QUALIFIER = 1.5;
prototype.dependencies = null;
prototype.activations = null;
prototype.alphas = null;
prototype.betas = null;
prototype.updated = null;
prototype.numberNodes = 0;
prototype.update = function(nodeIndex, change, positive) {
var a = this.alphas[nodeIndex];
var b = this.betas[nodeIndex];
if (positive)
this.alphas[nodeIndex] = a + change;
else
this.betas[nodeIndex] = b + change;
this.activations[nodeIndex] = (a + (positive ? change : 0)) / (a + b + change);
this.updated[nodeIndex] = true;
};
prototype.getPrediction = function(index) {
if (this.updated[index]) {
return this.activations[index];
} else
return PapCompetencyNetwork.EMPTY_PREDICTION;
};
prototype.getConflictLevel = function(index) {
if (this.updated[index]) {
var a = this.alphas[index];
var b = this.betas[index];
var act = this.activations[index];
var stdev = Math.sqrt((a * b) / (a + b + 1)) / (a + b);
return Math.min(act, 1.0 - act) / stdev;
} else
return PapCompetencyNetwork.EMPTY_CONFLICT_LEVEL;
};
prototype.getConflictClass = function(index) {
var level = this.getConflictLevel(index);
var res = PapCompetencyNetwork.LOW_CONFLICT_CLASS;
if (level >= PapCompetencyNetwork.MEDIUM_CONFLICT_CLASS_QUALIFIER)
res = PapCompetencyNetwork.MEDIUM_CONFLICT_CLASS;
if (level >= PapCompetencyNetwork.HIGH_CONFLICT_CLASS_QUALIFIER)
res = PapCompetencyNetwork.HIGH_CONFLICT_CLASS;
return res;
};
prototype.getDependencies = function() {
return this.dependencies;
};
prototype.setDependencies = function(dependencies) {
this.dependencies = dependencies;
};
prototype.getActivations = function() {
return this.activations;
};
prototype.setActivations = function(activations) {
this.activations = activations;
};
prototype.getAlphas = function() {
return this.alphas;
};
prototype.setAlphas = function(alphas) {
this.alphas = alphas;
};
prototype.getBetas = function() {
return this.betas;
};
prototype.setBetas = function(betas) {
this.betas = betas;
};
prototype.getUpdated = function() {
return this.updated;
};
prototype.setUpdated = function(updated) {
this.updated = updated;
};
prototype.getNumberNodes = function() {
return this.numberNodes;
};
prototype.setNumberNodes = function(numberNodes) {
this.numberNodes = numberNodes;
};
}, {dependencies: {name: "Map", arguments: [null, {name: "Map", arguments: [null, {name: "Array", arguments: ["PapDependency"]}]}]}, activations: {name: "Array", arguments: [null]}, alphas: {name: "Array", arguments: [null]}, betas: {name: "Array", arguments: [null]}, updated: {name: "Array", arguments: [null]}}, {});
var PapAssertion = function(confidence, competencyIndex, assertionDate, expirationDate, result) {
this.confidence = confidence;
this.assertionDate = assertionDate;
this.expirationDate = expirationDate;
this.result = result;
this.competencyIndex = competencyIndex;
};
PapAssertion = stjs.extend(PapAssertion, null, [], function(constructor, prototype) {
prototype.confidence = null;
prototype.competencyIndex = null;
prototype.assertionDate = null;
prototype.expirationDate = null;
prototype.result = false;
prototype.getConfidence = function() {
return this.confidence;
};
prototype.setConfidence = function(confidence) {
this.confidence = confidence;
};
prototype.getCompetencyIndex = function() {
return this.competencyIndex;
};
prototype.setCompetencyIndex = function(competencyIndex) {
this.competencyIndex = competencyIndex;
};
prototype.getAssertionDate = function() {
return this.assertionDate;
};
prototype.setAssertionDate = function(assertionDate) {
this.assertionDate = assertionDate;
};
prototype.getExpirationDate = function() {
return this.expirationDate;
};
prototype.setExpirationDate = function(expirationDate) {
this.expirationDate = expirationDate;
};
prototype.getResult = function() {
return this.result;
};
prototype.setResult = function(result) {
this.result = result;
};
}, {}, {});
var RollupRuleInterface = function(input, processor) {
var chars = new antlr4.InputStream(input);
var lexer = new RollupLexer.RollupLexer(chars);
var tokens = new antlr4.CommonTokenStream(lexer);
this.parser = new RollupParser.RollupParser(tokens);
this.parser.buildParseTrees = true;
this.listener = new RollupListener.RollupListener();
this.processor = processor;
var me = this;
this.listener.enterS = function(ctx) {
me.processor.enterS(ctx);
};
this.listener.exitS = function(ctx) {
me.processor.exitS(ctx);
me.success(true);
};
this.listener.exitToken = function(ctx) {
me.processor.exitToken(ctx);
};
this.listener.enterQuery = function(ctx) {
me.processor.enterQuery(ctx);
};
this.listener.exitQuery = function(ctx) {
me.processor.exitQuery(ctx);
};
this.listener.exitInnerquery = function(ctx) {
me.processor.exitInnerquery(ctx);
};
this.listener.exitLogical_or_math_operator = function(ctx) {
me.processor.exitLogical_or_math_operator(ctx);
};
this.parser.addParseListener(this.listener);
};
RollupRuleInterface = stjs.extend(RollupRuleInterface, null, [], function(constructor, prototype) {
prototype.logFunction = null;
prototype.success = null;
prototype.failure = null;
prototype.listener = null;
prototype.parser = null;
prototype.processor = null;
prototype.go = function() {
this.processor.logFunction = this.logFunction;
this.processor.success = this.success;
this.processor.failure = this.failure;
this.parser.s();
};
}, {logFunction: {name: "Callback1", arguments: ["Object"]}, success: {name: "Callback1", arguments: [null]}, failure: {name: "Callback1", arguments: [null]}, listener: "RollupListener.RollupListener", parser: "RollupParser.RollupParser", processor: "RollupRuleProcessor"}, {});
var RollupRulePacketGenerator = function(ip, ep) {
this.ip = ip;
this.ep = ep;
this.queries = new Array();
this.queryOperations = new Array();
};
RollupRulePacketGenerator = stjs.extend(RollupRulePacketGenerator, null, [], function(constructor, prototype) {
prototype.queries = null;
prototype.queryOperations = null;
prototype.ip = null;
prototype.ep = null;
constructor.main = function(args) {};
prototype.addQuery = function(query) {
this.queries.push(query);
};
prototype.addQueryOperation = function(operation) {
this.queryOperations.push(operation);
};
prototype.hasOrOperation = function() {
for (var i = 0; i < this.queryOperations.length; i++) {
if (RollupRulePacketGenerator.OperationType.OR.equals(this.queryOperations[i]))
return true;
}
return false;
};
prototype.getIPType = function() {
if (this.hasOrOperation())
return InquiryPacket.IPType.RELATION_OR;
return InquiryPacket.IPType.RELATION_AND;
};
prototype.generateComboAndPacket = function() {
var meEp = this.ep;
var meIp = this.ip;
return new InquiryPacket(this.ip.subject, null, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.RELATION_AND);
};
prototype.generateRollupRulePacket = function(rule) {
var meEp = this.ep;
var meIp = this.ip;
return new InquiryPacket(this.ip.subject, null, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, rule, InquiryPacket.IPType.ROLLUPRULE);
};
prototype.addAllQueries = function(rollupIp) {
for (var i = 0; i < this.queries.length; i++) {
rollupIp.subPackets.push(this.generateRollupRulePacket(this.queries[i]));
}
};
prototype.buildQueryTree = function(rollupIp) {
if (this.queryOperations.length <= 0)
return;
var currentAndPacket = this.generateComboAndPacket();
var priorOt;
if (RollupRulePacketGenerator.OperationType.OR.equals(this.queryOperations[0]))
rollupIp.subPackets.push(this.generateRollupRulePacket(this.queries[0]));
else
currentAndPacket.subPackets.push(this.generateRollupRulePacket(this.queries[0]));
priorOt = this.queryOperations[0];
for (var i = 1; i < this.queryOperations.length; i++) {
if (RollupRulePacketGenerator.OperationType.OR.equals(this.queryOperations[i])) {
if (RollupRulePacketGenerator.OperationType.OR.equals(priorOt))
rollupIp.subPackets.push(this.generateRollupRulePacket(this.queries[i]));
else {
currentAndPacket.subPackets.push(this.generateRollupRulePacket(this.queries[i]));
rollupIp.subPackets.push(currentAndPacket);
}
} else {
if (RollupRulePacketGenerator.OperationType.OR.equals(priorOt)) {
currentAndPacket = this.generateComboAndPacket();
currentAndPacket.subPackets.push(this.generateRollupRulePacket(this.queries[i]));
} else
currentAndPacket.subPackets.push(this.generateRollupRulePacket(this.queries[i]));
}
priorOt = this.queryOperations[i];
}
if (RollupRulePacketGenerator.OperationType.OR.equals(priorOt))
rollupIp.subPackets.push(this.generateRollupRulePacket(this.queries[this.queries.length - 1]));
else {
currentAndPacket.subPackets.push(this.generateRollupRulePacket(this.queries[this.queries.length - 1]));
rollupIp.subPackets.push(currentAndPacket);
}
};
prototype.generatePacket = function() {
var ipt = this.getIPType();
var meEp = this.ep;
var meIp = this.ip;
var rollupIp = new InquiryPacket(this.ip.subject, null, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, ipt);
if (InquiryPacket.IPType.RELATION_AND.equals(ipt))
this.addAllQueries(rollupIp);
else
this.buildQueryTree(rollupIp);
return rollupIp;
};
constructor.OperationType = stjs.enumeration("AND", "OR");
}, {queries: {name: "Array", arguments: [null]}, queryOperations: {name: "Array", arguments: [{name: "Enum", arguments: ["RollupRulePacketGenerator.OperationType"]}]}, ip: "InquiryPacket", ep: "AssertionProcessor"}, {});
if (!stjs.mainCallDisabled)
RollupRulePacketGenerator.main();
var PapDependency = function(depParms) {
PapDependencyParms.call(this);
if (depParms.getDependencyFirst()) {
this.setParentIndex(depParms.getParentIndex());
this.setChildIndex(depParms.getChildIndex());
} else {
this.setChildIndex(depParms.getParentIndex());
this.setParentIndex(depParms.getChildIndex());
}
this.setType(depParms.getType());
this.setWeight(depParms.getWeight());
this.setLeak(depParms.getLeak());
};
PapDependency = stjs.extend(PapDependency, PapDependencyParms, [], function(constructor, prototype) {
constructor.NECESSARY_TYPE = "NECESSARY";
constructor.SUFFICIENT_TYPE = "SUFFICIENT";
constructor.EQUIVALENCE_TYPE = "EQUIVALENCE";
constructor.BROADENS_TYPE = "BROADENS";
constructor.NULL_TYPE = "NULL";
constructor.HASH_CODE_MULTIPLIER = 41;
constructor.HASH_CODE_PERCENTAGE_MULTIPLIER = 97;
constructor.getDependencyTypes = function() {
var dt = new Array();
dt.push(PapDependency.NECESSARY_TYPE);
dt.push(PapDependency.SUFFICIENT_TYPE);
dt.push(PapDependency.EQUIVALENCE_TYPE);
dt.push(PapDependency.BROADENS_TYPE);
dt.push(PapDependency.NULL_TYPE);
return dt;
};
prototype.toString = function() {
return "Dependency: [" + this.getType().toString() + "] " + this.getParentIndex() + " <-- " + this.getChildIndex();
};
prototype.equals = function(other) {
return (this.getParentIndex() == (other).getParentIndex()) && (this.getChildIndex() == (other).getChildIndex()) && (this.getType() == (other).getType());
};
prototype.hashCode = function() {
var temp = 0;
if (PapDependency.NECESSARY_TYPE.equalsIgnoreCase(this.getType()))
temp = 1;
else if (PapDependency.EQUIVALENCE_TYPE.equalsIgnoreCase(this.getType()))
temp = 2;
else if (PapDependency.SUFFICIENT_TYPE.equalsIgnoreCase(this.getType()))
temp = 3;
else if (PapDependency.BROADENS_TYPE.equalsIgnoreCase(this.getType()))
temp = 4;
temp *= PapDependency.HASH_CODE_MULTIPLIER;
temp += this.getParentIndex();
temp *= PapDependency.HASH_CODE_MULTIPLIER;
temp += this.getChildIndex();
return temp + (stjs.trunc((100 * this.getWeight())) % PapDependency.HASH_CODE_PERCENTAGE_MULTIPLIER);
};
}, {}, {});
/**
* Creates child packets for an InquiryPacket based on its context.
*
* @author fritz.ray@eduworks.com
* @author tom.buskirk@eduworks.com
* @class RelationshipPacketGenerator
* @module org.cassproject
*/
var RelationshipPacketGenerator = /**
* Constructor for the RelationshipPacketGenerator
*
* @param {InquiryPacket} ip Inquiry Packet to generate and fill with relationship packets.
* @param {AssertionProcessor} ep Assertion processor to tell to resume when complete.
* @param {object} processedAlignments An object to fill with keys to ensure that relations are not processed twice.
* @constructor
*/
function(ip, ep, processedAlignments) {
this.ip = ip;
this.ep = ep;
this.processedAlignments = processedAlignments;
this.narrowsPackets = new Array();
this.broadensPackets = new Array();
this.requiredPackets = new Array();
this.isRequiredByPackets = new Array();
};
RelationshipPacketGenerator = stjs.extend(RelationshipPacketGenerator, null, [], function(constructor, prototype) {
/**
* Method to call when any operation fails.
*
* @property failure
* @type function(string)
*/
prototype.failure = null;
/**
* Method to call when the operation succeeds.
*
* @property success
* @type function()
*/
prototype.success = null;
/**
* Method to call when the generator has log statements to emit.
*
* @property logFunction
* @type function(any)
*/
prototype.logFunction = null;
/**
* List of packets representing the narrows relation.
*
* @property narrowsPackets
* @type InquiryPacket[]
*/
prototype.narrowsPackets = null;
/**
* List of packets representing the broadens relation.
*
* @property broadensPackets
* @type InquiryPacket[]
*/
prototype.broadensPackets = null;
/**
* List of packets representing the required relation.
*
* @property requiredPackets
* @type InquiryPacket[]
*/
prototype.requiredPackets = null;
/**
* List of packets representing the isRequiredBy relation.
*
* @property isRequiredByPackets
* @type InquiryPacket[]
*/
prototype.isRequiredByPackets = null;
prototype.relationLookup = null;
/**
* Async counter to keep track of number of outstanding requests.
*
* @property numberOfRelationsToProcess
* @type integer
*/
prototype.numberOfRelationsToProcess = 0;
/**
* Number of relations that have been processed.
*
* @property numberOfRelationsProcessed
* @type integer
*/
prototype.numberOfRelationsProcessed = 0;
/**
* Alignments to ignore, as they have already been processed.
*
* @property processedAlignments;
* @type Object (Map<String,String>)
*/
prototype.processedAlignments = null;
/**
* Assertion Processor that invoked this generator.
*
* @property ep
* @type AssertionProcessor
*/
prototype.ep = null;
/**
* Inquiry Packet that this generator is creating relationships for.
*
* @property ip
* @type InquiryPacket
*/
prototype.ip = null;
prototype.log = function(string) {
if (this.logFunction != null)
this.logFunction("" + new Date().getTime() % 100000 + ": " + string);
};
prototype.processEventFailure = function(message, ip) {
ip.numberOfQueriesRunning--;
this.failure(message);
};
prototype.pushRequiredPacketsToIp = function() {
if (this.requiredPackets.length > 0) {
var meEp = this.ep;
var meIp = this.ip;
var rootRequiredPacket = new InquiryPacket(this.ip.subject, null, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.RELATION_REQUIRES);
rootRequiredPacket.subPackets = this.requiredPackets;
this.ip.subPackets.push(rootRequiredPacket);
}
};
prototype.pushIsRequiredByPacketsToIp = function() {
if (this.isRequiredByPackets.length > 0) {
var meEp = this.ep;
var meIp = this.ip;
var rootRequiredPacket = new InquiryPacket(this.ip.subject, null, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.RELATION_ISREQUIREDBY);
rootRequiredPacket.subPackets = this.isRequiredByPackets;
this.ip.subPackets.push(rootRequiredPacket);
}
};
prototype.pushNarrowsPacketsToIp = function() {
if (this.narrowsPackets.length > 0) {
var meEp = this.ep;
var meIp = this.ip;
var rootNarrowsPacket = new InquiryPacket(this.ip.subject, null, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.RELATION_NARROWS);
rootNarrowsPacket.subPackets = this.narrowsPackets;
this.ip.subPackets.push(rootNarrowsPacket);
}
};
prototype.pushBroadensPacketsToIp = function() {
if (this.broadensPackets.length > 0) {
var meEp = this.ep;
var meIp = this.ip;
var rootBroadensPacket = new InquiryPacket(this.ip.subject, null, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.RELATION_BROADENS);
rootBroadensPacket.subPackets = this.broadensPackets;
this.ip.subPackets.push(rootBroadensPacket);
}
};
prototype.finishRelationProcessing = function() {
this.pushRequiredPacketsToIp();
this.pushIsRequiredByPacketsToIp();
this.pushNarrowsPacketsToIp();
this.pushBroadensPacketsToIp();
this.success();
};
prototype.processGetRelatedCompetencySuccess = function(relatedCompetency, alignment) {
this.numberOfRelationsProcessed++;
var meEp = this.ep;
var meIp = this.ip;
if (this.processedAlignments[alignment.shortId()] != null) {
this.ip.numberOfQueriesRunning--;
this.checkForFinish();
return;
}
this.processedAlignments[alignment.shortId()] = "done";
this.log("Adding new " + alignment.relationType + " relationship packet");
if (EcAlignment.IS_EQUIVALENT_TO.equals(alignment.relationType)) {
var ip2 = null;
this.ip.equivalentPackets.push(ip2 = new InquiryPacket(this.ip.subject, relatedCompetency, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.COMPETENCY));
} else if (EcAlignment.REQUIRES.equals(alignment.relationType)) {
if (this.ip.hasId(alignment.source))
this.requiredPackets.push(new InquiryPacket(this.ip.subject, relatedCompetency, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.COMPETENCY));
else
this.isRequiredByPackets.push(new InquiryPacket(this.ip.subject, relatedCompetency, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.COMPETENCY));
} else if (EcAlignment.NARROWS.equals(alignment.relationType)) {
if (this.ip.hasId(alignment.source))
this.narrowsPackets.push(new InquiryPacket(this.ip.subject, relatedCompetency, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.COMPETENCY));
else
this.broadensPackets.push(new InquiryPacket(this.ip.subject, relatedCompetency, null, this.ip.context, function(p1) {
if (meEp != null)
meEp.continueProcessingFirstPass(meIp);
}, this.ip.failure, null, InquiryPacket.IPType.COMPETENCY));
}
this.ip.numberOfQueriesRunning--;
this.checkForFinish();
};
prototype.checkForFinish = function() {
if (this.numberOfRelationsProcessed >= this.numberOfRelationsToProcess)
this.finishRelationProcessing();
};
prototype.processFindCompetencyRelationshipSuccess = function(alignment, ip) {
ip.numberOfQueriesRunning--;
var relatedCompetencyId = null;
if (ip.hasId(alignment.source) && ip.hasId(alignment.target)) {
this.numberOfRelationsProcessed++;
this.checkForFinish();
return;
} else if (ip.hasId(alignment.source))
relatedCompetencyId = alignment.target;
else if (ip.hasId(alignment.target))
relatedCompetencyId = alignment.source;
else {
this.numberOfRelationsProcessed++;
this.checkForFinish();
return;
}
this.log("Relationship found (" + alignment.relationType + ") source: " + alignment.source + " target: " + alignment.target);
ip.numberOfQueriesRunning++;
var rpg = this;
EcCompetency.get(relatedCompetencyId, function(p1) {
rpg.processGetRelatedCompetencySuccess(p1, alignment);
}, function(p1) {
rpg.processEventFailure(p1, ip);
});
};
/**
* Method to invoke to begin relation processing.
*
* @method go
*/
prototype.go = function() {
var rpg = this;
if (this.ip.getContext().relation == null)
this.success();
else {
this.numberOfRelationsToProcess = 0;
for (var i = 0; i < this.ip.competency.length; i++) {
var relationsRelatedToThisCompetency = (this.relationLookup)[this.ip.competency[i].shortId()];
if (relationsRelatedToThisCompetency == null)
relationsRelatedToThisCompetency = new Array();
this.numberOfRelationsToProcess += relationsRelatedToThisCompetency.length;
this.numberOfRelationsProcessed = 0;
for (var j = 0; j < relationsRelatedToThisCompetency.length; j++) {
this.ip.numberOfQueriesRunning++;
rpg.processFindCompetencyRelationshipSuccess(relationsRelatedToThisCompetency[j], rpg.ip);
}
if (relationsRelatedToThisCompetency.length == 0) {
this.checkForFinish();
}
}
}
};
}, {failure: {name: "Callback1", arguments: [null]}, success: "Callback0", logFunction: {name: "Callback1", arguments: ["Object"]}, narrowsPackets: {name: "Array", arguments: ["InquiryPacket"]}, broadensPackets: {name: "Array", arguments: ["InquiryPacket"]}, requiredPackets: {name: "Array", arguments: ["InquiryPacket"]}, isRequiredByPackets: {name: "Array", arguments: ["InquiryPacket"]}, relationLookup: "Object", processedAlignments: {name: "Map", arguments: [null, null]}, ep: "AssertionProcessor", ip: "InquiryPacket"}, {});
var RollupRuleGenerator = function(ip) {
this.ip = ip;
this.rule = "";
this.outerRule = "";
};
RollupRuleGenerator = stjs.extend(RollupRuleGenerator, null, [], function(constructor, prototype) {
prototype.failure = null;
prototype.success = null;
prototype.rule = null;
prototype.outerRule = null;
prototype.ip = null;
prototype.go = function() {
var me = this;
if (this.ip.getContext().relation == null)
this.success(null);
else
for (var i = 0; i < this.ip.getContext().relation.length; i++) {
this.ip.numberOfQueriesRunning++;
EcAlignment.get(this.ip.getContext().relation[i], function(p1) {
me.ip.numberOfQueriesRunning--;
if (!p1.source.equals(me.ip.competency) && !p1.target.equals(me.ip.competency))
return;
if (p1.source.equals(me.ip.competency)) {
if (p1.relationType.equals(EcAlignment.REQUIRES)) {
if (me.rule != null && me.rule != "")
me.rule += " AND ";
me.rule += "[notNegative competency:\"" + p1.target + "\"]";
}
if (p1.relationType.equals(EcAlignment.NARROWS)) {
if (me.outerRule != null && me.outerRule != "")
me.outerRule += " OR ";
me.outerRule += "[competency:\"" + p1.target + "\"]";
}
}
}, function(p1) {
me.ip.numberOfQueriesRunning--;
});
}
};
}, {failure: {name: "Callback1", arguments: [null]}, success: {name: "Callback1", arguments: [null]}, ip: "InquiryPacket"}, {});
var PapNetworkPrediction = function(predictionDate, subjectPem, competencyList, competencyNetwork) {
this.predictionDate = predictionDate;
this.subjectPem = subjectPem;
this.predictions = new Array();
var currentCompetency;
var pcp;
for (var i = 0; i < competencyList.length; i++) {
currentCompetency = competencyList[i];
pcp = new PapCompetencyPrediction();
pcp.setCompetencyId(currentCompetency);
pcp.setConfidence(competencyNetwork.getPrediction(i));
pcp.setConflictLevel(competencyNetwork.getConflictLevel(i));
pcp.setConflictClass(competencyNetwork.getConflictClass(i));
this.predictions.push(pcp);
}
};
PapNetworkPrediction = stjs.extend(PapNetworkPrediction, null, [], function(constructor, prototype) {
prototype.predictionDate = null;
prototype.subjectPem = null;
prototype.predictions = null;
prototype.getPredictionDate = function() {
return this.predictionDate;
};
prototype.setPredictionDate = function(predictionDate) {
this.predictionDate = predictionDate;
};
prototype.getSubjectPem = function() {
return this.subjectPem;
};
prototype.setSubjectPem = function(subjectPem) {
this.subjectPem = subjectPem;
};
prototype.getPredictions = function() {
return this.predictions;
};
prototype.setPredictions = function(predictions) {
this.predictions = predictions;
};
prototype.getJsonString = function() {
return JSON.stringify(this);
};
}, {predictions: {name: "Array", arguments: ["PapCompetencyPrediction"]}}, {});
var NodeGraph = function() {
this.nodeList = new Array();
this.relationList = new Array();
this.nodeMap = {};
this.relationMap = {};
};
NodeGraph = stjs.extend(NodeGraph, null, [], function(constructor, prototype) {
prototype.nodeList = null;
prototype.nodeMap = null;
prototype.relationList = null;
prototype.relationMap = null;
prototype.addNode = function(n) {
if (this.nodeMap[n.getId()] == null) {
this.nodeList.push(n);
this.nodeMap[n.getId()] = n;
}
};
prototype.createImpliedRelations = function() {
var relationsToAdd = new Array();
var nr;
for (var i = 0; i < this.relationList.length; i++) {
nr = this.relationList[i];
if (nr.getType() == RelationType.RELATION_TYPE.NARROWS) {
relationsToAdd.push(new NodeRelation(nr.getTarget(), nr.getSource(), RelationType.RELATION_TYPE.BROADENS));
} else if (nr.getType() == RelationType.RELATION_TYPE.REQUIRES) {
relationsToAdd.push(new NodeRelation(nr.getTarget(), nr.getSource(), RelationType.RELATION_TYPE.IS_REQUIRED_BY));
} else if (nr.getType() == RelationType.RELATION_TYPE.BROADENS) {
relationsToAdd.push(new NodeRelation(nr.getTarget(), nr.getSource(), RelationType.RELATION_TYPE.NARROWS));
} else if (nr.getType() == RelationType.RELATION_TYPE.IS_REQUIRED_BY) {
relationsToAdd.push(new NodeRelation(nr.getTarget(), nr.getSource(), RelationType.RELATION_TYPE.REQUIRES));
}
}
var nnr;
for (var i = 0; i < relationsToAdd.length; i++) {
nnr = relationsToAdd[i];
this.addRelation(nnr.getSource(), nnr.getTarget(), nnr.getType());
}
};
prototype.addRelation = function(sourceNode, targetNode, relationType) {
var nodeRelationList;
if (this.nodeHasRelations(sourceNode))
nodeRelationList = this.getRelationListForNode(sourceNode);
else {
nodeRelationList = new Array();
this.relationMap[sourceNode.getId()] = nodeRelationList;
}
var newNodeRelation = new NodeRelation(sourceNode, targetNode, relationType);
if (!this.doesRelationAlreadyExist(newNodeRelation, nodeRelationList)) {
nodeRelationList.push(newNodeRelation);
this.relationList.push(newNodeRelation);
}
};
prototype.getRelationListForNode = function(n) {
return this.relationMap[n.getId()];
};
prototype.getNarrowsIsRequiredByEqualsRelationListForNode = function(n) {
var retList = new Array();
if (this.relationMap[n.getId()] != null) {
var nra = this.relationMap[n.getId()];
var nr;
for (var i = 0; i < nra.length; i++) {
nr = nra[i];
if (nr.getType() == RelationType.RELATION_TYPE.IS_EQUIVALENT_TO || nr.getType() == RelationType.RELATION_TYPE.NARROWS || nr.getType() == RelationType.RELATION_TYPE.IS_REQUIRED_BY) {
retList.push(nr);
}
}
}
return retList;
};
prototype.getBroadensRequiresEqualsRelationListForNode = function(n) {
var retList = new Array();
if (this.relationMap[n.getId()] != null) {
var nra = this.relationMap[n.getId()];
var nr;
for (var i = 0; i < nra.length; i++) {
nr = nra[i];
if (nr.getType() == RelationType.RELATION_TYPE.IS_EQUIVALENT_TO || nr.getType() == RelationType.RELATION_TYPE.BROADENS || nr.getType() == RelationType.RELATION_TYPE.REQUIRES) {
retList.push(nr);
}
}
}
return retList;
};
prototype.getNodeList = function() {
return this.nodeList;
};
prototype.setNodeList = function(nodeList) {
this.nodeList = nodeList;
};
prototype.getRelationList = function() {
return this.relationList;
};
prototype.setRelationList = function(relationList) {
this.relationList = relationList;
};
prototype.nodeHasRelations = function(n) {
if (this.relationMap[n.getId()] == null)
return false;
return true;
};
prototype.doesRelationAlreadyExist = function(nodeRelation, nodeRelationList) {
var nr;
for (var i = 0; i < nodeRelationList.length; i++) {
nr = nodeRelationList[i];
if (nodeRelation.getSource().getId() == nr.getSource().getId() && nodeRelation.getTarget().getId() == nr.getTarget().getId() && nodeRelation.getType() == nr.getType())
return true;
}
return false;
};
prototype.toStringGraphAll = function() {
var ret = "";
var n;
for (var i = 0; i < this.nodeList.length; i++) {
n = this.nodeList[i];
ret = ret + n.toString() + "\n";
}
var nr;
for (var i = 0; i < this.relationList.length; i++) {
nr = this.relationList[i];
ret = ret + nr.toString() + "\n";
}
return ret;
};
prototype.toStringGraphByNode = function() {
var ret = "";
ret = ret + " - TEST HOWDY - \n";
var n;
var nra;
var nr;
for (var i = 0; i < this.nodeList.length; i++) {
n = this.nodeList[i];
ret = ret + " --> " + n.toString() + "\n";
if (this.nodeHasRelations(n)) {
nra = this.getRelationListForNode(n);
for (var j = 0; j < nra.length; j++) {
nr = nra[j];
ret = ret + "\t\t" + nr.toString() + "\n";
}
} else
ret = ret + "\t\t---------NO RELATIONSHIPS---------\n";
}
return ret;
};
prototype.toStringGraphByNodeSplit = function() {
var ret = "";
var n;
var nra;
var nr;
for (var i = 0; i < this.nodeList.length; i++) {
n = this.nodeList[i];
ret = ret + " --> " + n.toString() + "\n";
if (this.nodeHasRelations(n)) {
ret = ret + "\t\t=== Narrows/isRequiredBy ===\n";
nra = this.getNarrowsIsRequiredByEqualsRelationListForNode(n);
for (var j = 0; j < nra.length; j++) {
nr = nra[j];
ret = ret + "\t\t" + nr.toString() + "\n";
}
ret = ret + "\t\t=== Broadens/Requires ===\n";
nra = this.getBroadensRequiresEqualsRelationListForNode(n);
for (var j = 0; j < nra.length; j++) {
nr = nra[j];
ret = ret + "\t\t" + nr.toString() + "\n";
}
} else
ret = ret + "\t\t---------NO RELATIONSHIPS---------\n";
}
return ret;
};
}, {nodeList: {name: "Array", arguments: ["Node"]}, nodeMap: {name: "Map", arguments: [null, "Node"]}, relationList: {name: "Array", arguments: ["NodeRelation"]}, relationMap: {name: "Map", arguments: [null, {name: "Array", arguments: ["NodeRelation"]}]}}, {});
var CompetencyGraph = function(includeAssertions) {
this.nodes = new Array();
this.edges = new Array();
this.positiveAssertions = new Array();
this.negativeAssertions = new Array();
this.nodeMap = {};
this.edgeMap = {};
this.includeAssertions = includeAssertions;
};
CompetencyGraph = stjs.extend(CompetencyGraph, null, [], function(constructor, prototype) {
constructor.NARROWS_RELATION_TEXT = "narrows";
constructor.BROADENS_RELATION_TEXT = "broadens";
constructor.REQUIRES_RELATION_TEXT = "requires";
constructor.IS_REQUIRED_BY_RELATION_TEXT = "isRequiredBy";
constructor.IS_EQUIVALENT_TO_RELATION_TEXT = "isEquivalentTo";
constructor.EDGE_MAP_FIELD_DELIMETER = " -------||||||------- ";
constructor.CleanGraph = function(nodes, edges) {
this.nodes = nodes;
this.edges = edges;
};
constructor.CleanGraph = stjs.extend(constructor.CleanGraph, null, [], function(constructor, prototype) {
prototype.nodes = null;
prototype.edges = null;
}, {nodes: {name: "Array", arguments: [null]}, edges: {name: "Array", arguments: ["CgEdge"]}}, {});
constructor.CleanGraphWithAssertions = function(nodes, edges, positiveAssertions, negativeAssertions) {
this.nodes = nodes;
this.edges = edges;
this.positiveAssertions = positiveAssertions;
this.negativeAssertions = negativeAssertions;
};
constructor.CleanGraphWithAssertions = stjs.extend(constructor.CleanGraphWithAssertions, null, [], function(constructor, prototype) {
prototype.nodes = null;
prototype.edges = null;
prototype.positiveAssertions = null;
prototype.negativeAssertions = null;
}, {nodes: {name: "Array", arguments: [null]}, edges: {name: "Array", arguments: ["CgEdge"]}, positiveAssertions: {name: "Array", arguments: ["SimpleAssertion"]}, negativeAssertions: {name: "Array", arguments: ["SimpleAssertion"]}}, {});
prototype.nodes = null;
prototype.edges = null;
prototype.positiveAssertions = null;
prototype.negativeAssertions = null;
prototype.nodeMap = null;
prototype.edgeMap = null;
prototype.includeAssertions = false;
prototype.addNode = function(id) {
if (!this.graphContainsNode(id)) {
this.nodes.push(id);
this.nodeMap[id] = id;
}
};
prototype.getEdgeKey = function(source, target, relationType) {
return source + CompetencyGraph.EDGE_MAP_FIELD_DELIMETER + target + CompetencyGraph.EDGE_MAP_FIELD_DELIMETER + relationType;
};
prototype.addEdge = function(source, target, relationType) {
if (!this.graphContainsEdge(source, target, relationType)) {
this.edges.push(new CgEdge(source, target, relationType));
var edgeKey = this.getEdgeKey(source, target, relationType);
this.edgeMap[edgeKey] = edgeKey;
}
};
prototype.addPositiveAssertion = function(simpleAssertion) {
if (simpleAssertion != null)
this.positiveAssertions.push(simpleAssertion);
};
prototype.addNegativeAssertion = function(simpleAssertion) {
if (simpleAssertion != null)
this.negativeAssertions.push(simpleAssertion);
};
prototype.graphContainsNode = function(nodeId) {
if (this.nodeMap[nodeId] == null)
return false;
return true;
};
prototype.graphContainsEdge = function(source, target, relationType) {
if (this.edgeMap[this.getEdgeKey(source, target, relationType)] == null)
return false;
return true;
};
prototype.createImpliedRelationships = function() {
var edgesToAdd = new Array();
var e;
for (var i = 0; i < this.edges.length; i++) {
e = this.edges[i];
if (e.getRelation().equalsIgnoreCase(CompetencyGraph.NARROWS_RELATION_TEXT)) {
edgesToAdd.push(new CgEdge(e.getTarget(), e.getSource(), CompetencyGraph.BROADENS_RELATION_TEXT));
} else if (e.getRelation().equalsIgnoreCase(CompetencyGraph.REQUIRES_RELATION_TEXT)) {
edgesToAdd.push(new CgEdge(e.getTarget(), e.getSource(), CompetencyGraph.IS_REQUIRED_BY_RELATION_TEXT));
} else if (e.getRelation().equalsIgnoreCase(CompetencyGraph.IS_EQUIVALENT_TO_RELATION_TEXT)) {
edgesToAdd.push(new CgEdge(e.getTarget(), e.getSource(), CompetencyGraph.IS_EQUIVALENT_TO_RELATION_TEXT));
}
}
var ne;
for (var i = 0; i < edgesToAdd.length; i++) {
ne = edgesToAdd[i];
this.addEdge(ne.getSource(), ne.getTarget(), ne.getRelation());
}
};
prototype.getJsonString = function() {
if (this.includeAssertions)
return JSON.stringify(new CompetencyGraph.CleanGraphWithAssertions(this.nodes, this.edges, this.positiveAssertions, this.negativeAssertions));
else
return JSON.stringify(new CompetencyGraph.CleanGraph(this.nodes, this.edges));
};
prototype.getNodes = function() {
return this.nodes;
};
prototype.setNodes = function(nodes) {
this.nodes = nodes;
};
prototype.getEdges = function() {
return this.edges;
};
prototype.setEdges = function(edges) {
this.edges = edges;
};
prototype.getPositiveAssertions = function() {
return this.positiveAssertions;
};
prototype.setPositiveAssertions = function(positiveAssertions) {
this.positiveAssertions = positiveAssertions;
};
prototype.getNegativeAssertions = function() {
return this.negativeAssertions;
};
prototype.setNegativeAssertions = function(negativeAssertions) {
this.negativeAssertions = negativeAssertions;
};
}, {nodes: {name: "Array", arguments: [null]}, edges: {name: "Array", arguments: ["CgEdge"]}, positiveAssertions: {name: "Array", arguments: ["SimpleAssertion"]}, negativeAssertions: {name: "Array", arguments: ["SimpleAssertion"]}, nodeMap: {name: "Map", arguments: [null, null]}, edgeMap: {name: "Map", arguments: [null, null]}}, {});
var PapDependencyDefinitions = function() {
this.dependencyDefinitionMap = {};
};
PapDependencyDefinitions = stjs.extend(PapDependencyDefinitions, null, [], function(constructor, prototype) {
constructor.DEFAULT_WEIGHT = 1.0;
constructor.DEFAULT_LEAK = 0.0;
constructor.DEFAULT_REVERSE = false;
constructor.DEFAULT_NARROWS_BASE_CLASS = "broadens";
constructor.DEFAULT_NARROWS_REVERSE = true;
constructor.DEFAULT_NARROWS_WEIGHT = 0.9;
constructor.DEFAULT_NARROWS_LEAK = 0.0;
constructor.DEFAULT_NARROWS_KEY = "narrows";
constructor.DEFAULT_ENABLES_BASE_CLASS = "isSufficientFor";
constructor.DEFAULT_ENABLES_REVERSE = true;
constructor.DEFAULT_ENABLES_WEIGHT = 0.9;
constructor.DEFAULT_ENABLES_LEAK = 0.0;
constructor.DEFAULT_ENABLES_KEY = "enables";
constructor.DEFAULT_REQUIRES_BASE_CLASS = "isRequiredBy";
constructor.DEFAULT_REQUIRES_REVERSE = false;
constructor.DEFAULT_REQUIRES_WEIGHT = 0.9;
constructor.DEFAULT_REQUIRES_LEAK = 0.0;
constructor.DEFAULT_REQUIRES_KEY = "requires";
prototype.dependencyDefinitionMap = null;
/**
* Pulled default values from CruncherAssertionProcessor
* dependencyDefs = new JSONObject();
*
* JSONObject narrows = new JSONObject();
* narrows.put("class","broadens");
* narrows.put("reverse",true);
* narrows.put("weight",0.9);
* dependencyDefs.put("narrows",narrows);
*
* JSONObject enables = new JSONObject();
* enables.put("class","isSufficientFor");
* enables.put("weight",0.9);
* enables.put("reverse",true);
* dependencyDefs.put("enables",enables);
*
* JSONObject requires = new JSONObject();
* requires.put("class","isRequiredBy");
* requires.put("weight",0.9);
* dependencyDefs.put("requires",requires);
*/
prototype.initDefaultDefinitions = function() {
var narrowsDepDef = new PapDependencyDefinitionBase(PapDependencyDefinitions.DEFAULT_NARROWS_BASE_CLASS, PapDependencyDefinitions.DEFAULT_NARROWS_REVERSE, PapDependencyDefinitions.DEFAULT_NARROWS_WEIGHT, PapDependencyDefinitions.DEFAULT_NARROWS_LEAK);
var enablesDepDef = new PapDependencyDefinitionBase(PapDependencyDefinitions.DEFAULT_ENABLES_BASE_CLASS, PapDependencyDefinitions.DEFAULT_ENABLES_REVERSE, PapDependencyDefinitions.DEFAULT_ENABLES_WEIGHT, PapDependencyDefinitions.DEFAULT_ENABLES_LEAK);
var requiresDepDef = new PapDependencyDefinitionBase(PapDependencyDefinitions.DEFAULT_REQUIRES_BASE_CLASS, PapDependencyDefinitions.DEFAULT_REQUIRES_REVERSE, PapDependencyDefinitions.DEFAULT_REQUIRES_WEIGHT, PapDependencyDefinitions.DEFAULT_REQUIRES_LEAK);
this.addDependencyDefinition(PapDependencyDefinitions.DEFAULT_NARROWS_KEY, narrowsDepDef);
this.addDependencyDefinition(PapDependencyDefinitions.DEFAULT_ENABLES_KEY, enablesDepDef);
this.addDependencyDefinition(PapDependencyDefinitions.DEFAULT_REQUIRES_KEY, requiresDepDef);
};
prototype.getWeightForType = function(depType) {
var base = this.dependencyDefinitionMap[depType];
if (base == null)
return PapDependencyDefinitions.DEFAULT_WEIGHT;
else
return base.getWeight();
};
prototype.getLeakForType = function(depType) {
var base = this.dependencyDefinitionMap[depType];
if (base == null)
return PapDependencyDefinitions.DEFAULT_LEAK;
else
return base.getLeak();
};
prototype.getReverseForType = function(depType) {
var base = this.dependencyDefinitionMap[depType];
if (base == null)
return PapDependencyDefinitions.DEFAULT_REVERSE;
else
return base.getReverse();
};
prototype.addDependencyDefinition = function(relationshipName, definition) {
this.getDependencyDefinitionMap()[relationshipName] = definition;
};
prototype.getDependencyDefinitionMap = function() {
return this.dependencyDefinitionMap;
};
prototype.setDependencyDefinitionMap = function(dependencyDefinitionMap) {
this.dependencyDefinitionMap = dependencyDefinitionMap;
};
}, {dependencyDefinitionMap: {name: "Map", arguments: [null, "PapDependencyDefinitionBase"]}}, {});
var NodePacketGraph = function() {
this.nodePacketList = new Array();
this.nodePacketMap = {};
this.relationList = new Array();
};
NodePacketGraph = stjs.extend(NodePacketGraph, null, [], function(constructor, prototype) {
prototype.nodePacketList = null;
prototype.nodePacketMap = null;
prototype.relationList = null;
prototype.initNodePacketGraph = function(nodes) {
var np;
var n;
this.nodePacketList = new Array();
this.nodePacketMap = {};
this.relationList = new Array();
for (var i = 0; i < nodes.length; i++) {
n = nodes[i];
np = new NodePacket();
np.addNode(n);
this.nodePacketList.push(np);
this.nodePacketMap[n.getId()] = np;
}
};
prototype.getNodePacketForNode = function(n) {
return this.nodePacketMap[n.getId()];
};
prototype.mergeNodePackets = function(packet1, packet2) {
if (packet1 != packet2) {
var n;
var na = packet2.getNodeList();
for (var i = 0; i < na.length; i++) {
n = na[i];
packet1.addNode(n);
this.nodePacketMap[n.getId()] = packet1;
}
this.nodePacketList = ArrayUtil.arrayRemove(this.nodePacketList, packet2);
}
};
prototype.getNodePacketList = function() {
return this.nodePacketList;
};
prototype.setNodePacketList = function(nodePacketList) {
this.nodePacketList = nodePacketList;
};
prototype.getRelationList = function() {
return this.relationList;
};
prototype.setRelationList = function(relationList) {
this.relationList = relationList;
};
prototype.addNodePacket = function(np) {
this.nodePacketList.push(np);
};
prototype.addRelation = function(sourceNodePacket, targetNodePacket, relationType) {
var newPacketRelation = new PacketRelation(sourceNodePacket, targetNodePacket, relationType);
this.relationList.push(newPacketRelation);
};
prototype.buildPacketRelationsFromNodeRelations = function(nodeRelationList) {
var sourceNodePacket;
var targetNodePacket;
var nr;
for (var i = 0; i < nodeRelationList.length; i++) {
nr = nodeRelationList[i];
sourceNodePacket = this.getNodePacketForNode(nr.getSource());
targetNodePacket = this.getNodePacketForNode(nr.getTarget());
if (sourceNodePacket != targetNodePacket)
this.addRelation(sourceNodePacket, targetNodePacket, nr.getType());
}
};
prototype.toStringGraphAll = function() {
var ret = "";
ret = ret + ">> Packets: \n";
var np;
for (var i = 0; i < this.nodePacketList.length; i++) {
np = this.nodePacketList[i];
ret = ret + " " + np.toString() + "\n";
}
var pr;
if (this.relationList.length > 0) {
ret = ret + ">>Relationships: >\n";
for (var i = 0; i < this.relationList.length; i++) {
pr = this.relationList[i];
ret = ret + " " + pr.toString() + "\n";
}
} else {
ret = ret + ">>NO RELATIONS EXIST!";
}
return ret;
};
}, {nodePacketList: {name: "Array", arguments: ["NodePacket"]}, nodePacketMap: {name: "Map", arguments: [null, "NodePacket"]}, relationList: {name: "Array", arguments: ["PacketRelation"]}}, {});
/**
* Processor used in Assertion Processing. Can estimate or determine competence
* of individuals.
*
* @author fritz.ray@eduworks.com
* @author tom.buskirk@eduworks.com
* @class AssertionProcessor
* @module org.cassproject
*/
var AssertionProcessor = function() {
this.repositories = new Array();
this.coprocessors = new Array();
this.step = AssertionProcessor.DEF_STEP;
this.profileMode = false;
};
AssertionProcessor = stjs.extend(AssertionProcessor, null, [], function(constructor, prototype) {
constructor.DEF_STEP = false;
prototype.repositories = null;
prototype.step = false;
prototype.profileMode = false;
prototype.logFunction = null;
prototype.assertions = null;
prototype.coprocessors = null;
prototype.processedEquivalencies = null;
prototype.context = null;
prototype.assertionsCollected = false;
prototype.log = function(ip, string) {
if (this.logFunction != null) {
var id = "";
if (ip.competency != null && ip.competency.length > 0)
id = ip.competency[0].shortId() + ":";
this.logFunction(new Date().getTime() % 100000 + ": " + string);
}
ip.log += "\n" + string;
};
/**
* Asynchronously processes and provides an answer to the question: Does an
* individual hold a competency?
*
* @param {EcPk[]} subject Public keys that identify the subject.
* @param {EcCompetency} competency The Competency being inquired about.
* @param {EcLevel} level The Level of the Competency at which the question
* is being asked.
* @param {EcFramework} context The Framework in which to scope the inquiry.
* @param {EbacSignature[]} additionalSignatures Additional signatures
* provided by an authority, used to request additional access on a one-time
* basis.
* @param {function(InquiryPacket)} success The method that is invoked when
* a decision has been reached.
* @param {string function(string)} ask The method that is invoked when the
* assertion processor detects that it needs information. (Usernames,
* passwords, etc)
* @param {function(string)} failure The method that is invoked when the
* assertion processor has failed.
* @method has
*/
prototype.has = function(subject, competency, level, context, additionalSignatures, success, ask, failure) {
var ip = new InquiryPacket(subject, competency, level, context, success, failure, null, InquiryPacket.IPType.COMPETENCY);
ip.root = true;
this.processedEquivalencies = {};
this.assertions = null;
this.context = context;
this.log(ip, "Created new inquiry.");
var me = this;
this.continueProcessingFirstPass(ip);
};
prototype.collectAssertionsForSecondPass = function(ip, success) {
this.assertionsCollected = true;
var listOfActivatedCompetencies = new Array();
this.collectCompetencies(ip, listOfActivatedCompetencies, new Array());
var me = this;
listOfActivatedCompetencies.sort(function(a, b) {
return b.compareTo(a);
});
var eah = new EcAsyncHelper();
eah.each(this.repositories, function(currentRepository, callback0) {
var searchQuery = me.buildAssertionsSearchQuery(ip, listOfActivatedCompetencies);
me.log(ip, "Querying repositories for subject assertions on " + listOfActivatedCompetencies.length + " competencies: " + searchQuery);
var params = new Object();
(params)["size"] = 5000;
EcAssertion.search(currentRepository, searchQuery, function(p1) {
me.log(ip, p1.length + " assertions found.");
me.assertions = new Object();
for (var i = 0; i < p1.length; i++) {
var a = p1[i];
var competency = EcRemoteLinkedData.trimVersionFromUrl(a.competency);
if ((me.assertions)[competency] == null)
(me.assertions)[competency] = new Array();
var as = (me.assertions)[competency];
as.push(a);
}
callback0();
}, function(p1) {
callback0();
}, params);
}, function(strings) {
var eah2 = new EcAsyncHelper();
eah2.each(me.coprocessors, function(ac, callback00) {
ac.assertionProcessor = me;
ac.collectAssertions(ip, listOfActivatedCompetencies, function(assertions) {
for (var i = 0; i < assertions.length; i++) {
var a = assertions[i];
var competency = EcRemoteLinkedData.trimVersionFromUrl(a.competency);
if ((me.assertions)[competency] == null)
(me.assertions)[competency] = new Array();
var as = (me.assertions)[competency];
as.push(a);
}
callback00();
});
}, function(strings) {
success(ip);
});
});
};
prototype.isIn = function(ip, alreadyDone) {
for (var i = 0; i < alreadyDone.length; i++)
if (ip == alreadyDone[i])
return true;
return false;
};
prototype.continueProcessingSecondPass = function(ip) {
if (!ip.hasCheckedAssertionsForCompetency)
if (this.findSubjectAssertionsForCompetency(ip))
if (EcRemote.async)
return true;
if (this.processChildPacketsSecondPass(ip.equivalentPackets))
if (EcRemote.async)
return true;
if (this.processChildPacketsSecondPass(ip.subPackets))
if (EcRemote.async)
return true;
if (ip.result == null) {
this.determineResult(ip);
this.log(ip, "Determined Result:" + ip.result);
this.log(ip, "Success:" + ip.success);
if (ip.result != null && ip.success != null) {
this.log(ip, "Running success:" + ip.result);
ip.success(ip);
}
if (EcRemote.async)
return true;
}
return false;
};
prototype.continueProcessingFirstPass = function(ip) {
if (!ip.finished) {
if (!ip.hasCheckedRelationshipsForCompetency) {
this.findCompetencyRelationships(ip);
if (EcRemote.async)
return true;
}
if (!ip.hasCheckedRollupRulesForCompetency) {
this.findRollupRulesForCompetency(ip);
if (EcRemote.async)
return true;
}
if (this.processChildPackets(ip.equivalentPackets))
return true;
if (this.processChildPackets(ip.subPackets))
return true;
ip.finished = true;
if (!this.assertionsCollected)
if (ip.root) {
var me = this;
this.collectAssertionsForSecondPass(ip, function(p1) {
me.continueProcessingSecondPass(ip);
});
if (EcRemote.async)
return true;
} else
ip.success(ip);
}
if (ip.finished)
if (this.assertions != null)
return this.continueProcessingSecondPass(ip);
return false;
};
prototype.determineResult = function(ip) {};
prototype.findCompetencyRelationships = function(ip) {};
prototype.findSubjectAssertionsForCompetency = function(ip) {};
prototype.processChildPackets = function(childPackets) {
if (childPackets != null)
for (var i = 0; i < childPackets.length; i++)
if (this.continueProcessingFirstPass(childPackets[i]))
return true;
return false;
};
prototype.checkStep = function(ip) {
this.log(ip, "Checkstep First Pass: " + ip.numberOfQueriesRunning);
if (ip.numberOfQueriesRunning == 0)
if (!this.step && EcRemote.async)
this.continueProcessingFirstPass(ip);
};
prototype.processChildPacketsSecondPass = function(childPackets) {
if (childPackets != null)
for (var i = 0; i < childPackets.length; i++)
if (this.continueProcessingSecondPass(childPackets[i]))
return true;
return false;
};
prototype.checkStepSecondPass = function(ip) {
this.log(ip, "Checkstep Second Pass: " + ip.numberOfQueriesRunning);
if (ip.numberOfQueriesRunning == 0)
if (!this.step && EcRemote.async)
this.continueProcessingSecondPass(ip);
};
prototype.processEventFailure = function(message, ip) {
this.log(ip, "Event failed: " + message);
ip.numberOfQueriesRunning--;
ip.failure(message);
};
prototype.logFoundAssertion = function(a, ip) {
this.log(ip, "No issues found with assertion.");
this.log(ip, "Record Id: " + a.shortId());
this.log(ip, "Confidence: " + a.confidence);
this.log(ip, "Number of pieces of evidence: " + a.getEvidenceCount());
this.log(ip, "Recording in inquiry.");
};
prototype.buildAssertionSearchQuery = function(ip, competency) {
var result = null;
if (InquiryPacket.IPType.ROLLUPRULE.equals(ip.type))
result = "(" + new EcAssertion().getSearchStringByType() + ") AND (" + ip.rule + ")";
else if (InquiryPacket.IPType.COMPETENCY.equals(ip.type))
result = new EcAssertion().getSearchStringByTypeAndCompetency(competency);
for (var i = 0; i < ip.subject.length; i++)
result += " AND (\\*@reader:\"" + ip.subject[i].toPem() + "\")";
if (result != null)
return result;
throw new RuntimeException("Trying to build an assertion search query on an unsupported type: " + ip.type);
};
prototype.buildAssertionsSearchQuery = function(ip, competencies) {
var result = null;
if (InquiryPacket.IPType.ROLLUPRULE.equals(ip.type)) {
ip.failure("NOT SUPPOSED TO BE HERE.");
throw new RuntimeException("Collecting assertions when root node is a rollup rule. Not supported.");
} else if (InquiryPacket.IPType.COMPETENCY.equals(ip.type)) {
result = "(";
for (var i = 0; i < competencies.length; i++) {
if (i != 0)
result += " OR ";
result += "competency:\"" + competencies[i] + "\"";
}
result += ")";
}
for (var i = 0; i < ip.subject.length; i++)
result += " AND (\\*@reader:\"" + ip.subject[i].toPem() + "\")";
if (result != null)
return result;
throw new RuntimeException("Trying to build an assertion search query on an unsupported type: " + ip.type);
};
prototype.processRelationshipPacketsGenerated = function(ip, competency) {
this.log(ip, "Relationships succesfully processed for: " + competency.id);
ip.numberOfQueriesRunning--;
this.checkStep(ip);
};
prototype.processRollupRuleInterpretSuccess = function(status, ip) {
this.log(ip, "Rollup rule successfully interpreted.");
ip.numberOfQueriesRunning--;
this.checkStep(ip);
};
prototype.processRollupRuleInterpretSkipped = function(ip) {
this.log(ip, "Rollup rule skipped.");
ip.numberOfQueriesRunning--;
this.checkStep(ip);
};
prototype.findRollupRulesForCompetency = function(ip) {
ip.hasCheckedRollupRulesForCompetency = true;
if (!InquiryPacket.IPType.COMPETENCY.equals(ip.type)) {
this.log(ip, "No rollup rules for combinator types");
this.checkStep(ip);
return;
}
var ep = this;
if (ip.getContext().rollupRule == null) {
if (EcRemote.async)
this.continueProcessingFirstPass(ip);
} else
for (var i = 0; i < ip.getContext().rollupRule.length; i++) {
ip.numberOfQueriesRunning++;
EcRollupRule.get(ip.getContext().rollupRule[i], function(rr) {
ep.processFindRollupRuleSuccess(rr, ip);
}, function(p1) {
ep.processEventFailure(p1, ip);
});
}
};
prototype.processFindRollupRuleSuccess = function(rr, ip) {};
prototype.collectCompetencies = function(ip, listOfActivatedCompetencies, listOfVisitedPackets) {
if (this.profileMode) {
for (var i = 0; i < this.context.competency.length; i++)
listOfActivatedCompetencies.push(this.context.competency[i]);
return;
}
for (var i = 0; i < listOfVisitedPackets.length; i++)
if (ip == listOfVisitedPackets[i])
return;
listOfVisitedPackets.push(ip);
for (var i = 0; i < ip.competency.length; i++) {
for (var j = 0; j < listOfActivatedCompetencies.length; j++)
if (ip.competency[i].shortId() == listOfActivatedCompetencies[j])
continue;
listOfActivatedCompetencies.push(ip.competency[i].shortId());
}
for (var i = 0; i < ip.equivalentPackets.length; i++)
this.collectCompetencies(ip.equivalentPackets[i], listOfActivatedCompetencies, listOfVisitedPackets);
for (var i = 0; i < ip.subPackets.length; i++)
this.collectCompetencies(ip.subPackets[i], listOfActivatedCompetencies, listOfVisitedPackets);
};
}, {repositories: {name: "Array", arguments: ["EcRepository"]}, logFunction: {name: "Callback1", arguments: ["Object"]}, assertions: "Object", coprocessors: {name: "Array", arguments: ["AssertionCoprocessor"]}, processedEquivalencies: {name: "Map", arguments: [null, null]}, context: "EcFramework"}, {});
var RollupRuleProcessor = function(ip, ep) {
this.ip = ip;
this.rollupRulePacketGenerator = new RollupRulePacketGenerator(ip, ep);
};
RollupRuleProcessor = stjs.extend(RollupRuleProcessor, null, [], function(constructor, prototype) {
prototype.success = null;
prototype.failure = null;
prototype.logFunction = null;
prototype.positive = null;
prototype.negative = null;
prototype.onQueryExitResult = null;
prototype.query = null;
prototype.rollupRulePacketGenerator = null;
prototype.s = null;
prototype.tok = null;
prototype.que = null;
prototype.ip = null;
prototype.log = function(string) {
if (this.logFunction != null)
this.logFunction(string);
};
prototype.enterS = function(ctx) {
if (this.s != null)
throw new RuntimeException("We found another S in our S.");
this.s = new RrS();
};
prototype.exitS = function(ctx) {
this.ip.subPackets.push(this.rollupRulePacketGenerator.generatePacket());
};
prototype.enterToken = function(ctx) {
this.s.addToken(this.tok = new RrToken());
};
prototype.exitToken = function(ctx) {};
prototype.enterQuery = function(ctx) {
this.s.addQuery(this.que = new RrQuery());
this.query = "";
this.onQueryExitResult = null;
};
prototype.exitQuery = function(ctx) {
this.que.query = this.query.trim();
this.log("ADDING QUERY: " + this.query.trim());
this.rollupRulePacketGenerator.addQuery(this.query.trim());
};
prototype.exitInnerquery = function(ctx) {
if (ctx.cLogic != null)
this.query += " " + ctx.cLogic.text + " ";
if (ctx.cValue != null) {
this.query += ctx.cKey.text + "" + ctx.cOperator.text + "\"" + ctx.cValue.text + "\" ";
}
if (ctx.cNumber != null) {
this.query += ctx.cKey.text + "" + ctx.cOperator.text + "" + ctx.cNumber.text + " ";
}
};
prototype.exitLogical_or_math_operator = function(ctx) {
if (ctx.cLogic != null) {
if ("AND" == ctx.cLogic.text.toUpperCase()) {
this.log("ADDING OPERATION: " + RollupRulePacketGenerator.OperationType.AND);
this.rollupRulePacketGenerator.addQueryOperation(RollupRulePacketGenerator.OperationType.AND);
} else if ("OR" == ctx.cLogic.text.toUpperCase()) {
this.log("ADDING OPERATION: " + RollupRulePacketGenerator.OperationType.OR);
this.rollupRulePacketGenerator.addQueryOperation(RollupRulePacketGenerator.OperationType.OR);
}
}
};
}, {success: {name: "Callback1", arguments: [null]}, failure: {name: "Callback1", arguments: [null]}, logFunction: {name: "Callback1", arguments: ["Object"]}, positive: {name: "Array", arguments: ["EcAssertion"]}, negative: {name: "Array", arguments: ["EcAssertion"]}, rollupRulePacketGenerator: "RollupRulePacketGenerator", s: "RrS", tok: "RrToken", que: "RrQuery", ip: "InquiryPacket"}, {});
var TestGraphBuilder = function() {};
TestGraphBuilder = stjs.extend(TestGraphBuilder, null, [], function(constructor, prototype) {
constructor.buildTest0 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeA, RelationType.RELATION_TYPE.NARROWS);
};
constructor.buildTest1 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
var nodeD = new Node("D");
var nodeE = new Node("E");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addNode(nodeD);
graph.addNode(nodeE);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeD, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeD, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeE, RelationType.RELATION_TYPE.NARROWS);
};
constructor.buildTest2 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
var nodeD = new Node("D");
var nodeE = new Node("E");
var nodeF = new Node("F");
var nodeG = new Node("G");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addNode(nodeD);
graph.addNode(nodeE);
graph.addNode(nodeF);
graph.addNode(nodeG);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.IS_EQUIVALENT_TO);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeD, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeF, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeF, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeD, nodeE, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeE, nodeG, RelationType.RELATION_TYPE.REQUIRES);
};
constructor.buildTest3 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
var nodeD = new Node("D");
var nodeE = new Node("E");
var nodeF = new Node("F");
var nodeG = new Node("G");
var nodeH = new Node("H");
var nodeI = new Node("I");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addNode(nodeD);
graph.addNode(nodeE);
graph.addNode(nodeF);
graph.addNode(nodeG);
graph.addNode(nodeH);
graph.addNode(nodeI);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeD, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeI, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeI, nodeB, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeE, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeE, nodeF, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeF, nodeG, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeG, nodeH, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeH, nodeE, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
};
constructor.buildTest4 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
var nodeD = new Node("D");
var nodeE = new Node("E");
var nodeF = new Node("F");
var nodeG = new Node("G");
var nodeH = new Node("H");
var nodeI = new Node("I");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addNode(nodeD);
graph.addNode(nodeE);
graph.addNode(nodeF);
graph.addNode(nodeG);
graph.addNode(nodeH);
graph.addNode(nodeI);
graph.addRelation(nodeD, nodeE, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeF, nodeG, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeG, nodeH, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeI, nodeB, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeE, nodeF, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeC, nodeD, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeI, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeH, nodeE, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeG, nodeB, RelationType.RELATION_TYPE.NARROWS);
};
constructor.buildTest5 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
var nodeD = new Node("D");
var nodeE = new Node("E");
var nodeF = new Node("F");
var nodeG = new Node("G");
var nodeH = new Node("H");
var nodeI = new Node("I");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addNode(nodeD);
graph.addNode(nodeE);
graph.addNode(nodeF);
graph.addNode(nodeG);
graph.addNode(nodeH);
graph.addNode(nodeI);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeD, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeI, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeI, nodeB, RelationType.RELATION_TYPE.BROADENS);
graph.addRelation(nodeD, nodeE, RelationType.RELATION_TYPE.BROADENS);
graph.addRelation(nodeE, nodeF, RelationType.RELATION_TYPE.BROADENS);
graph.addRelation(nodeF, nodeG, RelationType.RELATION_TYPE.BROADENS);
graph.addRelation(nodeG, nodeH, RelationType.RELATION_TYPE.REQUIRES);
graph.addRelation(nodeH, nodeE, RelationType.RELATION_TYPE.NARROWS);
};
constructor.buildTest6 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
var nodeD = new Node("D");
var nodeE = new Node("E");
var nodeF = new Node("F");
var nodeG = new Node("G");
var nodeH = new Node("H");
var nodeI = new Node("I");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addNode(nodeD);
graph.addNode(nodeE);
graph.addNode(nodeF);
graph.addNode(nodeG);
graph.addNode(nodeH);
graph.addNode(nodeI);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeD, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeI, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeI, nodeB, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeE, RelationType.RELATION_TYPE.REQUIRES);
graph.addRelation(nodeE, nodeF, RelationType.RELATION_TYPE.BROADENS);
graph.addRelation(nodeF, nodeG, RelationType.RELATION_TYPE.BROADENS);
graph.addRelation(nodeG, nodeH, RelationType.RELATION_TYPE.REQUIRES);
graph.addRelation(nodeH, nodeE, RelationType.RELATION_TYPE.REQUIRES);
};
constructor.buildTest7 = function(graph) {
var nodeA = new Node("A");
var nodeB = new Node("B");
var nodeC = new Node("C");
var nodeD = new Node("D");
var nodeE = new Node("E");
var nodeF = new Node("F");
graph.addNode(nodeA);
graph.addNode(nodeB);
graph.addNode(nodeC);
graph.addNode(nodeD);
graph.addNode(nodeE);
graph.addNode(nodeF);
graph.addRelation(nodeA, nodeB, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeB, nodeC, RelationType.RELATION_TYPE.NARROWS);
graph.addRelation(nodeC, nodeD, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeD, nodeB, RelationType.RELATION_TYPE.IS_REQUIRED_BY);
graph.addRelation(nodeB, nodeF, RelationType.RELATION_TYPE.BROADENS);
graph.addRelation(nodeF, nodeE, RelationType.RELATION_TYPE.REQUIRES);
graph.addRelation(nodeE, nodeB, RelationType.RELATION_TYPE.REQUIRES);
};
constructor.buildTestGraph = function() {
var graph = new NodeGraph();
TestGraphBuilder.buildTest7(graph);
graph.createImpliedRelations();
return graph;
};
}, {}, {});
var CompetencyGraphBuilder = function() {
this.repositories = new Array();
this.subjects = new Array();
};
CompetencyGraphBuilder = stjs.extend(CompetencyGraphBuilder, null, [], function(constructor, prototype) {
constructor.SIZE_OF_ASSERTION_QUERY = 5000;
prototype.success = null;
prototype.failure = null;
prototype.includeAssertions = true;
prototype.frameworkId = null;
prototype.rootCompetencyId = null;
prototype.repositories = null;
prototype.subjects = null;
prototype.createImpliedEdges = true;
prototype.competencyGraph = null;
prototype.frameworkRelationMap = null;
prototype.frameworkRelationList = null;
prototype.assertionList = null;
prototype.assertionMap = null;
prototype.relationshipsToProcess = 0;
prototype.relationshipsProcessed = 0;
prototype.repositoriesToQuery = 0;
prototype.repostioriesQueried = 0;
prototype.assertionsToFillIn = 0;
prototype.assertionsFilledIn = 0;
prototype.getRelationsForCompetency = function(competencyId) {
var competencyRelations = this.frameworkRelationMap[competencyId];
if (competencyRelations == null) {
competencyRelations = new Array();
this.frameworkRelationMap[competencyId] = competencyRelations;
}
return competencyRelations;
};
prototype.addRelationToCompetencyMap = function(competencyId, relation) {
var competencyRelations;
competencyRelations = this.getRelationsForCompetency(competencyId);
competencyRelations.push(relation);
this.frameworkRelationMap[competencyId] = competencyRelations;
};
prototype.buildFrameworkRelationsMap = function() {
var relation;
for (var i = 0; i < this.frameworkRelationList.length; i++) {
relation = this.frameworkRelationList[i];
this.addRelationToCompetencyMap(relation.source, relation);
this.addRelationToCompetencyMap(relation.target, relation);
}
};
prototype.addCompetencyTreeToGraph = function(competencyId) {
this.competencyGraph.addNode(competencyId);
var competencyRelations = this.frameworkRelationMap[competencyId];
if (competencyRelations != null && competencyRelations.length > 0) {
var relation;
for (var i = 0; i < competencyRelations.length; i++) {
relation = competencyRelations[i];
if (!this.competencyGraph.graphContainsEdge(relation.source, relation.target, relation.relationType)) {
this.competencyGraph.addEdge(relation.source, relation.target, relation.relationType);
}
if (!this.competencyGraph.graphContainsNode(relation.target)) {
this.addCompetencyTreeToGraph(relation.target);
}
if (!this.competencyGraph.graphContainsNode(relation.source)) {
this.addCompetencyTreeToGraph(relation.source);
}
}
}
};
prototype.returnGraph = function() {
this.success(this.competencyGraph);
};
prototype.addAssertionsToGraph = function() {
var sa;
var a;
for (var i = 0; i < this.assertionList.length; i++) {
a = this.assertionList[i];
sa = this.assertionMap[a.id];
if (sa != null) {
if (sa.isNegative())
this.competencyGraph.addNegativeAssertion(sa);
else
this.competencyGraph.addPositiveAssertion(sa);
}
}
};
prototype.checkAssertionDetailsFetched = function() {
if (this.assertionsFilledIn >= this.assertionsToFillIn) {
this.addAssertionsToGraph();
this.returnGraph();
}
};
prototype.fetchAssertionDetailsNegativeStatus = function(a, sa) {
var cgb = this;
a.getNegativeAsync(function(negative) {
if (negative != null && negative)
sa.setNegative(true);
else
sa.setNegative(false);
cgb.assertionMap[sa.getId()] = sa;
cgb.assertionsFilledIn++;
cgb.checkAssertionDetailsFetched();
}, function(s) {
sa.setNegative(false);
cgb.assertionMap[sa.getId()] = sa;
cgb.assertionsFilledIn++;
cgb.checkAssertionDetailsFetched();
});
};
prototype.fetchAssertionDetailsExpirationDate = function(a, sa) {
var cgb = this;
a.getExpirationDateAsync(function(expirationDate) {
if (expirationDate == null || expirationDate <= stjs.trunc(new Date().getTime())) {
cgb.assertionsFilledIn++;
cgb.checkAssertionDetailsFetched();
} else {
sa.setExpirationDate(expirationDate);
cgb.fetchAssertionDetailsNegativeStatus(a, sa);
}
}, function(s) {
cgb.failure(new ExceptionReturn("Failed fetchAssertionDetailsExpirationDate: " + s));
});
};
prototype.fetchAssertionDetailsAssertionDate = function(a, sa) {
var cgb = this;
a.getAssertionDateAsync(function(assertionDate) {
if (assertionDate == null || assertionDate > stjs.trunc(new Date().getTime())) {
cgb.assertionsFilledIn++;
cgb.checkAssertionDetailsFetched();
} else {
sa.setAssertionDate(assertionDate);
cgb.fetchAssertionDetailsExpirationDate(a, sa);
}
}, function(s) {
cgb.failure(new ExceptionReturn("Failed fetchAssertionDetailsAssertionDate: " + s));
});
};
prototype.isASubject = function(pk) {
if (this.subjects == null || this.subjects.length == 0)
return true;
var sub;
for (var i = 0; i < this.subjects.length; i++) {
sub = this.subjects[i];
if (sub.toPem().trim() == pk.toPem().trim())
return true;
}
return false;
};
prototype.fetchAssertionDetailsSubject = function(a, sa) {
var cgb = this;
a.getSubjectAsync(function(sub) {
if (sub == null || !cgb.isASubject(sub)) {
cgb.assertionsFilledIn++;
cgb.checkAssertionDetailsFetched();
} else {
sa.setSubjectPem(sub.toPem());
cgb.fetchAssertionDetailsAssertionDate(a, sa);
}
}, function(s) {
cgb.failure(new ExceptionReturn("Failed fetchAssertionDetailsSubject: " + s));
});
};
prototype.fillInAssertions = function() {
this.assertionsToFillIn = this.assertionList.length;
this.assertionsFilledIn = 0;
if (this.assertionsToFillIn == 0)
this.returnGraph();
var a;
var sa;
for (var i = 0; i < this.assertionList.length; i++) {
a = this.assertionList[i];
sa = new SimpleAssertion(a.id, a.competency, a.confidence);
this.fetchAssertionDetailsSubject(a, sa);
}
};
prototype.checkNumberOfReposQueried = function() {
if (this.repostioriesQueried >= this.repositoriesToQuery) {
this.fillInAssertions();
}
};
prototype.addAssertionsToList = function(repoAssertions) {
for (var i = 0; i < repoAssertions.length; i++) {
this.assertionList.push(repoAssertions[i]);
}
this.repostioriesQueried++;
};
prototype.buildAssertionSearchQuery = function() {
var query = "(";
for (var i = 0; i < this.competencyGraph.getNodes().length; i++) {
if (i != 0)
query += " OR ";
query += "competency:\"" + this.competencyGraph.getNodes()[i] + "\"";
}
query += ")";
if (this.subjects != null) {
for (var i = 0; i < this.subjects.length; i++) {
query += " AND (\\*@reader:\"" + this.subjects[i].toPem() + "\")";
}
}
return query;
};
prototype.processCompetencyAssertions = function() {
this.repositoriesToQuery = this.repositories.length;
this.repostioriesQueried = 0;
var currentRepository;
var params = new Object();
(params)["size"] = CompetencyGraphBuilder.SIZE_OF_ASSERTION_QUERY;
var searchQuery = this.buildAssertionSearchQuery();
var cgb = this;
for (var i = 0; i < this.repositories.length; i++) {
currentRepository = this.repositories[i];
EcAssertion.search(currentRepository, searchQuery, function(assertions) {
cgb.addAssertionsToList(assertions);
cgb.checkNumberOfReposQueried();
}, function(s) {
cgb.failure(new ExceptionReturn("Error fetching assertions: " + s));
}, params);
}
};
prototype.assembleGraphComponents = function() {
try {
this.buildFrameworkRelationsMap();
this.addCompetencyTreeToGraph(this.rootCompetencyId);
if (this.createImpliedEdges)
this.competencyGraph.createImpliedRelationships();
if (this.includeAssertions)
this.processCompetencyAssertions();
else
this.returnGraph();
}catch (e) {
this.failure(new ExceptionReturn("Exception buildAndReturnCompetencyGraph: " + e.toString()));
}
};
prototype.checkNumberOfRelationsProcessed = function() {
if (this.relationshipsProcessed >= this.relationshipsToProcess) {
this.assembleGraphComponents();
}
};
prototype.addRelationshipToList = function(a) {
this.frameworkRelationList.push(a);
this.relationshipsProcessed++;
};
prototype.fetchFrameworkRelations = function(f) {
this.relationshipsToProcess = f.relation.length;
this.relationshipsProcessed = 0;
var cgb = this;
if (this.relationshipsToProcess == 0) {
this.competencyGraph.addNode(this.rootCompetencyId);
this.success(this.competencyGraph);
} else {
for (var i = 0; i < this.relationshipsToProcess; i++) {
EcAlignment.get(f.relation[i], function(a) {
cgb.addRelationshipToList(a);
cgb.checkNumberOfRelationsProcessed();
}, function(s) {
cgb.failure(new ExceptionReturn("Error fetching relationship: " + s));
});
}
}
};
prototype.fetchFrameworkAndGo = function() {
var cgb = this;
EcFramework.get(this.frameworkId, function(f) {
cgb.fetchFrameworkRelations(f);
}, function(s) {
cgb.failure(new ExceptionReturn("Error fetching framework(" + cgb.frameworkId + "): " + s));
});
};
prototype.validateInput = function() {
if (this.includeAssertions && (this.repositories == null || this.repositories.length == 0)) {
this.failure(new ExceptionReturn("Assertion repository information not provided."));
} else if (this.success == null) {
this.failure(new ExceptionReturn("Success callback required."));
} else if (this.frameworkId == null) {
this.failure(new ExceptionReturn("Framework ID required."));
} else if (this.rootCompetencyId == null) {
this.failure(new ExceptionReturn("Root Competency ID required."));
}
};
prototype.initBuilder = function(createImpliedEdges) {
this.createImpliedEdges = createImpliedEdges;
this.competencyGraph = new CompetencyGraph(this.includeAssertions);
this.assertionMap = {};
this.frameworkRelationMap = {};
this.frameworkRelationList = new Array();
this.assertionList = new Array();
};
prototype.buildCompetencyGraph = function(createImpliedEdges) {
this.validateInput();
this.initBuilder(createImpliedEdges);
this.fetchFrameworkAndGo();
};
}, {success: {name: "Callback1", arguments: ["CompetencyGraph"]}, failure: {name: "Callback1", arguments: ["ExceptionReturn"]}, repositories: {name: "Array", arguments: ["EcRepository"]}, subjects: {name: "Array", arguments: ["EcPk"]}, competencyGraph: "CompetencyGraph", frameworkRelationMap: {name: "Map", arguments: [null, {name: "Array", arguments: ["EcAlignment"]}]}, frameworkRelationList: {name: "Array", arguments: ["EcAlignment"]}, assertionList: {name: "Array", arguments: ["EcAssertion"]}, assertionMap: {name: "Map", arguments: [null, "SimpleAssertion"]}}, {});
var PredictiveAssertionProcessor = function() {};
PredictiveAssertionProcessor = stjs.extend(PredictiveAssertionProcessor, null, [], function(constructor, prototype) {
constructor.LOG_ENABLED = false;
constructor.ABRUBT_EXP_RETENTION = 0.0;
constructor.DEFAULT_RETENTION = 1.0;
constructor.STEP_SIZE_NUMERATOR = 1.0;
constructor.INITIAL_VALUE = 0.0;
constructor.INIT_PARENT_IDX_DEP_PARM = -1;
constructor.INIT_CHILD_IDX_DEP_PARM = -1;
constructor.INIT_WEIGHT_DEP_PARM = 0.0;
constructor.INIT_LEAK_DEP_PARM = 0.0;
constructor.INIT_REVERSE_DEP_PARM = false;
constructor.DEFAULT_PROB_LEARN_UNMET_REQS = 0.0;
constructor.DEFAULT_PROB_INSUFF = 0.0;
constructor.DEFAULT_DISCOUNT = 1.0;
prototype.competencyIndex = null;
prototype.values = null;
prototype.dependencies = null;
prototype.assertions = null;
prototype.dependencyDefs = null;
prototype.settings = null;
prototype.inputGraph = null;
prototype.subjectPem = null;
prototype.predictionDate = null;
prototype.competencyNetwork = null;
prototype.stepSize = 0.0;
prototype.priorityQueueThreshold = 0.0;
prototype.competencePrediction = null;
prototype.log = function(s) {
if (PredictiveAssertionProcessor.LOG_ENABLED) {
console.log(s);
}
};
prototype.verifyDependencyDefs = function() {
if (this.dependencyDefs == null) {
this.dependencyDefs = new PapDependencyDefinitions();
this.dependencyDefs.initDefaultDefinitions();
}
};
prototype.processInputParameters = function(inputGraph, subjectPem, predictionDate, dependencyDefs, settings) {
this.dependencyDefs = dependencyDefs;
this.verifyDependencyDefs();
this.settings = settings;
if (this.settings == null)
this.settings = new PapSettings();
this.inputGraph = inputGraph;
this.subjectPem = subjectPem;
if (this.subjectPem != null)
this.subjectPem = this.subjectPem.trim();
this.predictionDate = predictionDate;
if (this.predictionDate == null)
this.predictionDate = stjs.trunc((new Date()).getTime());
this.stepSize = PredictiveAssertionProcessor.STEP_SIZE_NUMERATOR / this.settings.getIterations();
this.priorityQueueThreshold = this.settings.getPriorityQueueThreshold() / this.settings.getIterations();
};
prototype.initDependenciesMap = function() {
this.dependencies = {};
var type;
for (var i = 0; i < PapDependency.getDependencyTypes().length; i++) {
type = PapDependency.getDependencyTypes()[i];
var dependencySubMap = {};
this.dependencies[type] = dependencySubMap;
}
};
prototype.initAssertionsMap = function() {
this.assertions = {};
for (var i = 0; i < this.inputGraph.getNodes().length; i++) {
this.assertions[String.valueOf(i)] = new Array();
}
};
prototype.buildValuesCompetencyIndexAndDependencies = function() {
this.competencyIndex = {};
this.values = new Array();
for (var i = 0; i < this.inputGraph.getNodes().length; i++) {
this.values.push(PredictiveAssertionProcessor.INITIAL_VALUE);
this.competencyIndex[this.inputGraph.getNodes()[i]] = i;
var type;
for (var j = 0; j < PapDependency.getDependencyTypes().length; j++) {
type = PapDependency.getDependencyTypes()[j];
this.dependencies[type][String.valueOf(i)] = new Array();
}
}
};
prototype.initDataStructures = function() {
this.initDependenciesMap();
this.initAssertionsMap();
this.buildValuesCompetencyIndexAndDependencies();
};
prototype.getDefaultPapDependencyParms = function() {
var depParms = new PapDependencyParms();
depParms.setType(PapDependency.NULL_TYPE);
depParms.setParentIndex(PredictiveAssertionProcessor.INIT_PARENT_IDX_DEP_PARM);
depParms.setChildIndex(PredictiveAssertionProcessor.INIT_CHILD_IDX_DEP_PARM);
depParms.setWeight(PredictiveAssertionProcessor.INIT_WEIGHT_DEP_PARM);
depParms.setLeak(PredictiveAssertionProcessor.INIT_LEAK_DEP_PARM);
depParms.setReverse(PredictiveAssertionProcessor.INIT_REVERSE_DEP_PARM);
return depParms;
};
prototype.getDependencyParmsForEdge = function(edge) {
var depType = edge.getRelation();
var depClass = this.dependencyDefs.getDependencyDefinitionMap()[depType].getDepClass();
var depParms = this.getDefaultPapDependencyParms();
switch (depClass.toLowerCase()) {
case "isrequiredby":
depParms.setChildIndex(this.competencyIndex[edge.getSource()]);
depParms.setParentIndex(this.competencyIndex[edge.getTarget()]);
depParms.setType(PapDependency.NECESSARY_TYPE);
depParms.setWeight(this.dependencyDefs.getWeightForType(depType));
depParms.setLeak(this.dependencyDefs.getLeakForType(depType));
depParms.setReverse(this.dependencyDefs.getReverseForType(depType));
break;
case "issufficientfor":
depParms.setChildIndex(this.competencyIndex[edge.getSource()]);
depParms.setParentIndex(this.competencyIndex[edge.getTarget()]);
depParms.setType(PapDependency.SUFFICIENT_TYPE);
depParms.setWeight(this.dependencyDefs.getWeightForType(depType));
depParms.setLeak(this.dependencyDefs.getLeakForType(depType));
depParms.setReverse(this.dependencyDefs.getReverseForType(depType));
break;
case "isequivalentto":
depParms.setParentIndex(this.competencyIndex[edge.getSource()]);
depParms.setChildIndex(this.competencyIndex[edge.getTarget()]);
depParms.setType(PapDependency.EQUIVALENCE_TYPE);
depParms.setWeight(this.dependencyDefs.getWeightForType(depType));
break;
case "broadens":
depParms.setParentIndex(this.competencyIndex[edge.getSource()]);
depParms.setChildIndex(this.competencyIndex[edge.getTarget()]);
depParms.setType(PapDependency.BROADENS_TYPE);
depParms.setWeight(this.dependencyDefs.getWeightForType(depType));
depParms.setReverse(this.dependencyDefs.getReverseForType(depType));
break;
}
return depParms;
};
prototype.dependencyExists = function(type, index, dependency) {
var dependencyArray = this.dependencies[type][index];
if (dependencyArray == null) {
return true;
}
var currentDep;
for (var i = 0; i < dependencyArray.length; i++) {
currentDep = dependencyArray[i];
if (currentDep.equals(dependency))
return true;
}
return false;
};
prototype.processEdges = function() {
for (var i = 0; i < this.inputGraph.getEdges().length; i++) {
var edge = this.inputGraph.getEdges()[i];
var depParms = this.getDependencyParmsForEdge(edge);
var newDep;
if (PapDependency.EQUIVALENCE_TYPE.equals(depParms.getType())) {
depParms.setDependencyFirst(true);
newDep = new PapDependency(depParms);
if (!this.dependencyExists(depParms.getType(), String.valueOf(depParms.getParentIndex()), newDep)) {
this.dependencies[depParms.getType()][String.valueOf(depParms.getParentIndex())].push(newDep);
}
depParms.swapParentChildIndexes();
newDep = new PapDependency(depParms);
if (!this.dependencyExists(depParms.getType(), String.valueOf(depParms.getParentIndex()), newDep)) {
this.dependencies[depParms.getType()][String.valueOf(depParms.getParentIndex())].push(newDep);
}
} else if (edge.getRelation() != null && edge.getRelation().trim().length > 0) {
depParms.setDependencyFirst(!depParms.getReverse());
newDep = new PapDependency(depParms);
if (!this.dependencyExists(depParms.getType(), String.valueOf(depParms.getParentIndex()), newDep)) {
this.dependencies[depParms.getType()][String.valueOf(depParms.getParentIndex())].push(newDep);
}
}
}
};
prototype.addAssertions = function(assertionList) {
var sa;
var pa;
for (var i = 0; i < assertionList.length; i++) {
sa = assertionList[i];
if (sa.getAssertionDate() <= this.predictionDate && ((!this.settings.getAbruptExpiration()) || this.predictionDate <= sa.getExpirationDate())) {
var index = this.competencyIndex[sa.getCompetencyId()];
pa = new PapAssertion(sa.getConfidence(), index, sa.getAssertionDate(), sa.getExpirationDate(), !sa.isNegative());
this.assertions[String.valueOf(index)].push(pa);
}
}
};
prototype.processAssertions = function() {
if (this.subjectPem == null || this.subjectPem.length <= 0) {
this.addAssertions(this.inputGraph.getNegativeAssertions());
this.addAssertions(this.inputGraph.getPositiveAssertions());
} else {
var sa;
var matchingAssertionList = new Array();
for (var i = 0; i < this.inputGraph.getNegativeAssertions().length; i++) {
sa = this.inputGraph.getNegativeAssertions()[i];
if (this.subjectPem.equals(sa.getSubjectPem()))
matchingAssertionList.push(sa);
}
this.addAssertions(matchingAssertionList);
matchingAssertionList = new Array();
for (var i = 0; i < this.inputGraph.getPositiveAssertions().length; i++) {
sa = this.inputGraph.getPositiveAssertions()[i];
if (this.subjectPem.equals(sa.getSubjectPem()))
matchingAssertionList.push(sa);
}
this.addAssertions(matchingAssertionList);
}
};
prototype.getTimeFactor = function(assertionDate, expirationDate) {
var range = expirationDate - assertionDate;
var timeUntilPrediction = this.predictionDate - assertionDate;
var rate = (timeUntilPrediction) / range;
return rate;
};
prototype.getRetention = function(assertionDate, expirationDate) {
if (this.settings.getAbruptExpiration() && this.predictionDate > (expirationDate))
return PredictiveAssertionProcessor.ABRUBT_EXP_RETENTION;
else {
if (this.settings.getGradualForgetting()) {
var factor = this.getTimeFactor(assertionDate, expirationDate);
return Math.exp(-factor);
} else
return PredictiveAssertionProcessor.DEFAULT_RETENTION;
}
};
prototype.addAssertionsToUpdateQueue = function(updateQueue) {
var assertionList;
var assertion;
var val;
for (var i = 0; i < this.inputGraph.getNodes().length; i++) {
assertionList = this.assertions[String.valueOf(i)];
for (var j = 0; j < assertionList.length; j++) {
assertion = assertionList[j];
val = this.stepSize * assertion.getConfidence() * this.settings.getEvidenceWeight() * this.getRetention(assertion.getAssertionDate(), assertion.getExpirationDate());
if (val > this.priorityQueueThreshold) {
updateQueue.push(new PapUpdate(assertion.getCompetencyIndex(), val, assertion.getResult()));
}
}
}
};
prototype.processNecessaryNetworkDependencies = function(update, updateQueue) {
var updateDependencies = this.competencyNetwork.getDependencies()[PapDependency.NECESSARY_TYPE][String.valueOf(update.getIndex())];
if (updateDependencies != null) {
var probabilityLearnUnmetRequirements = PredictiveAssertionProcessor.DEFAULT_PROB_LEARN_UNMET_REQS;
if (updateDependencies.length > 0) {
probabilityLearnUnmetRequirements = updateDependencies[0].getLeak();
}
var totalRes = (1 - probabilityLearnUnmetRequirements);
var dep;
for (var i = 0; i < updateDependencies.length; i++) {
dep = updateDependencies[i];
totalRes *= (1 - dep.getWeight() * this.competencyNetwork.getActivations()[dep.getChildIndex()]);
}
var gradient;
for (var i = 0; i < updateDependencies.length; i++) {
dep = updateDependencies[i];
if (!update.hasVisited(dep.getChildIndex())) {
gradient = update.getChange() * totalRes / (1 - dep.getWeight() * this.competencyNetwork.getActivations()[dep.getChildIndex()]) * dep.getWeight() * this.settings.getDiscount();
if (gradient > this.priorityQueueThreshold) {
updateQueue.push(update.updateChild(dep.getChildIndex(), gradient));
}
}
}
}
};
prototype.processSufficientNetworkDependencies = function(update, updateQueue) {
var updateDependencies = this.competencyNetwork.getDependencies()[PapDependency.SUFFICIENT_TYPE][String.valueOf(update.getIndex())];
if (updateDependencies != null) {
var probabilityInsufficient = PredictiveAssertionProcessor.DEFAULT_PROB_INSUFF;
if (updateDependencies.length > 0) {
probabilityInsufficient = updateDependencies[0].getLeak();
}
var totalRes = (1 - probabilityInsufficient);
var dep;
for (var i = 0; i < updateDependencies.length; i++) {
dep = updateDependencies[i];
totalRes *= (1.0 - (1.0 - this.competencyNetwork.getActivations()[dep.getChildIndex()]) * dep.getWeight());
}
var gradient;
for (var i = 0; i < updateDependencies.length; i++) {
dep = updateDependencies[i];
if (!update.hasVisited(dep.getChildIndex())) {
gradient = update.getChange() * (1.0 - totalRes / (1.0 - dep.getWeight() * (1.0 - this.competencyNetwork.getActivations()[dep.getChildIndex()]))) * this.settings.getDiscount();
if (gradient > this.priorityQueueThreshold) {
updateQueue.push(update.updateChild(dep.getChildIndex(), gradient));
}
}
}
}
};
prototype.processEquivalenceNetworkDependencies = function(update, updateQueue) {
var updateDependencies = this.competencyNetwork.getDependencies()[PapDependency.EQUIVALENCE_TYPE][String.valueOf(update.getIndex())];
if (updateDependencies != null) {
var dep;
var gradient;
for (var i = 0; i < updateDependencies.length; i++) {
dep = updateDependencies[i];
if (!update.hasVisited(dep.getChildIndex())) {
gradient = update.getChange() * dep.getWeight() * this.settings.getDiscount();
if (Math.abs(gradient) > this.priorityQueueThreshold) {
updateQueue.push(update.updateChild(dep.getChildIndex(), gradient));
}
}
}
}
};
prototype.processBroadensNetworkDependencies = function(update, updateQueue) {
var updateDependencies = this.competencyNetwork.getDependencies()[PapDependency.BROADENS_TYPE][String.valueOf(update.getIndex())];
if (updateDependencies != null) {
var dep;
var gradient;
for (var i = 0; i < updateDependencies.length; i++) {
dep = updateDependencies[i];
if (!update.hasVisited(dep.getChildIndex())) {
gradient = update.getChange() * this.settings.getDiscount() * dep.getWeight();
if (gradient > this.priorityQueueThreshold) {
updateQueue.push(update.updateChild(dep.getChildIndex(), gradient));
}
}
}
}
};
prototype.predictCompetence = function() {
this.competencyNetwork = new PapCompetencyNetwork(this.dependencies, this.inputGraph.getNodes().length, this.settings);
var updateQueue;
var currentUpdate;
for (var iteration = 0; iteration < this.settings.getIterations(); iteration++) {
updateQueue = new Array();
this.addAssertionsToUpdateQueue(updateQueue);
while (updateQueue.length > 0){
currentUpdate = updateQueue.pop();
this.competencyNetwork.update(currentUpdate.getIndex(), currentUpdate.getChange(), currentUpdate.getPositive());
this.processNecessaryNetworkDependencies(currentUpdate, updateQueue);
this.processSufficientNetworkDependencies(currentUpdate, updateQueue);
this.processEquivalenceNetworkDependencies(currentUpdate, updateQueue);
this.processBroadensNetworkDependencies(currentUpdate, updateQueue);
}
}
};
prototype.buildCompetencePrediction = function() {
this.competencePrediction = new PapNetworkPrediction(this.predictionDate, this.subjectPem, this.inputGraph.getNodes(), this.competencyNetwork);
};
prototype.predictAll = function(inputGraph, subjectPem, predictionDate, dependencyDefs, settings) {
this.processInputParameters(inputGraph, subjectPem, predictionDate, dependencyDefs, settings);
this.initDataStructures();
this.processEdges();
this.processAssertions();
this.predictCompetence();
this.buildCompetencePrediction();
return this.competencePrediction;
};
}, {competencyIndex: {name: "Map", arguments: [null, null]}, values: {name: "Array", arguments: [null]}, dependencies: {name: "Map", arguments: [null, {name: "Map", arguments: [null, {name: "Array", arguments: ["PapDependency"]}]}]}, assertions: {name: "Map", arguments: [null, {name: "Array", arguments: ["PapAssertion"]}]}, dependencyDefs: "PapDependencyDefinitions", settings: "PapSettings", inputGraph: "CompetencyGraph", competencyNetwork: "PapCompetencyNetwork", competencePrediction: "PapNetworkPrediction"}, {});
var CyclicGraphCollapser = function() {};
CyclicGraphCollapser = stjs.extend(CyclicGraphCollapser, null, [], function(constructor, prototype) {
prototype.nodesProcessed = null;
prototype.visitedNodes = null;
prototype.buildNarrowsIsRequiredByEqualsMap = function(graph) {
var relationMap = new NodeRelationMap();
var n;
var nodeList = graph.getNodeList();
for (var i = 0; i < nodeList.length; i++) {
n = nodeList[i];
relationMap.addNodeRelations(n, graph.getNarrowsIsRequiredByEqualsRelationListForNode(n));
}
return relationMap;
};
prototype.buildBroadensRequiresEqualsMap = function(graph) {
var relationMap = new NodeRelationMap();
var n;
var nodeList = graph.getNodeList();
for (var i = 0; i < nodeList.length; i++) {
n = nodeList[i];
relationMap.addNodeRelations(n, graph.getBroadensRequiresEqualsRelationListForNode(n));
}
return relationMap;
};
prototype.mergeEquivalentNodes = function(relationMap, npg) {
var nodeList = relationMap.getNodeList();
var nodeRelations;
var nr;
for (var i = 0; i < nodeList.length; i++) {
nodeRelations = relationMap.getRelationsForNode(nodeList[i]);
for (var j = 0; j < nodeRelations.length; j++) {
nr = nodeRelations[j];
if (nr.getType() == RelationType.RELATION_TYPE.IS_EQUIVALENT_TO) {
npg.mergeNodePackets(npg.getNodePacketForNode(nr.getSource()), npg.getNodePacketForNode(nr.getTarget()));
}
}
}
};
prototype.mergeCyclicNodes = function(startCycleNode, npg) {
var startingIdx = ArrayUtil.arrayLastIndexOf(this.visitedNodes, startCycleNode);
var partOfCycleNode;
for (var i = startingIdx + 1; i < this.visitedNodes.length; i++) {
partOfCycleNode = this.visitedNodes[i];
if (partOfCycleNode != startCycleNode) {
npg.mergeNodePackets(npg.getNodePacketForNode(startCycleNode), npg.getNodePacketForNode(partOfCycleNode));
}
}
};
prototype.findCycles = function(n, relationMap, npg) {
if (ArrayUtil.arrayContains(this.visitedNodes, n)) {
this.mergeCyclicNodes(n, npg);
} else {
this.nodesProcessed.push(n);
var relationsToVisit = relationMap.getRelationsForNode(n);
if (relationsToVisit == null || relationsToVisit.length == 0)
return;
else {
this.visitedNodes.push(n);
var nr;
for (var i = 0; i < relationsToVisit.length; i++) {
nr = relationsToVisit[i];
this.findCycles(nr.getTarget(), relationMap, npg);
}
this.visitedNodes = ArrayUtil.arrayRemove(this.visitedNodes, n);
}
}
};
prototype.startFindCycles = function(relationMap, npg) {
var nodeList = relationMap.getNodeList();
for (var i = 0; i < nodeList.length; i++) {
this.visitedNodes = new Array();
this.findCycles(nodeList[i], relationMap, npg);
}
};
prototype.buildNodePacketGraph = function(relationMap) {
var npg = new NodePacketGraph();
npg.initNodePacketGraph(relationMap.getNodeList());
this.mergeEquivalentNodes(relationMap, npg);
this.nodesProcessed = new Array();
this.startFindCycles(relationMap, npg);
return npg;
};
prototype.mergeNodePacketGraphs = function(nirbeNpg, breNpg) {
var mergedNpg = nirbeNpg;
var np;
var nodePacketList = breNpg.getNodePacketList();
for (var i = 0; i < nodePacketList.length; i++) {
np = nodePacketList[i];
if (np.getNodeCount() > 1) {
var targetNodePacket = mergedNpg.getNodePacketForNode(np.getNodeList()[0]);
for (var j = 1; j < np.getNodeList().length; j++) {
mergedNpg.mergeNodePackets(targetNodePacket, mergedNpg.getNodePacketForNode(np.getNodeList()[j]));
}
}
}
return mergedNpg;
};
prototype.collapseGraph = function(graph) {
try {
var nirbeNrm = this.buildNarrowsIsRequiredByEqualsMap(graph);
var nirbeNpg = this.buildNodePacketGraph(nirbeNrm);
var breNrm = this.buildBroadensRequiresEqualsMap(graph);
var breNpg = this.buildNodePacketGraph(breNrm);
var finalNodePacketGraph = this.mergeNodePacketGraphs(nirbeNpg, breNpg);
finalNodePacketGraph.buildPacketRelationsFromNodeRelations(graph.getRelationList());
return finalNodePacketGraph;
}catch (e) {
throw e;
}
};
}, {nodesProcessed: {name: "Array", arguments: ["Node"]}, visitedNodes: {name: "Array", arguments: ["Node"]}}, {});
var CombinatorAssertionProcessor = function() {
AssertionProcessor.call(this);
};
CombinatorAssertionProcessor = stjs.extend(CombinatorAssertionProcessor, AssertionProcessor, [], function(constructor, prototype) {
constructor.relationLookup = null;
prototype.processFoundAssertion = function(a, ip, success, failure) {
var eah = new EcAsyncHelper();
var me = this;
eah.each(ip.subject, function(p1, p2) {
me.checkSubject(a, p1, ip, p2, function(p1) {
failure(p1);
});
}, function(p1) {
success();
});
};
prototype.checkSubject = function(a, currentSubject, ip, success, failure) {
var me = this;
a.getSubjectAsync(function(sub) {
if (sub.equals(currentSubject)) {
me.log(ip, "Matching Assertion found.");
a.getAssertionDateAsync(function(assertionDate) {
if (assertionDate != null)
if (assertionDate > stjs.trunc(new Date().getTime())) {
me.log(ip, "Assertion is made for a future date.");
success();
return;
}
a.getExpirationDateAsync(function(expirationDate) {
if (expirationDate != null)
if (expirationDate <= stjs.trunc(new Date().getTime())) {
me.log(ip, "Assertion is expired. Skipping.");
success();
return;
}
me.logFoundAssertion(a, ip);
a.getNegativeAsync(function(p1) {
if (p1 != null && p1) {
me.log(ip, "Found valid negative assertion");
ip.negative.push(a);
} else {
me.log(ip, "Found valid positive assertion");
ip.positive.push(a);
}
success();
}, function(p1) {
me.log(ip, "Found valid positive assertion");
ip.positive.push(a);
success();
});
}, failure);
}, failure);
} else
failure("Incorrect subject.");
}, failure);
};
prototype.processFindAssertionsSuccess = function(data, ip) {
if (data.length == 0)
this.log(ip, "No results found.");
else
this.log(ip, "Total number of assertions found: " + data.length);
ip.numberOfQueriesRunning--;
this.checkStepSecondPass(ip);
};
prototype.findSubjectAssertionsForCompetency = function(ip) {
if (this.assertions == null)
return true;
ip.hasCheckedAssertionsForCompetency = true;
if (!InquiryPacket.IPType.COMPETENCY.equals(ip.type) && !InquiryPacket.IPType.ROLLUPRULE.equals(ip.type)) {
this.log(ip, "No assertions for combinator types");
return false;
}
var me = this;
if (InquiryPacket.IPType.COMPETENCY.equals(ip.type)) {
for (var h = 0; h < ip.competency.length; h++) {
ip.numberOfQueriesRunning++;
var competency = ip.competency[h];
var assertionsForThisCompetency = (this.assertions)[competency.shortId()];
if (assertionsForThisCompetency == null)
assertionsForThisCompetency = new Array();
var eah = new EcAsyncHelper();
eah.each(assertionsForThisCompetency, function(p1, p2) {
me.processFoundAssertion(p1, ip, p2, function(p1) {
p2();
});
}, function(p1) {
me.processFindAssertionsSuccess(p1, ip);
});
}
return true;
} else
for (var i = 0; i < this.repositories.length; i++) {
var currentRepository = this.repositories[i];
if (InquiryPacket.IPType.ROLLUPRULE.equals(ip.type)) {
ip.numberOfQueriesRunning++;
this.log(ip, "Searching: " + currentRepository.selectedServer);
currentRepository.search(this.buildAssertionSearchQuery(ip, null), function(p1) {}, function(p1) {
var eah = new EcAsyncHelper();
eah.each(p1, function(p1, p2) {
var a = new EcAssertion();
a.copyFrom(p1);
me.processFoundAssertion(a, ip, p2, function(p1) {
p2();
});
}, function(p1) {
me.processFindAssertionsSuccess(p1, ip);
});
}, function(p1) {
me.processEventFailure(p1, ip);
});
}
}
return true;
};
prototype.findCompetencyRelationships = function(ip) {
ip.hasCheckedRelationshipsForCompetency = true;
if (!InquiryPacket.IPType.COMPETENCY.equals(ip.type)) {
this.log(ip, "No relationships for combinator types");
this.checkStep(ip);
return;
}
var ep = this;
var relationLookup = this.constructor.relationLookup;
if (relationLookup == null) {
relationLookup = new Object();
if (ep.context != null && ep.context.relation != null)
for (var i = 0; i < ep.context.relation.length; i++) {
var a = EcAlignment.getBlocking(ep.context.relation[i]);
if ((relationLookup)[a.source] == null)
(relationLookup)[a.source] = new Array();
((relationLookup)[a.source]).push(a);
if ((relationLookup)[a.target] == null)
(relationLookup)[a.target] = new Array();
((relationLookup)[a.target]).push(a);
}
if (this.profileMode)
this.constructor.relationLookup = relationLookup;
}
for (var i = 0; i < ip.competency.length; i++) {
this.log(ip, "Finding relationships for competency: " + ip.competency[i]);
this.findCompetencyRelationship(ip, ep, ip.competency[i], relationLookup);
}
};
prototype.findCompetencyRelationship = function(ip, ep, c, relationLookup) {
var rpg = new RelationshipPacketGenerator(ip, ep, this.processedEquivalencies);
rpg.failure = ip.failure;
rpg.logFunction = this.logFunction;
rpg.relationLookup = relationLookup;
rpg.success = function() {
ep.processRelationshipPacketsGenerated(ip, c);
};
this.log(ip, "Executing relationship packet generator");
ip.numberOfQueriesRunning++;
rpg.go();
};
prototype.processFindRollupRuleSuccess = function(rr, ip) {
var ep = this;
if (!ip.hasId(rr.competency)) {
ep.processRollupRuleInterpretSkipped(ip);
return;
}
this.log(ip, "Found rollup rule: " + rr.rule);
var rrp = new RollupRuleProcessor(ip, this);
rrp.positive = ip.positive;
rrp.negative = ip.negative;
var rri = new RollupRuleInterface(rr.rule, rrp);
rri.logFunction = this.logFunction;
rri.success = function(p1) {
ep.processRollupRuleInterpretSuccess(p1, ip);
};
rri.failure = ip.failure;
this.log(ip, "Executing rollup rule interpreter");
rri.go();
};
}, {relationLookup: "Object", repositories: {name: "Array", arguments: ["EcRepository"]}, logFunction: {name: "Callback1", arguments: ["Object"]}, assertions: "Object", coprocessors: {name: "Array", arguments: ["AssertionCoprocessor"]}, processedEquivalencies: {name: "Map", arguments: [null, null]}, context: "EcFramework"}, {});
var OptimisticQuadnaryAssertionProcessor = function() {
CombinatorAssertionProcessor.call(this);
};
OptimisticQuadnaryAssertionProcessor = stjs.extend(OptimisticQuadnaryAssertionProcessor, CombinatorAssertionProcessor, [], function(constructor, prototype) {
prototype.transferIndeterminateOptimistically = true;
prototype.determineCombinatorAndResult = function(ip) {
if (ip.anyChildPacketsAreFalse()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else if (ip.anyIndeterminantChildPackets()) {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else if (ip.anyChildPacketsAreUnknown()) {
ip.result = InquiryPacket.ResultType.UNKNOWN;
} else {
ip.result = InquiryPacket.ResultType.TRUE;
}
};
prototype.determineCombinatorNarrowsResult = function(ip) {
if (ip.anyChildPacketsAreTrue()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else {
ip.result = InquiryPacket.ResultType.UNKNOWN;
}
};
prototype.determineCombinatorBroadensResult = function(ip) {
if (ip.anyChildPacketsAreFalse()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else if (ip.allChildPacketsAreTrue()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else {
ip.result = InquiryPacket.ResultType.UNKNOWN;
}
};
prototype.determineCombinatorRequiresResult = function(ip) {
if (ip.anyChildPacketsAreFalse()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else {
ip.result = InquiryPacket.ResultType.UNKNOWN;
}
};
prototype.determineCombinatorIsRequiredByResult = function(ip) {
if (ip.anyChildPacketsAreTrue()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else {
ip.result = InquiryPacket.ResultType.UNKNOWN;
}
};
prototype.determineCombinatorOrResult = function(ip) {
if (ip.anyChildPacketsAreTrue()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else if (ip.anyIndeterminantChildPackets()) {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else if (ip.allChildPacketsUnknown()) {
ip.result = InquiryPacket.ResultType.UNKNOWN;
} else {
ip.result = InquiryPacket.ResultType.FALSE;
}
};
prototype.getPacketAssertionResult = function(ip) {
if (ip.positive.length > 0 && ip.negative.length == 0) {
return InquiryPacket.ResultType.TRUE;
} else if (ip.positive.length == 0 && ip.negative.length > 0) {
return InquiryPacket.ResultType.FALSE;
} else if (ip.positive.length > 0 && ip.negative.length > 0) {
return InquiryPacket.ResultType.INDETERMINANT;
} else {
return InquiryPacket.ResultType.UNKNOWN;
}
};
prototype.determineResultForUnknownAssertionResult = function(ip) {
if (ip.allChildPacketsUnknown()) {
ip.result = InquiryPacket.ResultType.UNKNOWN;
} else if (ip.allEquivalentPacketsUnknown()) {
if (ip.allSubPacketsTrueOrUnknown()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else if (ip.allSubPacketsFalseOrUnknown()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
} else if (ip.allEquivalentPacketsTrueOrUnknown()) {
if (ip.allSubPacketsTrueOrUnknown()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
} else if (ip.allEquivalentPacketsFalseOrUnknown()) {
if (ip.allSubPacketsFalseOrUnknown()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
};
prototype.determineResultForTrueAssertionResult = function(ip) {
if (ip.allEquivalentPacketsTrueOrUnknown()) {
if (ip.allSubPacketsTrueOrUnknown()) {
ip.result = InquiryPacket.ResultType.TRUE;
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
};
prototype.determineResultForFalseAssertionResult = function(ip) {
if (ip.allEquivalentPacketsFalseOrUnknown()) {
if (ip.allSubPacketsFalseOrUnknown()) {
ip.result = InquiryPacket.ResultType.FALSE;
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
} else {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
}
};
/**
* IF IP type is COMPETENCY|ROLLUPRULE: assertionResult = ( IF number of
* positive assertions > 0 && number of negative assertions = 0 THEN
* assertionResult = TRUE IF number of positive assertions = 0 && number of
* negative assertions > 0 THEN assertionResult = FALSE IF number of
* positive assertions > 0 && number of negative assertions > 0 THEN
* assertionResult = INDETERMINANT IF number of positive assertions = 0 &&
* number of negative assertions = 0 THEN assertionResult = UNKNOWN )
* <p>
* IF assertionResult = INDETERMINANT THEN INDETERMINANT ELSE IF any
* equivalent packets = INDETERMINANT THEN INDETERMINANT ELSE IF any sub
* packets = INDETERMINANT THEN INDETERMINANT
* <p>
* ELSE IF assertionResult = UNKNOWN: IF all equivalent packets = UNKNOWN IF
* all sub packets = UNKNOWN THEN UNKNOWN IF all sub packets = TRUE|UNKNOWN
* THEN TRUE IF all sub packets = FALSE|UNKNOWN THEN FALSE ELSE
* INDETERMINANT
* <p>
* ELSE IF all equivalent packets = TRUE|UNKNOWN IF all sub packets =
* TRUE|UNKNOWN THEN TRUE ELSE INDETERMINANT
* <p>
* ELSE IF all equivalent packets = FALSE|UNKNOWN IF all sub packets =
* FALSE|UNKNOWN THEN FALSE ELSE INDETERMINANT
* <p>
* ELSE INDETERMINANT
* <p>
* <p>
* ELSE IF assertionResult = TRUE: IF all equivalent packets = TRUE|UNKNOWN
* IF all sub packets = TRUE|UNKNOWN THEN TRUE ELSE INDETERMINANT
* <p>
* ELSE INDETERMINANT
* <p>
* ELSE IF assertionResult = FALSE: IF all equivalent packets =
* FALSE|UNKNOWN IF all sub packets = FALSE|UNKNOWN THEN FALSE ELSE
* INDETERMINANT
* <p>
* ELSE INDETERMINANT
*/
prototype.determineCompetencyOrRollupRuleResult = function(ip) {
var assertionResult = this.getPacketAssertionResult(ip);
if (InquiryPacket.ResultType.INDETERMINANT.equals(assertionResult) || ip.anyIndeterminantChildPackets()) {
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else if (InquiryPacket.ResultType.UNKNOWN.equals(assertionResult)) {
this.determineResultForUnknownAssertionResult(ip);
} else if (InquiryPacket.ResultType.TRUE.equals(assertionResult)) {
this.determineResultForTrueAssertionResult(ip);
} else {
this.determineResultForFalseAssertionResult(ip);
}
};
prototype.determineResult = function(ip) {
if (ip.numberOfQueriesRunning == 0) {
if (InquiryPacket.IPType.RELATION_AND.equals(ip.type)) {
this.determineCombinatorAndResult(ip);
} else if (InquiryPacket.IPType.RELATION_OR.equals(ip.type)) {
this.determineCombinatorOrResult(ip);
} else if (InquiryPacket.IPType.RELATION_NARROWS.equals(ip.type)) {
this.determineCombinatorNarrowsResult(ip);
} else if (InquiryPacket.IPType.RELATION_BROADENS.equals(ip.type)) {
this.determineCombinatorBroadensResult(ip);
} else if (InquiryPacket.IPType.RELATION_REQUIRES.equals(ip.type)) {
this.determineCombinatorRequiresResult(ip);
} else if (InquiryPacket.IPType.RELATION_ISREQUIREDBY.equals(ip.type)) {
this.determineCombinatorIsRequiredByResult(ip);
} else {
this.determineCompetencyOrRollupRuleResult(ip);
}
} else {
this.log(ip, "We are not finished accumulating data to answer this query. Error: " + ip.numberOfQueriesRunning);
}
};
}, {relationLookup: "Object", repositories: {name: "Array", arguments: ["EcRepository"]}, logFunction: {name: "Callback1", arguments: ["Object"]}, assertions: "Object", coprocessors: {name: "Array", arguments: ["AssertionCoprocessor"]}, processedEquivalencies: {name: "Map", arguments: [null, null]}, context: "EcFramework"}, {});
var PessimisticQuadnaryAssertionProcessor = function() {
CombinatorAssertionProcessor.call(this);
};
PessimisticQuadnaryAssertionProcessor = stjs.extend(PessimisticQuadnaryAssertionProcessor, CombinatorAssertionProcessor, [], function(constructor, prototype) {
prototype.transferIndeterminateOptimistically = true;
prototype.determineCombinatorAndResult = function(ip) {
if (ip.anyChildPacketsAreFalse())
ip.result = InquiryPacket.ResultType.FALSE;
else if (ip.anyIndeterminantChildPackets())
ip.result = InquiryPacket.ResultType.INDETERMINANT;
else if (ip.anyChildPacketsAreUnknown())
ip.result = InquiryPacket.ResultType.UNKNOWN;
else
ip.result = InquiryPacket.ResultType.TRUE;
};
prototype.determineCombinatorNarrowsResult = function(ip) {
if (ip.anyChildPacketsAreTrue())
ip.result = InquiryPacket.ResultType.TRUE;
else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets())
ip.result = InquiryPacket.ResultType.FALSE;
else
ip.result = InquiryPacket.ResultType.UNKNOWN;
};
prototype.determineCombinatorBroadensResult = function(ip) {
if (ip.anyChildPacketsAreFalse())
ip.result = InquiryPacket.ResultType.FALSE;
else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets())
ip.result = InquiryPacket.ResultType.TRUE;
else
ip.result = InquiryPacket.ResultType.UNKNOWN;
};
prototype.determineCombinatorRequiresResult = function(ip) {
if (ip.anyChildPacketsAreFalse())
ip.result = InquiryPacket.ResultType.FALSE;
else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets())
ip.result = InquiryPacket.ResultType.TRUE;
else
ip.result = InquiryPacket.ResultType.UNKNOWN;
};
prototype.determineCombinatorIsRequiredByResult = function(ip) {
if (ip.anyChildPacketsAreTrue())
ip.result = InquiryPacket.ResultType.TRUE;
else if (this.transferIndeterminateOptimistically && ip.anyIndeterminantChildPackets())
ip.result = InquiryPacket.ResultType.FALSE;
else
ip.result = InquiryPacket.ResultType.UNKNOWN;
};
prototype.determineCombinatorOrResult = function(ip) {
if (ip.anyChildPacketsAreTrue())
ip.result = InquiryPacket.ResultType.TRUE;
else if (ip.anyIndeterminantChildPackets())
ip.result = InquiryPacket.ResultType.INDETERMINANT;
else if (ip.allChildPacketsUnknown())
ip.result = InquiryPacket.ResultType.UNKNOWN;
else
ip.result = InquiryPacket.ResultType.FALSE;
};
prototype.getPacketAssertionResult = function(ip) {
if (ip.positive.length > 0 && ip.negative.length == 0)
return InquiryPacket.ResultType.TRUE;
else if (ip.positive.length == 0 && ip.negative.length > 0)
return InquiryPacket.ResultType.FALSE;
else if (ip.positive.length > 0 && ip.negative.length > 0)
return InquiryPacket.ResultType.INDETERMINANT;
else
return InquiryPacket.ResultType.UNKNOWN;
};
prototype.determineResultForUnknownAssertionResult = function(ip) {
if (ip.allChildPacketsUnknown())
ip.result = InquiryPacket.ResultType.UNKNOWN;
else if (ip.allEquivalentPacketsUnknown()) {
if (ip.allSubPacketsTrueOrUnknown())
ip.result = InquiryPacket.ResultType.TRUE;
else if (ip.allSubPacketsFalseOrUnknown())
ip.result = InquiryPacket.ResultType.FALSE;
else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else if (ip.allEquivalentPacketsTrueOrUnknown()) {
if (ip.allSubPacketsTrueOrUnknown())
ip.result = InquiryPacket.ResultType.TRUE;
else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else if (ip.allEquivalentPacketsFalseOrUnknown()) {
if (ip.allSubPacketsFalseOrUnknown())
ip.result = InquiryPacket.ResultType.FALSE;
else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
};
prototype.determineResultForTrueAssertionResult = function(ip) {
if (ip.allEquivalentPacketsTrueOrUnknown()) {
if (ip.allSubPacketsTrueOrUnknown())
ip.result = InquiryPacket.ResultType.TRUE;
else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
};
prototype.determineResultForFalseAssertionResult = function(ip) {
if (ip.allEquivalentPacketsFalseOrUnknown()) {
if (ip.allSubPacketsFalseOrUnknown())
ip.result = InquiryPacket.ResultType.FALSE;
else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
} else
ip.result = InquiryPacket.ResultType.INDETERMINANT;
};
/**
* IF IP type is COMPETENCY|ROLLUPRULE: assertionResult = ( IF number of
* positive assertions > 0 && number of negative assertions = 0 THEN
* assertionResult = TRUE IF number of positive assertions = 0 && number of
* negative assertions > 0 THEN assertionResult = FALSE IF number of
* positive assertions > 0 && number of negative assertions > 0 THEN
* assertionResult = INDETERMINANT IF number of positive assertions = 0 &&
* number of negative assertions = 0 THEN assertionResult = UNKNOWN )
* <p>
* IF assertionResult = INDETERMINANT THEN INDETERMINANT ELSE IF any
* equivalent packets = INDETERMINANT THEN INDETERMINANT ELSE IF any sub
* packets = INDETERMINANT THEN INDETERMINANT
* <p>
* ELSE IF assertionResult = UNKNOWN: IF all equivalent packets = UNKNOWN IF
* all sub packets = UNKNOWN THEN UNKNOWN IF all sub packets = TRUE|UNKNOWN
* THEN TRUE IF all sub packets = FALSE|UNKNOWN THEN FALSE ELSE
* INDETERMINANT
* <p>
* ELSE IF all equivalent packets = TRUE|UNKNOWN IF all sub packets =
* TRUE|UNKNOWN THEN TRUE ELSE INDETERMINANT
* <p>
* ELSE IF all equivalent packets = FALSE|UNKNOWN IF all sub packets =
* FALSE|UNKNOWN THEN FALSE ELSE INDETERMINANT
* <p>
* ELSE INDETERMINANT
* <p>
* <p>
* ELSE IF assertionResult = TRUE: IF all equivalent packets = TRUE|UNKNOWN
* IF all sub packets = TRUE|UNKNOWN THEN TRUE ELSE INDETERMINANT
* <p>
* ELSE INDETERMINANT
* <p>
* ELSE IF assertionResult = FALSE: IF all equivalent packets =
* FALSE|UNKNOWN IF all sub packets = FALSE|UNKNOWN THEN FALSE ELSE
* INDETERMINANT
* <p>
* ELSE INDETERMINANT
*/
prototype.determineCompetencyOrRollupRuleResult = function(ip) {
var assertionResult = this.getPacketAssertionResult(ip);
if (InquiryPacket.ResultType.INDETERMINANT.equals(assertionResult) || ip.anyIndeterminantChildPackets())
ip.result = InquiryPacket.ResultType.INDETERMINANT;
else if (InquiryPacket.ResultType.UNKNOWN.equals(assertionResult))
this.determineResultForUnknownAssertionResult(ip);
else if (InquiryPacket.ResultType.TRUE.equals(assertionResult))
this.determineResultForTrueAssertionResult(ip);
else
this.determineResultForFalseAssertionResult(ip);
};
prototype.determineResult = function(ip) {
if (ip.numberOfQueriesRunning == 0) {
if (InquiryPacket.IPType.RELATION_AND.equals(ip.type))
this.determineCombinatorAndResult(ip);
else if (InquiryPacket.IPType.RELATION_OR.equals(ip.type))
this.determineCombinatorOrResult(ip);
else if (InquiryPacket.IPType.RELATION_NARROWS.equals(ip.type))
this.determineCombinatorNarrowsResult(ip);
else if (InquiryPacket.IPType.RELATION_BROADENS.equals(ip.type))
this.determineCombinatorBroadensResult(ip);
else if (InquiryPacket.IPType.RELATION_REQUIRES.equals(ip.type))
this.determineCombinatorRequiresResult(ip);
else if (InquiryPacket.IPType.RELATION_ISREQUIREDBY.equals(ip.type))
this.determineCombinatorIsRequiredByResult(ip);
else
this.determineCompetencyOrRollupRuleResult(ip);
} else {
this.log(ip, "We are not finished accumulating data to answer this query. Error: " + ip.numberOfQueriesRunning);
}
};
}, {relationLookup: "Object", repositories: {name: "Array", arguments: ["EcRepository"]}, logFunction: {name: "Callback1", arguments: ["Object"]}, assertions: "Object", coprocessors: {name: "Array", arguments: ["AssertionCoprocessor"]}, processedEquivalencies: {name: "Map", arguments: [null, null]}, context: "EcFramework"}, {});